From 9047ae90c018613d4532a9ac3de8c461f0b2f774 Mon Sep 17 00:00:00 2001 From: Benjamin Rosas Date: Tue, 24 Jul 2018 18:36:27 -0500 Subject: [PATCH] allow for parallel_total_shards of -1 (#35) * allow for parallel_total_shards of -1 * bump TargetRubyVersion for rubocop to 2.2 * allow for parallel_total_shards to be > 1 or exactly -1 * v1.14.1 --- .rubocop.yml | 2 +- lib/percy/client/builds.rb | 4 ++-- lib/percy/client/version.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 3f02b71..b54e4d4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,4 +7,4 @@ RSpec/InstanceVariable: - spec/lib/percy/client/environment_spec.rb AllCops: - TargetRubyVersion: 2.1 + TargetRubyVersion: 2.2 diff --git a/lib/percy/client/builds.rb b/lib/percy/client/builds.rb index fa70442..2d598b1 100644 --- a/lib/percy/client/builds.rb +++ b/lib/percy/client/builds.rb @@ -13,9 +13,9 @@ def create_build(repo, options = {}) parallel_total_shards = options[:parallel_total_shards] \ || Percy::Client::Environment.parallel_total_shards - # Only pass parallelism data if it all exists and there is more than 1 shard. + # Only pass parallelism data if it all exists and there is more than 1, or exactly -1 shard. in_parallel_environment = parallel_nonce && \ - parallel_total_shards && parallel_total_shards > 1 + parallel_total_shards && parallel_total_shards > 1 || parallel_total_shards == -1 unless in_parallel_environment parallel_nonce = nil diff --git a/lib/percy/client/version.rb b/lib/percy/client/version.rb index 484b3b2..86009f3 100644 --- a/lib/percy/client/version.rb +++ b/lib/percy/client/version.rb @@ -1,5 +1,5 @@ module Percy class Client - VERSION = '1.14.0'.freeze + VERSION = '1.14.1'.freeze end end