зеркало из https://github.com/microsoft/fog.git
Add SimpleCov and Coveralls.io dependenices
Add rake tasks for travis, which include publishing coverage reports.
This commit is contained in:
Родитель
06deb8554f
Коммит
e42902a266
5
Gemfile
5
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
|
||||
|
|
14
Rakefile
14
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
|
Загрузка…
Ссылка в новой задаче