percy-client 2.0.2 → 2.0.3

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: cb32f605c7e39943ceeebc882d52885339e064be73030eb027f3d749934a57b8
4
- data.tar.gz: b01052119256ca5704ae42f4f05b32124c1a86877398fe596b8b1e2e0f8d220f
3
+ metadata.gz: b7f0ae58b5e0b062b62efca6980f057de068d21dcfc55fc5bf9f51747fe39e44
4
+ data.tar.gz: 7300c69fe53da51a011d9667e0ea6cf1458c42abe47e094396c624cda503e892
5
5
  SHA512:
6
- metadata.gz: 4f9970b7e41b709a81fb6739190ffc60d9e37152f285a745749c4e9e10b526e919e687db7c2d501bb138bd1875d46cf6baac9ef78f1f83f5b256ac4516d4ab34
7
- data.tar.gz: 614d24dbb43c4e5a26840889b0444ed634c393bcee7ad90c032f01251197a5974c550f6ba66c1bb18401d442afe76711f7c5c0dbfe70236b63b4a300804de873
6
+ metadata.gz: d20288a943cfdef7565ab811efd2bbd66753502240e72f45331e56249c00bcaf51bae0a0311ed3b9117a68a43e5776d5cb66ffa4b415841d2a4c327a5c96b34a
7
+ data.tar.gz: 5968f68b72fb2e8f941922c173a21080bb752f1a3350cc5229ff3a7f622ce81b122ec7d0896bcc8bf6d21ce73ed7983d3fded8077dd9000076bdd78be5a2c56e
@@ -208,7 +208,7 @@ module Percy
208
208
  when :jenkins
209
209
  ENV['BUILD_NUMBER']
210
210
  when :codeship
211
- ENV['CI_BUILD_NUMBER']
211
+ ENV['CI_BUILD_NUMBER'] || ENV['CI_BUILD_ID']
212
212
  when :semaphore
213
213
  "#{ENV['SEMAPHORE_BRANCH_ID']}/#{ENV['SEMAPHORE_BUILD_NUMBER']}"
214
214
  when :buildkite
@@ -1,5 +1,5 @@
1
1
  module Percy
2
2
  class Client
3
- VERSION = '2.0.2'.freeze
3
+ VERSION = '2.0.3'.freeze
4
4
  end
5
5
  end
@@ -39,6 +39,7 @@ RSpec.describe Percy::Client::Environment do
39
39
  ENV['CI_PULL_REQUEST'] = nil
40
40
  ENV['CI_COMMIT_ID'] = nil
41
41
  ENV['CI_BUILD_NUMBER'] = nil
42
+ ENV['CI_BUILD_ID'] = nil
42
43
  ENV['CI_NODE_TOTAL'] = nil
43
44
 
44
45
  # Unset Drone vars.
@@ -307,6 +308,7 @@ RSpec.describe Percy::Client::Environment do
307
308
  ENV['CI_NAME'] = 'codeship'
308
309
  ENV['CI_BRANCH'] = 'codeship-branch'
309
310
  ENV['CI_BUILD_NUMBER'] = 'codeship-build-number'
311
+ ENV['CI_BUILD_ID'] = 'codeship-build-id'
310
312
  ENV['CI_PULL_REQUEST'] = 'false' # This is always false on Codeship, unfortunately.
311
313
  ENV['CI_COMMIT_ID'] = 'codeship-commit-sha'
312
314
  ENV['CI_NODE_TOTAL'] = ''
@@ -331,6 +333,11 @@ RSpec.describe Percy::Client::Environment do
331
333
  expect(Percy::Client::Environment.parallel_nonce).to eq('codeship-build-number')
332
334
  expect(Percy::Client::Environment.parallel_total_shards).to eq(3)
333
335
  end
336
+
337
+ it 'falls back from CI_BUILD_NUMBER to CI_BUILD_ID for CodeShip Pro' do
338
+ ENV['CI_BUILD_NUMBER'] = nil
339
+ expect(Percy::Client::Environment.parallel_nonce).to eq('codeship-build-id')
340
+ end
334
341
  end
335
342
  end
336
343
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: percy-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Perceptual Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-31 00:00:00.000000000 Z
11
+ date: 2019-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday