Rakefile in resque-scheduler-2.5.5 vs Rakefile in resque-scheduler-3.0.0
- old
+ new
@@ -1,29 +1,21 @@
+# vim:fileencoding=utf-8
require 'bundler/gem_tasks'
require 'rake/testtask'
+require 'rubocop/rake_task'
+require 'yard'
-task default: [:rubocop, :test]
+task default: [:rubocop, :test] unless RUBY_PLATFORM =~ /java/
+task default: [:test] if RUBY_PLATFORM =~ /java/
+Rubocop::RakeTask.new
+
Rake::TestTask.new do |t|
t.libs << 'test'
t.pattern = ENV['PATTERN'] || 'test/*_test.rb'
- t.verbose = !!ENV['VERBOSE']
- t.options = "--seed #{ENV['SEED']}" if ENV['SEED']
-end
-
-desc 'Run rubocop'
-task :rubocop do
- unless RUBY_VERSION < '1.9'
- sh('rubocop --format simple') { |ok, _| ok || abort }
+ t.options = ''.tap do |o|
+ o << "--seed #{ENV['SEED']} " if ENV['SEED']
+ o << '--verbose ' if ENV['VERBOSE']
end
end
-begin
- require 'rdoc/task'
-
- Rake::RDocTask.new do |rd|
- rd.main = 'README.md'
- rd.rdoc_files.include('README.md', 'lib/**/*.rb')
- rd.rdoc_dir = 'doc'
- end
-rescue LoadError
-end
+YARD::Rake::YardocTask.new