Rakefile in metamri-0.1.23 vs Rakefile in metamri-0.2.0
- old
+ new
@@ -1,25 +1,10 @@
-#
-# To change this template, choose Tools | Templates
-# and open the template in the editor.
-
require 'rubygems'
require 'rake'
-# require 'echoe'
-#
-# Echoe.new('metamri', '0.1.0') do |p|
-# p.description = "Extraction of MRI metadata and insertion into compatible sqlite3 databases."
-# p.url = "http://github.com/brainmap/metamri"
-# p.author = "Kristopher J. Kosmatka"
-# p.email = "kk4@medicine.wisc.edu"
-# p.ignore_pattern = ["nbproject/*"]
-# p.development_dependencies = []
-# end
-#
-# Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
+require 'rake/rdoctask'
+require 'rake/testtask'
-
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "metamri"
gemspec.summary = "MRI metadata"
@@ -33,6 +18,25 @@
gemspec.add_development_dependency('rspec')
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install jeweler"
+end
+
+begin
+ require 'spec/rake/spectask'
+ Spec::Rake::SpecTask.new do |test|
+ test.warning = true
+ test.rcov = true
+ test.spec_files = FileList['spec/**/*_spec.rb']
+ end
+rescue LoadError
+ task :spec do
+ abort "RSpec is not available. In order to run specs, you must: sudo gem install rspec"
+ end
+end
+
+Rake::TestTask.new do |t|
+ t.libs << "test"
+ t.test_files = FileList['test/*test*.rb']
+ t.verbose = true
end
\ No newline at end of file