diff options
author | Andre Arko <andre@arko.net> | 2011-04-30 13:02:40 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2011-04-30 13:02:40 -0700 |
commit | b88d8a9a3fcfd49d78cfb021c501552a3573fb30 (patch) | |
tree | 9ea5de7b24a2a16d10e04eb63842e23fc37e2ca8 | |
parent | fe1ea11e5133b17c7c3d290fc23983be3802af04 (diff) | |
download | bundler-b88d8a9a3fcfd49d78cfb021c501552a3573fb30.tar.gz |
allow rspec tasks even if ronn is missing
-rw-r--r-- | Rakefile | 61 |
1 files changed, 33 insertions, 28 deletions
@@ -8,8 +8,8 @@ def sudo? end begin + # set up rspec tasks require 'rspec/core/rake_task' - require 'ronn' desc "Run specs" RSpec::Core::RakeTask.new do |t| @@ -129,6 +129,38 @@ begin end + + # set up man tasks that use ronn + require 'ronn' + + namespace :man do + directory "lib/bundler/man" + + Dir["man/*.ronn"].each do |ronn| + basename = File.basename(ronn, ".ronn") + roff = "lib/bundler/man/#{basename}" + + file roff => ["lib/bundler/man", ronn] do + sh "ronn --roff --pipe #{ronn} > #{roff}" + end + + file "#{roff}.txt" => roff do + sh "groff -Wall -mtty-char -mandoc -Tascii #{roff} | col -b > #{roff}.txt" + end + + task :build_all_pages => "#{roff}.txt" + end + + desc "Build the man pages" + task :build => "man:build_all_pages" + + desc "Clean up from the built man pages" + task :clean do + rm_rf "lib/bundler/man" + end + end + + rescue LoadError task :spec do abort "Run `rake spec:deps` to be able to run the specs" @@ -144,33 +176,6 @@ rescue LoadError end -namespace :man do - directory "lib/bundler/man" - - Dir["man/*.ronn"].each do |ronn| - basename = File.basename(ronn, ".ronn") - roff = "lib/bundler/man/#{basename}" - - file roff => ["lib/bundler/man", ronn] do - sh "ronn --roff --pipe #{ronn} > #{roff}" - end - - file "#{roff}.txt" => roff do - sh "groff -Wall -mtty-char -mandoc -Tascii #{roff} | col -b > #{roff}.txt" - end - - task :build_all_pages => "#{roff}.txt" - end - - desc "Build the man pages" - task :build => "man:build_all_pages" - - desc "Clean up from the built man pages" - task :clean do - rm_rf "lib/bundler/man" - end -end - namespace :vendor do desc "Build the vendor dir" task :build => :clean do |