percy-client 1.10.1 → 1.11.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: 8c6c5d15e4d9aad29d9ec9f1ff5bf4f551f10caa
4
- data.tar.gz: a177a1b2e91a815ea115b08c28961cc5139cd7f1
3
+ metadata.gz: 534de527720af99352b37a5d0874988c732510e7
4
+ data.tar.gz: e37e54c7ceead61aaa64a72e22a77b8dc6863b1c
5
5
  SHA512:
6
- metadata.gz: 730613e8ca357612b2caa17b1f09837667d6207d964576f42cd8713969436a113395b9c205c030b8619055f0709ea74cfbee1670ddfbe0f803b00e0ae708c1b1
7
- data.tar.gz: aeb0147032f403c4874962b56d7f1782e19cfcc51348bab2e8013e567abc204f94d4eceaf9ebb6612f00a3d2256a8a147efa83eba767a36f7af1502b2f97a4a8
6
+ metadata.gz: 4185a73fbcd468df520eaaff58cfacd988b68d0f38c64e4bd26864650cf03aba8349ca8a9f3b89cd10c5a716beac8bf5ceefa06654065b56ba2938a4f41a3fd0
7
+ data.tar.gz: 30d5f6a43d1399081f41f76b5164f69057de5bb143402ba090a23e5075838734df987cf0be2ff3a50e70e0e8107e166b53745593268be954846a9bf69b670b4e
@@ -0,0 +1,16 @@
1
+ # Releasing
2
+
3
+ 1. Update version.rb file accordingly.
4
+ 1. Tag the release: `git tag vVERSION`
5
+ 1. Push changes: `git push --tags`
6
+ 1. Update the release notes on GitHub.com
7
+ 1. Build and publish:
8
+
9
+ ```bash
10
+ bundle exec rake build
11
+ gem publish pkg/percy-client-1.XX.XX.gem
12
+ ```
13
+
14
+ * Announce the new release,
15
+ making sure to say "thank you" to the contributors
16
+ who helped shape this version!
@@ -218,21 +218,19 @@ module Percy
218
218
  def self.parallel_total_shards
219
219
  return Integer(ENV['PERCY_PARALLEL_TOTAL']) if ENV['PERCY_PARALLEL_TOTAL']
220
220
 
221
- case current_ci
221
+ var = case current_ci
222
222
  when :circle
223
- var = 'CIRCLE_NODE_TOTAL'
224
- Integer(ENV[var]) if ENV[var] && !ENV[var].empty?
223
+ 'CIRCLE_NODE_TOTAL'
225
224
  when :travis
226
- # Support for https://github.com/ArturT/knapsack
227
- var = 'CI_NODE_TOTAL'
228
- Integer(ENV[var]) if ENV[var] && !ENV[var].empty?
225
+ 'CI_NODE_TOTAL'
229
226
  when :codeship
230
- var = 'CI_NODE_TOTAL'
231
- Integer(ENV[var]) if ENV[var] && !ENV[var].empty?
227
+ 'CI_NODE_TOTAL'
232
228
  when :semaphore
233
- var = 'SEMAPHORE_THREAD_COUNT'
234
- Integer(ENV[var]) if ENV[var] && !ENV[var].empty?
229
+ 'SEMAPHORE_THREAD_COUNT'
230
+ when :buildkite
231
+ 'BUILDKITE_PARALLEL_JOB_COUNT'
235
232
  end
233
+ Integer(ENV[var]) if var && ENV[var] && !ENV[var].empty?
236
234
  end
237
235
 
238
236
  # @private
@@ -1,5 +1,5 @@
1
1
  module Percy
2
2
  class Client
3
- VERSION = '1.10.1'.freeze
3
+ VERSION = '1.11.0'.freeze
4
4
  end
5
5
  end
@@ -384,6 +384,7 @@ RSpec.describe Percy::Client::Environment do
384
384
  ENV['BUILDKITE_COMMIT'] = 'buildkite-commit-sha'
385
385
  ENV['BUILDKITE_BRANCH'] = 'buildkite-branch'
386
386
  ENV['BUILDKITE_PULL_REQUEST'] = 'false'
387
+ ENV['BUILDKITE_PARALLEL_JOB_COUNT'] = ''
387
388
  ENV['BUILDKITE_BUILD_ID'] = 'buildkite-build-id'
388
389
  end
389
390
 
@@ -396,6 +397,15 @@ RSpec.describe Percy::Client::Environment do
396
397
  expect(Percy::Client::Environment.parallel_nonce).to eq('buildkite-build-id')
397
398
  expect(Percy::Client::Environment.parallel_total_shards).to be_nil
398
399
  end
400
+ context 'Parallel Build' do
401
+ before(:each) do
402
+ ENV['BUILDKITE_PARALLEL_JOB_COUNT'] = '3'
403
+ end
404
+ it 'has the correct properties' do
405
+ expect(Percy::Client::Environment.parallel_nonce).to eq('buildkite-build-id')
406
+ expect(Percy::Client::Environment.parallel_total_shards).to eq(3)
407
+ end
408
+ end
399
409
  context 'Pull Request build' do
400
410
  before(:each) do
401
411
  ENV['BUILDKITE_PULL_REQUEST'] = '123'
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.10.1
4
+ version: 1.11.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: 2017-04-29 00:00:00.000000000 Z
11
+ date: 2017-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -138,6 +138,7 @@ files:
138
138
  - Guardfile
139
139
  - LICENSE
140
140
  - README.md
141
+ - RELEASING.md
141
142
  - Rakefile
142
143
  - lib/percy.rb
143
144
  - lib/percy/client.rb
@@ -188,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
189
  version: '0'
189
190
  requirements: []
190
191
  rubyforge_project:
191
- rubygems_version: 2.6.7
192
+ rubygems_version: 2.6.3
192
193
  signing_key:
193
194
  specification_version: 4
194
195
  summary: Percy::Client