Navigation Menu

Skip to content

Commit

Permalink
Use check_dependencies to prompt user to install missing gems needed …
Browse files Browse the repository at this point in the history
…for tasks.
  • Loading branch information
technicalpickles committed Oct 19, 2009
1 parent b08c34c commit 9fda54f
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions Rakefile
Expand Up @@ -50,22 +50,18 @@ begin
t.files = FileList['lib/**/*.rb'].exclude('lib/jeweler/templates/**/*.rb')
end
rescue LoadError
task :yardoc do
abort "RCov is not available. In order to run rcov, you must: sudo gem install yard"
end
task :yardoc => :check_dependencies
end


begin
require 'rcov/rcovtask'
Rcov::RcovTask.new(:rcov) do |rcov|
Rcov::RcovTask.new(:rcov => :check_dependencies) do |rcov|
rcov.libs << 'test'
rcov.pattern = 'test/**/test_*.rb'
end
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
rescue
task :rcov => :check_dependencies
end

begin
Expand All @@ -79,13 +75,9 @@ begin
end
end
rescue LoadError
task :features do
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
end
task :features => :check_dependencies
namespace :features do
task :pretty do
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
end
task :pretty => :check_dependencies
end
end

Expand Down

0 comments on commit 9fda54f

Please sign in to comment.