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 |
# 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 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 markdown changelog between branches' task 'changelog:markdown' do git = GitUtilities.new puts Changelog.new(git, opts).markdown end end |