Skip to content

Commit

Permalink
allow for parallel_total_shards of -1 (#35)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ballPointPenguin authored Jul 24, 2018
1 parent e7fca3c commit 9047ae9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RSpec/InstanceVariable:
- spec/lib/percy/client/environment_spec.rb

AllCops:
TargetRubyVersion: 2.1
TargetRubyVersion: 2.2
4 changes: 2 additions & 2 deletions lib/percy/client/builds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/percy/client/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Percy
class Client
VERSION = '1.14.0'.freeze
VERSION = '1.14.1'.freeze
end
end

0 comments on commit 9047ae9

Please sign in to comment.