Skip to content

Commit

Permalink
Add SimpleCov and Coveralls.io dependenices
Browse files Browse the repository at this point in the history
Add rake tasks for travis, which include publishing coverage reports.
  • Loading branch information
maxlinc committed Jun 18, 2013
1 parent 06deb85 commit e42902a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 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 changes: 14 additions & 0 deletions Rakefile
Expand Up @@ -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")
Expand Down Expand Up @@ -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

0 comments on commit e42902a

Please sign in to comment.