lib/caramelize/gollum_output.rb in caramelize-0.1.1 vs lib/caramelize/gollum_output.rb in caramelize-0.1.2

- old
+ new

@@ -41,16 +41,14 @@ @gollum.write_page(page.title, markup, page.body, commit) end end # Commit all revisions of the given history into this gollum-wiki-repository. - def commit_history(revisions, options={}) + def commit_history(revisions, options={}, &block) options[:markup] = :markdown if options[:markup].nil? # target markup revisions.each_with_index do |page, index| - if options[:verbosity] == :normal || options[:verbosity] == :verbose - puts "(#{index+1}/#{revisions.count}) #{page.time} #{page.title}" - end - + # call debug output from outside + block.call(page, index) if block_given? commit_revision(page, options[:markup]) end end end \ No newline at end of file