Class: TagChangelog::Generate
- Inherits:
-
Object
- Object
- TagChangelog::Generate
- Defined in:
- lib/tag_changelog/generate.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(project_config = {}, options = {}) ⇒ Generate
constructor
A new instance of Generate.
- #run ⇒ Object
Constructor Details
#initialize(project_config = {}, options = {}) ⇒ Generate
Returns a new instance of Generate.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/tag_changelog/generate.rb', line 8 def initialize(project_config = {}, = {}) @project_config = project_config @options = @config = build_configuration @output = open_output_file @tags_list = @filter = Regexp.new(config["filter"], true) @commit_messages_filter = set_commits_filter @group = config["group"] end |
Class Method Details
.run(project_config, options) ⇒ Object
4 5 6 |
# File 'lib/tag_changelog/generate.rb', line 4 def self.run(project_config, ) new(project_config, ).run end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/tag_changelog/generate.rb', line 19 def run output << "# Changelog\n\n" .each_cons(2) do |current_tag, previous_tag| tag = Git::Tag.new(current_tag) = (previous_tag, current_tag) output << "## #{tag.version}" + " (#{tag.date})\n" output << .to_text output << "\n" end end |