Class: CookbookRelease::Rake::RepoTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- CookbookRelease::Rake::RepoTask
- Defined in:
- lib/cookbook-release.rb
Instance Method Summary collapse
-
#initialize(opts = {}, &html_block) ⇒ RepoTask
constructor
A new instance of RepoTask.
Constructor Details
#initialize(opts = {}, &html_block) ⇒ RepoTask
Returns a new instance of RepoTask.
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 50 51 52 53 54 55 56 57 58 |
# File 'lib/cookbook-release.rb', line 14 def initialize(opts = {}, &html_block) desc 'Display raw changelog between branches' task 'changelog:raw' do git = GitUtilities.new puts Changelog.new(git, opts).raw end desc 'Display raw changelog between branches with risky commits on top' task 'changelog:raw_priority' do git = GitUtilities.new puts Changelog.new(git, opts).raw_priority end desc 'Display html changelog between branches' task 'changelog:html' do git = GitUtilities.new html = Changelog.new(git, opts).html if block_given? html = html_block.call(html) end puts html end desc 'Display html changelog between branches with risky commits on top' task 'changelog:html_priority' do git = GitUtilities.new html = Changelog.new(git, opts).html_priority if block_given? html = html_block.call(html) end puts html end desc 'Display markdown changelog between branches' task 'changelog:markdown' do git = GitUtilities.new puts Changelog.new(git, opts).markdown end desc 'Display markdown changelog between branches with risky commits on top' task 'changelog:markdown_priority' do git = GitUtilities.new puts Changelog.new(git, opts).markdown_priority end end |