coveralls 0.7.12 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/coveralls/configuration.rb +10 -10
- data/lib/coveralls/version.rb +1 -1
- data/spec/coveralls/configuration_spec.rb +11 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 219c86793eeb9500314dd5e3d82c1005156b902d
|
4
|
+
data.tar.gz: ef35f8c0ea3dc55934d8dc5adbf2ab928cbc374b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a1095dff575e95b96e1a8632eb71cb32d9a0e18929455e26d7a36f50ab0987b0680d440bf1c0be39f46f80fe87727fbcbd92c4d3306a2475b8d82345c6f0853
|
7
|
+
data.tar.gz: 6c45df07a7d00c16b05887357538f0bb8b352a48b21847787b5420732acce04e06e3cc8102a72a5517c3776b4158d59e6754be1d0f991e5470214a63faede217
|
@@ -34,11 +34,11 @@ module Coveralls
|
|
34
34
|
set_service_params_for_tddium(config)
|
35
35
|
elsif ENV['COVERALLS_RUN_LOCALLY'] || Coveralls.testing
|
36
36
|
set_service_params_for_coveralls_local(config)
|
37
|
-
# standardized env vars
|
38
|
-
elsif ENV['CI_NAME']
|
39
|
-
set_service_params_for_generic_ci(config)
|
40
37
|
end
|
41
38
|
|
39
|
+
# standardized env vars
|
40
|
+
set_standard_service_params_for_generic_ci(config)
|
41
|
+
|
42
42
|
config
|
43
43
|
end
|
44
44
|
|
@@ -89,13 +89,13 @@ module Coveralls
|
|
89
89
|
config[:service_event_type] = 'manual'
|
90
90
|
end
|
91
91
|
|
92
|
-
def self.
|
93
|
-
config[:service_name]
|
94
|
-
config[:service_number]
|
95
|
-
config[:service_job_id]
|
96
|
-
config[:service_build_url]
|
97
|
-
config[:service_branch]
|
98
|
-
config[:service_pull_request]
|
92
|
+
def self.set_standard_service_params_for_generic_ci(config)
|
93
|
+
config[:service_name] ||= ENV['CI_NAME']
|
94
|
+
config[:service_number] ||= ENV['CI_BUILD_NUMBER']
|
95
|
+
config[:service_job_id] ||= ENV['CI_JOB_ID']
|
96
|
+
config[:service_build_url] ||= ENV['CI_BUILD_URL']
|
97
|
+
config[:service_branch] ||= ENV['CI_BRANCH']
|
98
|
+
config[:service_pull_request] ||= (ENV['CI_PULL_REQUEST'] || "")[/(\d+)$/,1]
|
99
99
|
end
|
100
100
|
|
101
101
|
def self.yaml_config
|
data/lib/coveralls/version.rb
CHANGED
@@ -66,7 +66,7 @@ describe Coveralls::Configuration do
|
|
66
66
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_semaphore)
|
67
67
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_jenkins)
|
68
68
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_coveralls_local)
|
69
|
-
Coveralls::Configuration.
|
69
|
+
Coveralls::Configuration.should_receive(:set_standard_service_params_for_generic_ci)
|
70
70
|
Coveralls::Configuration.configuration
|
71
71
|
end
|
72
72
|
end
|
@@ -82,7 +82,7 @@ describe Coveralls::Configuration do
|
|
82
82
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_semaphore)
|
83
83
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_jenkins)
|
84
84
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_coveralls_local)
|
85
|
-
Coveralls::Configuration.
|
85
|
+
Coveralls::Configuration.should_receive(:set_standard_service_params_for_generic_ci)
|
86
86
|
Coveralls::Configuration.configuration
|
87
87
|
end
|
88
88
|
end
|
@@ -98,7 +98,7 @@ describe Coveralls::Configuration do
|
|
98
98
|
Coveralls::Configuration.should_receive(:set_service_params_for_semaphore)
|
99
99
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_jenkins)
|
100
100
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_coveralls_local)
|
101
|
-
Coveralls::Configuration.
|
101
|
+
Coveralls::Configuration.should_receive(:set_standard_service_params_for_generic_ci)
|
102
102
|
Coveralls::Configuration.configuration
|
103
103
|
end
|
104
104
|
end
|
@@ -114,7 +114,7 @@ describe Coveralls::Configuration do
|
|
114
114
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_semaphore)
|
115
115
|
Coveralls::Configuration.should_receive(:set_service_params_for_jenkins)
|
116
116
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_coveralls_local)
|
117
|
-
Coveralls::Configuration.
|
117
|
+
Coveralls::Configuration.should_receive(:set_standard_service_params_for_generic_ci)
|
118
118
|
Coveralls::Configuration.configuration
|
119
119
|
end
|
120
120
|
end
|
@@ -130,7 +130,7 @@ describe Coveralls::Configuration do
|
|
130
130
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_semaphore)
|
131
131
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_jenkins)
|
132
132
|
Coveralls::Configuration.should_receive(:set_service_params_for_coveralls_local)
|
133
|
-
Coveralls::Configuration.
|
133
|
+
Coveralls::Configuration.should_receive(:set_standard_service_params_for_generic_ci)
|
134
134
|
Coveralls::Configuration.configuration
|
135
135
|
end
|
136
136
|
end
|
@@ -146,7 +146,7 @@ describe Coveralls::Configuration do
|
|
146
146
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_semaphore)
|
147
147
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_jenkins)
|
148
148
|
Coveralls::Configuration.should_not_receive(:set_service_params_for_coveralls_local)
|
149
|
-
Coveralls::Configuration.should_receive(:
|
149
|
+
Coveralls::Configuration.should_receive(:set_standard_service_params_for_generic_ci).with(anything)
|
150
150
|
Coveralls::Configuration.configuration
|
151
151
|
end
|
152
152
|
end
|
@@ -208,16 +208,20 @@ describe Coveralls::Configuration do
|
|
208
208
|
end
|
209
209
|
|
210
210
|
describe '.set_service_params_for_jenkins' do
|
211
|
+
let(:service_pull_request) { '1234' }
|
211
212
|
let(:build_num) { SecureRandom.hex(4) }
|
212
213
|
before do
|
214
|
+
ENV.stub(:[]).with('CI_PULL_REQUEST').and_return(service_pull_request)
|
213
215
|
ENV.stub(:[]).with('BUILD_NUMBER').and_return(build_num)
|
214
216
|
end
|
215
217
|
|
216
218
|
it 'should set the expected parameters' do
|
217
219
|
config = {}
|
218
220
|
Coveralls::Configuration.set_service_params_for_jenkins(config)
|
221
|
+
Coveralls::Configuration.set_standard_service_params_for_generic_ci(config)
|
219
222
|
config[:service_name].should eq('jenkins')
|
220
223
|
config[:service_number].should eq(build_num)
|
224
|
+
config[:service_pull_request].should eq(service_pull_request)
|
221
225
|
end
|
222
226
|
end
|
223
227
|
|
@@ -248,7 +252,7 @@ describe Coveralls::Configuration do
|
|
248
252
|
|
249
253
|
it 'should set the expected parameters' do
|
250
254
|
config = {}
|
251
|
-
Coveralls::Configuration.
|
255
|
+
Coveralls::Configuration.set_standard_service_params_for_generic_ci(config)
|
252
256
|
config[:service_name].should eq(service_name)
|
253
257
|
config[:service_number].should eq(service_number)
|
254
258
|
config[:service_build_url].should eq(service_build_url)
|
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.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Merwin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-04-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|