diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-05-04 14:29:00 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-05-04 14:29:00 -0700 |
commit | 95c9a12287507cb088d070c6522c54fd66e7f3d6 (patch) | |
tree | b520c97a78cec9237912bc01e08233fb6374c402 /Rakefile | |
parent | 7018cc589d463c58e34d9512d34bc24dc1037486 (diff) | |
download | libyajl2-gem-95c9a12287507cb088d070c6522c54fd66e7f3d6.tar.gz |
skip kitchen on ruby 1.8
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 57 |
1 files changed, 34 insertions, 23 deletions
@@ -45,31 +45,42 @@ end RSpec::Core::RakeTask.new(:spec) -namespace :integration do - begin - require 'kitchen' - rescue LoadError - task :vagrant do - puts "kitchen gem is not available" - end - task :cloud do - puts "kitchen gem is not available" +if RUBY_VERSION.to_f >= 1.9 + namespace :integration do + begin + require 'kitchen' + rescue LoadError + task :vagrant do + puts "test-kitchen gem is not installed" + end + task :cloud do + puts "test-kitchen gem is not installed" + end + else + desc 'Run Test Kitchen with Vagrant' + task :vagrant do + Kitchen.logger = Kitchen.default_file_logger + Kitchen::Config.new.instances.each do |instance| + instance.test(:always) + end + end + + desc 'Run Test Kitchen with cloud plugins' + task :cloud do + if ENV['TRAVIS_PULL_REQUEST'] != 'true' + ENV['KITCHEN_YAML'] = '.kitchen.cloud.yml' + sh "kitchen test --concurrency 4" + end + end end - else - desc 'Run Test Kitchen with Vagrant' + end +else + namespace :integration do task :vagrant do - Kitchen.logger = Kitchen.default_file_logger - Kitchen::Config.new.instances.each do |instance| - instance.test(:always) - end + puts "test-kitchen unsupported on ruby 1.8" end - - desc 'Run Test Kitchen with cloud plugins' task :cloud do - if ENV['TRAVIS_PULL_REQUEST'] != 'true' - ENV['KITCHEN_YAML'] = '.kitchen.cloud.yml' - sh "kitchen test --concurrency 4" - end + puts "test-kitchen unsupported on ruby 1.8" end end end @@ -80,7 +91,7 @@ namespace :style do require 'rubocop/rake_task' rescue LoadError task :rubocop do - puts "rubocop gem is not available" + puts "rubocop gem is not installed" end else Rubocop::RakeTask.new(:rubocop) do |t| @@ -93,7 +104,7 @@ namespace :style do require 'reek/rake/task' rescue LoadError task :reek do - puts "reek gem is not available" + puts "reek gem is not installed" end else Reek::Rake::Task.new(:reek) do |t| |