diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-05-04 14:54:18 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-05-04 14:54:18 -0700 |
commit | 363ac93b651b70dba264cce70c9021217b78cdb2 (patch) | |
tree | 40345c3b95aba65cace7a03252e79e78dbae7f30 | |
parent | b86eebe52579fa453cc111a8691f0ee183c38c0b (diff) | |
download | libyajl2-gem-363ac93b651b70dba264cce70c9021217b78cdb2.tar.gz |
disable style checks on 1.8.7
-rw-r--r-- | Rakefile | 56 |
1 files changed, 32 insertions, 24 deletions
@@ -74,6 +74,34 @@ if RUBY_VERSION.to_f >= 1.9 end end end + namespace :style do + desc 'Run Ruby style checks' + begin + require 'rubocop/rake_task' + rescue LoadError + task :rubocop do + puts "rubocop gem is not installed" + end + else + Rubocop::RakeTask.new(:rubocop) do |t| + t.fail_on_error = false + end + end + + desc 'Run Ruby smell checks' + begin + require 'reek/rake/task' + rescue LoadError + task :reek do + puts "reek gem is not installed" + end + else + Reek::Rake::Task.new(:reek) do |t| + t.fail_on_error = false + t.config_files = '.reek.yml' + end + end + end else namespace :integration do task :vagrant do @@ -83,37 +111,17 @@ else puts "test-kitchen unsupported on ruby 1.8" end end -end - -namespace :style do - desc 'Run Ruby style checks' - begin - require 'rubocop/rake_task' - rescue LoadError + namespace :style do task :rubocop do - puts "rubocop gem is not installed" + puts "rubocop unsupported on ruby 1.8" end - else - Rubocop::RakeTask.new(:rubocop) do |t| - t.fail_on_error = false - end - end - - desc 'Run Ruby smell checks' - begin - require 'reek/rake/task' - rescue LoadError task :reek do - puts "reek gem is not installed" - end - else - Reek::Rake::Task.new(:reek) do |t| - t.fail_on_error = false - t.config_files = '.reek.yml' + puts "reek unsupported on ruby 1.8" end end end + desc 'Run all style checks' task :style => ['style:rubocop', 'style:reek'] |