Rakefile in sinatra_warden-0.3.2 vs Rakefile in sinatra_warden-1.0.0
- old
+ new
@@ -1,22 +1,25 @@
-require 'bundler'
-Bundler::GemHelper.install_tasks
-Bundler.setup :development
+require "bundler/gem_tasks"
-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 'rspec/core/rake_task'
+ require 'spec/rake/spectask'
-Spec::Rake::SpecTask.new(:rcov) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.pattern = 'spec/**/*_spec.rb'
- spec.rcov = true
-end
+ Spec::Rake::SpecTask.new('coverage') do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ ENV['COVERAGE'] = "true"
+ end
-task :default => :spec
+ Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
+ end
+ task default: :spec
+rescue LoadError
+ # no rspec available
+end
begin
require 'yard'
YARD::Rake::YardocTask.new
rescue LoadError
task :yardoc do