Rakefile in rack-oauth2-server-1.4.5 vs Rakefile in rack-oauth2-server-1.4.6
- old
+ new
@@ -1,7 +1,6 @@
require "rake/testtask"
-require "yard"
spec = Gem::Specification.load(Dir["*.gemspec"].first)
desc "Build the Gem"
task :build do
@@ -37,23 +36,35 @@
end
task.ruby_opts << "-I."
end
namespace :test do
- task :all=>["test:sinatra", "test:rails"]
+ task :all=>["test:sinatra", "test:rails2", "test:rails3"]
desc "Run all tests against Sinatra"
task :sinatra do
sh "rake test FRAMEWORK=sinatra"
end
- desc "Run all tests against Rails 2.3.x"
+ desc "Run all tests against Rails"
task :rails do
sh "rake test FRAMEWORK=rails"
end
+ desc "Run all tests against Rails 2.3.x"
+ task :rails2 do
+ sh "env BUNDLE_GEMFILE=Rails2 rake test FRAMEWORK=rails"
+ end
+ desc "Run all tests against Rails 3.x"
+ task :rails3 do
+ sh "env BUNDLE_GEMFILE=Rails3 bundle exec rake test FRAMEWORK=rails"
+ end
end
task :default=>"test:all"
-YARD::Rake::YardocTask.new do |doc|
- doc.files = FileList["lib/**/*.rb"]
+begin
+ require "yard"
+ YARD::Rake::YardocTask.new do |doc|
+ doc.files = FileList["lib/**/*.rb"]
+ end
+rescue LoadError
end
task :clobber do
rm_rf %w{doc .yardoc *.gem}
end