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 +4 -4
- data/lib/percy/client/environment.rb +4 -2
- data/lib/percy/client/version.rb +1 -1
- data/spec/lib/percy/client/environment_spec.rb +7 -0
- 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: 83fb35f9fc640e3977279f706cfd9f89fc0f9fa0
|
4
|
+
data.tar.gz: f10670c00a19ed150df06ef41c679a62f909e7e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/percy/client/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|