Rakefile in active_model_serializers-0.10.0.rc2 vs Rakefile in active_model_serializers-0.10.0.rc3
- old
+ new
@@ -1,10 +1,37 @@
-require "bundler/gem_tasks"
+begin
+ require 'simplecov'
+rescue LoadError
+end
+require 'bundler/gem_tasks'
+
+begin
+ require 'rubocop'
+ require 'rubocop/rake_task'
+rescue LoadError
+else
+ Rake::Task[:rubocop].clear if Rake::Task.task_defined?(:rubocop)
+ if !defined?(::Rubinius)
+ Rake::Task[:rubocop].clear if Rake::Task.task_defined?(:rubocop)
+ desc 'Execute rubocop'
+ RuboCop::RakeTask.new(:rubocop) do |task|
+ task.options = ['--rails', '--display-cop-names', '--display-style-guide']
+ task.fail_on_error = true
+ end
+ else
+ desc 'No-op rubocop to avoid rbx segfault'
+ task :rubocop do
+ puts 'Skipping rubocop on rbx due to segfault'
+ puts 'https://github.com/rubinius/rubinius/issues/3499'
+ end
+ end
+end
+
require 'rake/testtask'
Rake::TestTask.new do |t|
- t.libs << "test"
+ t.libs << 'test'
t.test_files = FileList['test/**/*_test.rb']
t.ruby_opts = ['-r./test/test_helper.rb']
t.verbose = true
end