Class: Gollum::Git::Commit
- Inherits:
-
Object
- Object
- Gollum::Git::Commit
- Defined in:
- lib/grit_adapter/git_layer_grit.rb
Class Method Summary collapse
-
.list_from_string(repo, log) ⇒ Object
Grit::Commit.list_from_string(@wiki.repo, log).
Instance Method Summary collapse
- #author ⇒ Object
- #authored_date ⇒ Object
- #id ⇒ Object (also: #sha)
-
#initialize(commit) ⇒ Commit
constructor
A new instance of Commit.
- #message ⇒ Object
- #stats ⇒ Object
- #to_s ⇒ Object
- #tree ⇒ Object
Constructor Details
#initialize(commit) ⇒ Commit
Returns a new instance of Commit.
81 82 83 |
# File 'lib/grit_adapter/git_layer_grit.rb', line 81 def initialize(commit) @commit = commit end |
Class Method Details
.list_from_string(repo, log) ⇒ Object
Grit::Commit.list_from_string(@wiki.repo, log)
119 120 121 |
# File 'lib/grit_adapter/git_layer_grit.rb', line 119 def self.list_from_string(repo, log) Grit::Commit.list_from_string(repo, log) end |
Instance Method Details
#author ⇒ Object
101 102 103 104 |
# File 'lib/grit_adapter/git_layer_grit.rb', line 101 def = @commit. Gollum::Git::Actor.new(.name, .email) end |
#authored_date ⇒ Object
106 107 108 |
# File 'lib/grit_adapter/git_layer_grit.rb', line 106 def @commit. end |
#id ⇒ Object Also known as: sha
85 86 87 |
# File 'lib/grit_adapter/git_layer_grit.rb', line 85 def id @commit.id end |
#message ⇒ Object
110 111 112 |
# File 'lib/grit_adapter/git_layer_grit.rb', line 110 def @commit. end |
#stats ⇒ Object
94 95 96 97 98 99 |
# File 'lib/grit_adapter/git_layer_grit.rb', line 94 def stats @stats ||= begin grit_stats = @commit.stats OpenStruct.new(:additions => grit_stats.additions, :deletions => grit_stats.deletions, :files => grit_stats.files, :id => id, :total => grit_stats.total) end end |
#to_s ⇒ Object
90 91 92 |
# File 'lib/grit_adapter/git_layer_grit.rb', line 90 def to_s @commit.id end |