Rakefile in couchrest_model-1.0.0.beta8 vs Rakefile in couchrest_model-1.0.0

- old
+ new

@@ -1,55 +1,24 @@ +require 'rubygems' +require 'bundler' +Bundler::GemHelper.install_tasks + require 'rake' require "rake/rdoctask" -$LOAD_PATH.unshift File.expand_path("../lib", __FILE__) -require 'couchrest_model' +require 'rspec' +require 'rspec/core/rake_task' -begin - require 'spec/rake/spectask' -rescue LoadError - puts <<-EOS -To use rspec for testing you must install rspec gem: - gem install rspec -EOS - exit(0) -end - -begin - require 'jeweler' - Jeweler::Tasks.new do |gemspec| - gemspec.name = "couchrest_model" - gemspec.summary = "Extends the CouchRest Document for advanced modelling." - gemspec.description = "CouchRest Model provides aditional features to the standard CouchRest Document class such as properties, view designs, associations, callbacks, typecasting and validations." - gemspec.email = "jchris@apache.org" - gemspec.homepage = "http://github.com/couchrest/couchrest_model" - gemspec.authors = ["J. Chris Anderson", "Matt Aimonetti", "Marcos Tapajos", "Will Leinweber", "Sam Lown"] - gemspec.extra_rdoc_files = %w( README.md LICENSE THANKS.md ) - gemspec.files = %w( LICENSE README.md Rakefile THANKS.md history.txt couchrest.gemspec) + Dir["{examples,lib,spec}/**/*"] - Dir["spec/tmp"] - gemspec.has_rdoc = true - gemspec.add_dependency("couchrest", "~> 1.0.0") - gemspec.add_dependency("mime-types", "~> 1.15") - gemspec.add_dependency("activesupport", "~> 2.3.5") - gemspec.add_dependency("activemodel", "~> 3.0.0.beta4") - gemspec.add_dependency("tzinfo", "~> 0.3.22") - gemspec.version = CouchRest::Model::VERSION - gemspec.date = Time.now.strftime("%Y-%m-%d") - gemspec.require_path = "lib" - end -rescue LoadError - puts "Jeweler not available. Install it with: gem install jeweler" -end - desc "Run all specs" -Spec::Rake::SpecTask.new('spec') do |t| - t.spec_opts = ["--color"] - t.spec_files = FileList['spec/**/*_spec.rb'] +Rspec::Core::RakeTask.new(:spec) do |spec| + spec.rspec_opts = ["--color"] + spec.pattern = 'spec/**/*_spec.rb' end desc "Print specdocs" -Spec::Rake::SpecTask.new(:doc) do |t| - t.spec_opts = ["--format", "specdoc"] - t.spec_files = FileList['spec/*_spec.rb'] +Rspec::Core::RakeTask.new(:doc) do |spec| + spec.rspec_opts = ["--format", "specdoc"] + spec.pattern = 'spec/*_spec.rb' end desc "Generate the rdoc" Rake::RDocTask.new do |rdoc| files = ["README.rdoc", "LICENSE", "lib/**/*.rb"]