percy-client 1.2.0 → 1.3.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
  SHA1:
3
- metadata.gz: 39f44bba5f92879c17b85967c0c998d7d4534f8e
4
- data.tar.gz: 990653988c289f534ab6b56d473a917598811f94
3
+ metadata.gz: 83fb35f9fc640e3977279f706cfd9f89fc0f9fa0
4
+ data.tar.gz: f10670c00a19ed150df06ef41c679a62f909e7e3
5
5
  SHA512:
6
- metadata.gz: a9a86dc73c3b5770627c037ba22a3ff270552d75066fd859b8accd9f5168d5ea37af51535c810c5f1e364115a4a7f6543bb8aa43332d686dfe3f6f9f6a0f53a7
7
- data.tar.gz: 3db6d975962e40ada2e77086e38ba751ebe7846a8f8d56fd73db1d02d94c957ee111ad0a1636c04ae03e5ae7ee407d1deee2a71609dc15e9461af157c91d9238
6
+ metadata.gz: 1f69fdabc1807da61eaed7cd76b354c1acb21af65a89c68a38c41ad287862d291e0df4bbb7c5510140638243c21a058669d08a4732f9a006aa745d6ff07e740e
7
+ data.tar.gz: 0252cd9c150a9fc37d5095bbe5e400a8b30f56289c502643712e794a20f69d851eb336f4dde434465499f8268e9de00e69272f14188b330276657cdfd7fc4f6d
@@ -171,10 +171,12 @@ module Percy
171
171
  return ENV['PERCY_PARALLEL_NONCE'] if ENV['PERCY_PARALLEL_NONCE']
172
172
 
173
173
  case current_ci
174
- when :circle
175
- ENV['CIRCLE_BUILD_NUM']
176
174
  when :travis
177
175
  ENV['TRAVIS_BUILD_NUMBER']
176
+ when :circle
177
+ ENV['CIRCLE_BUILD_NUM']
178
+ when :codeship
179
+ ENV['CI_BUILD_NUMBER']
178
180
  when :semaphore
179
181
  ENV['SEMAPHORE_BUILD_NUMBER']
180
182
  end
@@ -1,5 +1,5 @@
1
1
  module Percy
2
2
  class Client
3
- VERSION = '1.2.0'
3
+ VERSION = '1.3.0'
4
4
  end
5
5
  end
@@ -37,6 +37,7 @@ RSpec.describe Percy::Client::Environment do
37
37
  ENV['CI_BRANCH'] = nil
38
38
  ENV['CI_PULL_REQUEST'] = nil
39
39
  ENV['CI_COMMIT_ID'] = nil
40
+ ENV['CI_BUILD_NUMBER'] = nil
40
41
 
41
42
  # Unset Drone vars.
42
43
  ENV['CI'] = nil
@@ -317,6 +318,7 @@ RSpec.describe Percy::Client::Environment do
317
318
  before(:each) do
318
319
  ENV['CI_NAME'] = 'codeship'
319
320
  ENV['CI_BRANCH'] = 'codeship-branch'
321
+ ENV['CI_BUILD_NUMBER'] = 'codeship-build-number'
320
322
  ENV['CI_PULL_REQUEST'] = 'false' # This is always false on Codeship, unfortunately.
321
323
  ENV['CI_COMMIT_ID'] = 'codeship-commit-sha'
322
324
  end
@@ -346,6 +348,11 @@ RSpec.describe Percy::Client::Environment do
346
348
  expect(Percy::Client::Environment.repo).to eq('percy/percy-client')
347
349
  end
348
350
  end
351
+ describe '#parallel_nonce' do
352
+ it 'reads from the CI environment (the CI build number)' do
353
+ expect(Percy::Client::Environment.parallel_nonce).to eq('codeship-build-number')
354
+ end
355
+ end
349
356
  end
350
357
  context 'in Drone' do
351
358
  before(:each) do
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: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Perceptual Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
11
+ date: 2015-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday