lib/shoe/tasks/ronn.rb in shoe-0.6.2 vs lib/shoe/tasks/ronn.rb in shoe-0.7.0

- old
+ new

@@ -15,17 +15,17 @@ # == Notes # # * It's best to include the generated man pages in your gem, so that # {gem-man}[http://github.com/defunkt/gem-man] can get to them. # - # * Ronn becomes a prerequisite for Release, so your man pages are sure to - # be up-to-date. + # * Ronn becomes a prerequisite for <tt>rake build</tt>, so your man pages + # are sure to be up-to-date. # # * You may like to add a <tt>task :man => :ronn</tt> to your # <tt>Rakefile</tt>. I felt a little uncomfortable clogging that # namespace without your consent. - class Ronn < Abstract + class Ronn < Task def active? !ronn_files.empty? end def define @@ -57,11 +57,11 @@ rule /\.\d$/ => '%p.ronn' do |task| ronn('--roff', task.source) end - namespace :prepare do - task :release => 'ronn:build' + if Rake::Task.task_defined?(:build) + task :build => 'ronn:build' end end def ronn(format, file) sh "ronn --build #{format} --date #{spec.date.strftime('%Y-%m-%d')} --manual='RubyGems Manual' --organization='#{spec.author}' #{file}"