Class: ChangeLogger
- Inherits:
-
Object
- Object
- ChangeLogger
- Defined in:
- lib/changelogger.rb
Instance Method Summary collapse
- #changelog ⇒ Object
-
#initialize(repo_dir) ⇒ ChangeLogger
constructor
A new instance of ChangeLogger.
Constructor Details
#initialize(repo_dir) ⇒ ChangeLogger
Returns a new instance of ChangeLogger.
6 7 8 |
# File 'lib/changelogger.rb', line 6 def initialize(repo_dir) @repo = Grit::Repo.new(repo_dir) end |
Instance Method Details
#changelog ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/changelogger.rb', line 10 def changelog = @repo. changelog = "" @repo.commits('master', false).each do |commit| tag = .find { |t| t.commit.id == commit.id } changelog += ("\n" + tag.name + "\n") unless tag.nil? changelog += CommitFormatter.new(commit).format + "\n" unless CommitFilter.new(commit).filter end changelog end |