Add SimpleCov and Coveralls.io dependenices

Add rake tasks for travis, which include publishing coverage reports.
This commit is contained in:
mlincoln 2013-06-18 17:07:24 -05:00
Родитель 06deb8554f
Коммит e42902a266
2 изменённых файлов: 19 добавлений и 0 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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