Permalink
Browse files

Both Yard and Rake are requirements.

There's no need to check for their presence thanks to Bundler.
  • Loading branch information...
1 parent ecf600f commit 1415294d4bbfd49d7297ae61064f308f2bfe42da @weppos weppos committed Feb 3, 2012
Showing with 14 additions and 15 deletions.
  1. +14 −15 Rakefile
View
@@ -14,28 +14,27 @@ end
task :default => :spec
task :test => :spec
+
require 'rspec/core/rake_task'
+
RSpec::Core::RakeTask.new
-begin
- require 'yard'
- YARD::Rake::YardocTask.new do |t|
- t.options << "--files" << "CHANGELOG.md,LICENSE"
- end
-rescue LoadError
- task(:yardoc){abort "`gem install yard` to generate documentation"}
+
+require 'yard'
+
+YARD::Rake::YardocTask.new do |t|
+ t.options << "--files" << "CHANGELOG.md,LICENSE"
end
-begin
- require 'rubygems/package_task'
- Gem::PackageTask.new(gemspec) do |pkg|
- pkg.gem_spec = gemspec
- end
- task :gem => :gemspec
-rescue LoadError
- task(:gem){abort "`gem install rake` to package gems"}
+
+require 'rubygems/package_task'
+
+Gem::PackageTask.new(gemspec) do |pkg|
+ pkg.gem_spec = gemspec
end
+task :gem => :gemspec
+
desc "Install the gem locally"
task :install => :gem do
sh "gem install pkg/#{gemspec.full_name}.gem"

0 comments on commit 1415294

Please sign in to comment.