Rakefile in amee-data-abstraction-1.3.1 vs Rakefile in amee-data-abstraction-2.0.0
- old
+ new
@@ -11,20 +11,18 @@
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
require 'rake'
-require 'spec'
-require 'spec/rake/spectask'
+require 'rspec'
+require 'rspec/core/rake_task'
task :default => [:spec]
-Spec::Rake::SpecTask.new do |t|
- t.spec_opts = ['--options', "spec/spec.opts"]
- t.spec_files = FileList['spec/**/*_spec.rb']
- t.rcov = true
- t.rcov_opts = ['--exclude', 'spec,/*ruby*,/*gems*']
+desc "Run specs"
+RSpec::Core::RakeTask.new do |t|
+ # Put spec opts in a file named .rspec in root
end
require 'jeweler'
# Fix for Jeweler to use stable branch
class Jeweler
@@ -72,16 +70,19 @@
gem.authors = ["James Hetherington", "Andrew Berkeley", "James Smith", "George Palmer"]
# dependencies defined in Gemfile
end
Jeweler::RubygemsDotOrgTasks.new
-task :default => :spec
+require 'rcov/rcovtask'
+desc "Generate code coverage"
+RSpec::Core::RakeTask.new(:coverage) do |t|
+ t.rcov = true
+ t.rcov_opts = ['--exclude', 'spec']
+end
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
-
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "amee-data-abstraction #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
+require 'rdoc/task'
+RDoc::Task.new do |rd|
+ rd.title = "AMEE Data Abstraction"
+ rd.rdoc_dir = 'doc'
+ rd.main = "README"
+ rd.rdoc_files.include("README", "lib/**/*.rb")
end