From dc6213f9b1927b3cc8785d1ac416debc799df767 Mon Sep 17 00:00:00 2001 From: mlincoln Date: Tue, 25 Jun 2013 13:18:32 -0300 Subject: [PATCH] Some cleanup based on comments on the PR --- Rakefile | 10 +++------- tests/helper.rb | 16 +++++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Rakefile b/Rakefile index 017571d8f..cca604270 100644 --- a/Rakefile +++ b/Rakefile @@ -53,20 +53,15 @@ require "tasks/test_task" Fog::Rake::TestTask.new namespace :test do + mock = 'true' || ENV['FOG_MOCK'] task :travis do - [true].each do |mock| sh("export FOG_MOCK=#{mock} && bundle exec shindont") - end end task :vsphere do - [true].each do |mock| sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/vsphere") - end end task :openvz do - [true].each do |mock| sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/openvz") - end end end @@ -194,7 +189,8 @@ require "tasks/changelog_task" Fog::Rake::ChangelogTask.new task :coveralls_push_workaround do - if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.9') + ENV['COVERAGE'] = 'false' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('1.9') + unless ENV['COVERAGE'] == 'false' require 'coveralls/rake/task' Coveralls::RakeTask.new Rake::Task["coveralls:push"].invoke diff --git a/tests/helper.rb b/tests/helper.rb index 4191a684f..8761949c3 100644 --- a/tests/helper.rb +++ b/tests/helper.rb @@ -1,13 +1,15 @@ require 'simplecov' require 'coveralls' -SimpleCov.command_name "shindo:#{Process.pid.to_s}" -SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ - SimpleCov::Formatter::HTMLFormatter, - Coveralls::SimpleCov::Formatter -] -SimpleCov.merge_timeout 3600 -SimpleCov.start if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.9') +unless ENV['COVERAGE'] == 'false' + SimpleCov.command_name "shindo:#{Process.pid.to_s}" + SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ + SimpleCov::Formatter::HTMLFormatter, + Coveralls::SimpleCov::Formatter + ] + SimpleCov.merge_timeout 3600 + SimpleCov.start +end ENV['FOG_RC'] = ENV['FOG_RC'] || File.expand_path('../.fog', __FILE__) ENV['FOG_CREDENTIAL'] = ENV['FOG_CREDENTIAL'] || 'default'