Skip to content

Commit

Permalink
Some cleanup based on comments on the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlinc committed Jun 25, 2013
1 parent 3c03e4c commit dc6213f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
10 changes: 3 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
16 changes: 9 additions & 7 deletions tests/helper.rb
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit dc6213f

Please sign in to comment.