Rakefile in multi_json-0.0.5 vs Rakefile in multi_json-1.0.0.rc

- old
+ new

@@ -1,32 +1,37 @@ require 'rubygems' -require 'bundler' +begin + require 'bundler' + Bundler::GemHelper.install_tasks +rescue LoadError => e + puts "although not required, it's recommended that you use bundler during development" +end -Bundler::GemHelper.install_tasks - require 'rspec/core/rake_task' desc "Run all examples" -RSpec::Core::RakeTask.new(:spec) do |t| -end +RSpec::Core::RakeTask.new(:spec) -task :cleanup_rcov_files do - rm_rf 'coverage.data' -end - -namespace :spec do - desc "Run all examples using rcov" - RSpec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t| - t.rcov = true - t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"] - t.rcov_opts << %[--text-report --sort coverage --no-html --aggregate coverage.data] - end -end - task :default => :spec require 'rake/rdoctask' Rake::RDocTask.new do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = "multi_json #{MultiJson::VERSION}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end + +task :cleanup_rcov_files do + rm_rf 'coverage.data' +end + +begin + namespace :spec do + desc "Run all examples using rcov" + RSpec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t| + t.rcov = true + t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"] + t.rcov_opts << %[--text-report --sort coverage --no-html --aggregate coverage.data] + end + end +rescue LoadError +end \ No newline at end of file