return Grit::Commit objects instead of Gollum::Version
This commit is contained in:
+3
-5
@@ -76,11 +76,9 @@ module Gollum
|
||||
|
||||
# All of the versions that have touched this Page.
|
||||
#
|
||||
# Returns an Array of Gollum::Version.
|
||||
# Returns an Array of Grit::Commit.
|
||||
def versions
|
||||
@wiki.repo.log('master', self.path).map do |v|
|
||||
Version.new(v)
|
||||
end
|
||||
@wiki.repo.log('master', self.path)
|
||||
end
|
||||
|
||||
# Find a page in the given Gollum repo.
|
||||
@@ -91,7 +89,7 @@ module Gollum
|
||||
def find(name)
|
||||
commit = self.wiki.repo.commits.first
|
||||
if page = find_page_in_tree(commit.tree, name)
|
||||
page.version = Version.new(commit)
|
||||
page.version = commit
|
||||
page
|
||||
else
|
||||
nil
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
module Gollum
|
||||
class Version
|
||||
attr_accessor :commit
|
||||
|
||||
def initialize(commit)
|
||||
self.commit = commit
|
||||
end
|
||||
|
||||
# The SHA1 commit ID.
|
||||
#
|
||||
# The String ID.
|
||||
def id
|
||||
self.commit.id
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user