Rakefile in ninja-model-0.6.2 vs Rakefile in ninja-model-0.7.0
- old
+ new
@@ -1,31 +1,21 @@
-require 'bundler'
-Bundler::GemHelper.install_tasks
+#!/usr/bin/env rake
+begin
+ require 'bundler/setup'
+rescue LoadError
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
+end
-require 'rake'
-require 'rake/rdoctask'
require 'rspec/core/rake_task'
+require 'yard'
+
RSpec::Core::RakeTask.new(:spec) do |t|
t.verbose = false
+ t.pattern = 'spec/**/*_spec.rb'
end
-desc 'Run specs with documentation format'
-RSpec::Core::RakeTask.new(:specd) do |t|
- t.verbose = false
- t.rspec_opts = '--format d'
+YARD::Rake::YardocTask.new do |t|
+ t.options = ['--exclude', 'generators']
end
-Rake::RDocTask.new do |r|
- r.rdoc_dir = 'doc/html'
- r.main = "README.md"
- r.rdoc_files.include('README.md', 'lib/**/*.rb')
- r.rdoc_files.exclude('lib/generators/**/*')
-end
-
-namespace :spec do
- RSpec::Core::RakeTask.new(:rcov) do |t|
- t.rcov = true
- t.rcov_opts = %w{--text-report --sort coverage}
- t.rcov_opts << %w{--exclude gems\/,spec\/}
- end
-end
+Bundler::GemHelper.install_tasks