Rakefile in resque_mailer-0.2.1 vs Rakefile in resque_mailer-1.0.0

- old
+ new

@@ -7,33 +7,46 @@ gem.name = "resque_mailer" gem.summary = %Q{Rails plugin for sending asynchronous email with ActionMailer and Resque} gem.description = %Q{Rails plugin for sending asynchronous email with ActionMailer and Resque} gem.email = "nap@zerosum.org" gem.homepage = "http://github.com/zapnap/resque_mailer" - gem.authors = ["Nick Plante"] + gem.authors = ["Nick Plante", "Marcin Kulik"] gem.add_development_dependency "rspec", ">= 1.2.9" gem.add_development_dependency "resque", ">= 1.2.3" - gem.add_development_dependency "actionmailer", ">= 2.2.2" + gem.add_development_dependency "actionmailer", ">= 2.3.4" # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings end Jeweler::GemcutterTasks.new rescue LoadError puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" end -require 'spec/rake/spectask' -Spec::Rake::SpecTask.new(:spec) do |spec| - spec.libs << 'lib' << 'spec' - spec.spec_files = FileList['spec/**/*_spec.rb'] -end +begin + require 'spec/rake/spectask' -Spec::Rake::SpecTask.new(:rcov) do |spec| - spec.libs << 'lib' << 'spec' - spec.pattern = 'spec/**/*_spec.rb' - spec.rcov = true + puts "Using RSpec 1.x / Rails 2.x" + + desc "Run specs for Rails 2.x" + Spec::Rake::SpecTask.new(:spec) do |spec| + spec.spec_files = FileList['spec/common_spec.rb', 'spec/rails2_spec.rb'] + end +rescue LoadError + puts "RSpec 1.x unavailable" end -task :spec => :check_dependencies +begin + require 'rspec/core' + require 'rspec/core/rake_task' + + puts "Using RSpec 2.x / Rails 3.x" + + desc "Run specs for Rails 3.x" + RSpec::Core::RakeTask.new(:spec) do |spec| + spec.pattern = ["spec/common_spec.rb","spec/rails3_spec.rb"] + end +rescue LoadError + puts "RSpec 2.x unavailable" +end task :default => :spec require 'rake/rdoctask' Rake::RDocTask.new do |rdoc|