diff --git a/Gemfile b/Gemfile index b4e2a20bb..20094cd0f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,8 @@ source "https://rubygems.org" +group :development, :test do + # This is here because gemspec doesn't support require: false + gem 'coveralls', :require => false +end + gemspec diff --git a/Rakefile b/Rakefile index 84ea478aa..017571d8f 100644 --- a/Rakefile +++ b/Rakefile @@ -47,11 +47,17 @@ end GEM_NAME = "#{name}" task :default => :test +task :travis => ['test:travis', 'coveralls_push_workaround'] require "tasks/test_task" Fog::Rake::TestTask.new namespace :test do + 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") @@ -186,3 +192,11 @@ end require "tasks/changelog_task" Fog::Rake::ChangelogTask.new + +task :coveralls_push_workaround do + if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.9') + require 'coveralls/rake/task' + Coveralls::RakeTask.new + Rake::Task["coveralls:push"].invoke + end +end \ No newline at end of file