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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31c420172a756993b584da37c042cecb6443efadd0233403dc725762cc54dd19
4
- data.tar.gz: f0b0d7fb3c690979ccf0be344fa0f6882397b4934baeef497bce7088972b264f
3
+ metadata.gz: ad39757c1ba59c95c443c7f7ba5c05904a5cd03211caa828b97392eb3349f4f0
4
+ data.tar.gz: 735b3275f4677bf8c70fdad5e65a32f1dcfcfb9502d338fc2a291b6342c4d80b
5
5
  SHA512:
6
- metadata.gz: a54005348739b5f1b80ee4b8c4535a13b5cd86251c5a7ef0f9a4866ac9dba9d523488dc13fe1fa29c68a193cbcdc8297049f32b5e29ccc2545d4925a633be9fa
7
- data.tar.gz: b47d2d5c427777ec55d41739656a29507d6b34fef1d6077833afdbbeae1a680abf52c5e177afad1afb0d00e71960711882272a1f10c0af131ed2ee2792cb9731
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']
@@ -1,3 +1,3 @@
1
1
  module Coveralls
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -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.1.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-03-22 00:00:00.000000000 Z
12
+ date: 2021-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json