coveralls 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/coveralls.rb +10 -4
- data/lib/coveralls/configuration.rb +2 -0
- data/lib/coveralls/version.rb +1 -1
- data/spec/coveralls/coveralls_spec.rb +6 -4
- metadata +2 -2
data/lib/coveralls.rb
CHANGED
@@ -8,6 +8,11 @@ require "coveralls/simplecov"
|
|
8
8
|
module Coveralls
|
9
9
|
extend self
|
10
10
|
|
11
|
+
class NilFormatter
|
12
|
+
def format( result )
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
11
16
|
attr_accessor :testing, :noisy, :adapter, :run_locally
|
12
17
|
|
13
18
|
def wear!(simplecov_setting=nil, &block)
|
@@ -18,7 +23,7 @@ module Coveralls
|
|
18
23
|
def wear_merged!(simplecov_setting=nil, &block)
|
19
24
|
require 'simplecov'
|
20
25
|
@@adapter = :simplecov
|
21
|
-
::SimpleCov.formatter =
|
26
|
+
::SimpleCov.formatter = NilFormatter
|
22
27
|
start! simplecov_setting, &block
|
23
28
|
end
|
24
29
|
|
@@ -57,11 +62,12 @@ module Coveralls
|
|
57
62
|
|
58
63
|
if simplecov_setting
|
59
64
|
puts "[Coveralls] Using SimpleCov's '#{simplecov_setting}' settings.".green
|
60
|
-
if
|
65
|
+
if block_given?
|
66
|
+
::SimpleCov.start(simplecov_setting) { instance_eval &block }
|
61
67
|
else
|
62
68
|
::SimpleCov.start(simplecov_setting)
|
63
69
|
end
|
64
|
-
elsif
|
70
|
+
elsif block_given?
|
65
71
|
puts "[Coveralls] Using SimpleCov settings defined in block.".green
|
66
72
|
::SimpleCov.start { instance_eval &block }
|
67
73
|
else
|
@@ -89,4 +95,4 @@ module Coveralls
|
|
89
95
|
def noisy?
|
90
96
|
ENV["COVERALLS_NOISY"] || @noisy
|
91
97
|
end
|
92
|
-
end
|
98
|
+
end
|
@@ -28,6 +28,8 @@ module Coveralls
|
|
28
28
|
elsif ENV['JENKINS_URL']
|
29
29
|
config[:service_name] = 'jenkins'
|
30
30
|
config[:service_number] = ENV['BUILD_NUMBER']
|
31
|
+
elsif ENV['CODESHIP']
|
32
|
+
config[:service_name] = 'codeship'
|
31
33
|
elsif ENV["COVERALLS_RUN_LOCALLY"] || Coveralls.testing
|
32
34
|
config[:service_job_id] = nil
|
33
35
|
config[:service_name] = 'coveralls-ruby'
|
data/lib/coveralls/version.rb
CHANGED
@@ -44,12 +44,14 @@ describe Coveralls do
|
|
44
44
|
end
|
45
45
|
|
46
46
|
describe "#wear_merged!" do
|
47
|
-
it "sets formatter to
|
48
|
-
::SimpleCov.should_receive(:start).with
|
47
|
+
it "sets formatter to NilFormatter" do
|
48
|
+
::SimpleCov.should_receive(:start).with 'rails'
|
49
49
|
silence do
|
50
|
-
subject.wear_merged!
|
50
|
+
subject.wear_merged! 'rails' do
|
51
|
+
add_filter "/spec/"
|
52
|
+
end
|
51
53
|
end
|
52
|
-
::SimpleCov.formatter.should
|
54
|
+
::SimpleCov.formatter.should be Coveralls::NilFormatter
|
53
55
|
end
|
54
56
|
end
|
55
57
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coveralls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-04-
|
13
|
+
date: 2013-04-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|