Permalink
Browse files

Don't load Rubocop in production

  • Loading branch information...
1 parent 36c2c68 commit badc14f92cd38abc54c5f797fc31cb21b31a180e @jordanbyron jordanbyron committed Feb 6, 2014
Showing with 9 additions and 7 deletions.
  1. +0 −2 Rakefile
  2. +9 −5 lib/tasks/rubocop.rake
View
@@ -6,5 +6,3 @@ require 'rake'
require File.expand_path('../lib/rake_exception_notification', __FILE__)
PracticingRubyWeb::Application.load_tasks
-
-Rake::Task[:test].enhance { Rake::Task["test:rubocop"].invoke }
@@ -1,8 +1,12 @@
-require "rubocop/rake_task"
+unless Rails.env.production?
+ require "rubocop/rake_task"
-namespace :test do
- desc "Run RuboCop style and lint checks"
- Rubocop::RakeTask.new(:rubocop) do |t|
- t.options = ["--rails"]
+ namespace :test do
+ desc "Run RuboCop style and lint checks"
+ Rubocop::RakeTask.new(:rubocop) do |t|
+ t.options = ["--rails"]
+ end
end
+
+ Rake::Task[:test].enhance { Rake::Task["test:rubocop"].invoke }
end

0 comments on commit badc14f

Please sign in to comment.