Skip to content

Commit

Permalink
Use Code Climate for coverage
Browse files Browse the repository at this point in the history
Since we will be using Code Climate anyway, it makes sense to use it's
code coverage mechanisms as well.
  • Loading branch information
J.R. Garcia committed Nov 6, 2015
1 parent 04b7ee3 commit 7179430
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in fog-vsphere.gemspec
gem 'codeclimate-test-reporter', group: :test, require: nil

gemspec
1 change: 0 additions & 1 deletion fog-vsphere.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'rbvmomi', '~> 1.8'

spec.add_development_dependency 'bundler', '~> 1.10'
spec.add_development_dependency 'coveralls', '~> 0.8'
spec.add_development_dependency 'pry', '~> 0.10'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rubocop', '~> 0.34'
Expand Down
2 changes: 2 additions & 0 deletions gemfiles/Gemfile.1.9.2+
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
source 'https://rubygems.org'

gem 'codeclimate-test-reporter', group: :test, require: nil

gem 'net-ssh', '~> 2.9'
gem 'rubocop', '~> 0.34'

Expand Down
16 changes: 5 additions & 11 deletions tests/helper.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
if ENV['COVERAGE'] == 'true'
require 'coveralls'
require 'simplecov'
SimpleCov.command_name "shindo:#{Process.pid.to_s}"
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
SimpleCov.merge_timeout 3600

Coveralls.wear!
begin
require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start
rescue LoadError => e
$stderr.puts "not recording test coverage: #{e.inspect}"
end

require File.expand_path('../../lib/fog/vsphere', __FILE__)

0 comments on commit 7179430

Please sign in to comment.