Class: Semmy::Tasks::ChangelogSections
- Defined in:
- lib/semmy/tasks/changelog_sections.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Semmy::Tasks::Base
Instance Method Details
#define ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/semmy/tasks/changelog_sections.rb', line 6 def define namespace 'changelog' do task 'close_section' do version = Project.version homepage = Gemspec.homepage Shell.info("Inserting #{version} section " \ "in #{config.changelog_path}.") Files.rewrite(config.changelog_path, Changelog::CloseSection.new(config, version: version, homepage: homepage, date: Date.today)) end task 'update_for_minor' do Shell.info('Updating changelog ' \ "in #{config.changelog_path}.") Files.rewrite(config.changelog_path, Changelog::UpdateForMinor.new(config, version: Project.version, homepage: Gemspec.homepage)) end task 'replace_minor_stable_branch_with_major_stable_branch' do Shell.info('Updating changelog ' \ "in #{config.changelog_path}.") Files.rewrite(config.changelog_path, Changelog::ReplaceMinorStableBranchWithMajorStableBranch .new(config, version: Project.version)) end task 'insert_unreleased_section' do Shell.info('Inserting unreleased changes header ' \ "in #{config.changelog_path}.") Files.rewrite(config.changelog_path, Changelog::InsertUnreleasedSection.new(config)) end end end |