lib/gris/generators/templates/scaffold/Rakefile in gris-0.5.4 vs lib/gris/generators/templates/scaffold/Rakefile in gris-0.5.5

- old
+ new

@@ -1,17 +1,18 @@ #!/usr/bin/env rake require File.expand_path('../config/boot', __FILE__) Dir.glob('./lib/tasks/*.rake').each { |r| import r } -require 'rspec/core/rake_task' -require 'rubocop/rake_task' +if Gris.env.development? || Gris.env.test? + require 'rspec/core/rake_task' + require 'rubocop/rake_task' + RSpec::Core::RakeTask.new -RSpec::Core::RakeTask.new + desc 'Run RuboCop' + RuboCop::RakeTask.new(:rubocop) do |task| + task.fail_on_error = true + task.options = %w(-D --auto-correct) + end -desc 'Run RuboCop' -RuboCop::RakeTask.new(:rubocop) do |task| - task.fail_on_error = true - task.options = %w(-D --auto-correct) + task default: [:rubocop, :spec] end - -task default: [:rubocop, :spec]