coveralls-ruby 0.1.0 → 0.2.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 +1 -1
- data/lib/coveralls/version.rb +1 -1
- data/spec/coveralls/configuration_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad39757c1ba59c95c443c7f7ba5c05904a5cd03211caa828b97392eb3349f4f0
|
4
|
+
data.tar.gz: 735b3275f4677bf8c70fdad5e65a32f1dcfcfb9502d338fc2a291b6342c4d80b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c72524296472dc8f4915db38a867c53c25818c8d1882a9c662c02dd9d933da261689159b77e5200b3f8f3909e676a034be97e6bb7fc69a8417f836b729528a4
|
7
|
+
data.tar.gz: '009e79e2f0b407e5b2c8ea0024c242fae02a816724b174cd68b6770d75c5abf835ad1a0d2d0f60a1f30d2900aaf43cb8769543c2c607fc3c45dce1f27c561825'
|
@@ -60,7 +60,7 @@ module Coveralls
|
|
60
60
|
|
61
61
|
def self.set_service_params_for_circleci(config)
|
62
62
|
config[:service_name] = 'circleci'
|
63
|
-
config[:service_number] = ENV['CIRCLE_BUILD_NUM']
|
63
|
+
config[:service_number] = ENV['CIRCLE_WORKFLOW_ID'] || ENV['CIRCLE_BUILD_NUM']
|
64
64
|
config[:service_pull_request] = (ENV['CI_PULL_REQUEST'] || "")[/(\d+)$/,1]
|
65
65
|
config[:parallel] = ENV['CIRCLE_NODE_TOTAL'].to_i > 1
|
66
66
|
config[:service_job_number] = ENV['CIRCLE_NODE_INDEX']
|
data/lib/coveralls/version.rb
CHANGED
@@ -207,8 +207,11 @@ describe Coveralls::Configuration do
|
|
207
207
|
|
208
208
|
describe '.set_service_params_for_circleci' do
|
209
209
|
let(:circle_build_num) { SecureRandom.hex(4) }
|
210
|
+
let(:circle_workflow_id) { nil }
|
211
|
+
|
210
212
|
before do
|
211
213
|
ENV.stub(:[]).with('CIRCLE_BUILD_NUM').and_return(circle_build_num)
|
214
|
+
ENV.stub(:[]).with('CIRCLE_WORKFLOW_ID').and_return(circle_workflow_id)
|
212
215
|
end
|
213
216
|
|
214
217
|
it 'should set the expected parameters' do
|
@@ -217,6 +220,17 @@ describe Coveralls::Configuration do
|
|
217
220
|
config[:service_name].should eq('circleci')
|
218
221
|
config[:service_number].should eq(circle_build_num)
|
219
222
|
end
|
223
|
+
|
224
|
+
context 'when workflow_id is available' do
|
225
|
+
let(:circle_workflow_id) { SecureRandom.hex(4) }
|
226
|
+
|
227
|
+
it 'should use workflow ID' do
|
228
|
+
config = {}
|
229
|
+
Coveralls::Configuration.set_service_params_for_circleci(config)
|
230
|
+
config[:service_name].should eq('circleci')
|
231
|
+
config[:service_number].should eq(circle_workflow_id)
|
232
|
+
end
|
233
|
+
end
|
220
234
|
end
|
221
235
|
|
222
236
|
describe '.set_service_params_for_gitlab' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coveralls-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.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: 2021-
|
12
|
+
date: 2021-04-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|