percy-cli 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/percy/cli/snapshot.rb +1 -0
- data/lib/percy/cli/version.rb +1 -1
- data/spec/percy/cli/snapshot_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: 1c372617fd41cc5c073764a07a2c27f2391c2e87
|
4
|
+
data.tar.gz: 43cf9d232ac1fb459c461943e272cb6e31fc99cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b36debadfd20c92bfb68a92e1981a3fef74f4a447c76faa6e18ed6be88c2fb773d048144e1a81571b34087dc04b3a01d4948643785d3b8ce52008afd6323577a
|
7
|
+
data.tar.gz: da44c53e58b64965aab0d6d70309cd5f7ccd6c4e87069d5fa74f5cf702210184a661d59ea19de3f88540262d242b416a24183f0a898ee9ad517298eff2b34d7d
|
data/lib/percy/cli/snapshot.rb
CHANGED
@@ -101,6 +101,7 @@ module Percy
|
|
101
101
|
begin
|
102
102
|
block.call
|
103
103
|
rescue Percy::Client::ServerError, # Rescue server errors.
|
104
|
+
Percy::Client::UnauthorizedError, # Rescue unauthorized errors (no auth creds setup).
|
104
105
|
Percy::Client::PaymentRequiredError, # Rescue quota exceeded errors.
|
105
106
|
Percy::Client::ConnectionFailed, # Rescue some networking errors.
|
106
107
|
Percy::Client::TimeoutError => e
|
data/lib/percy/cli/version.rb
CHANGED
@@ -41,6 +41,13 @@ RSpec.describe Percy::Cli::Snapshot do
|
|
41
41
|
expect(result).to eq(nil)
|
42
42
|
expect(cli.send(:failed?)).to eq(true)
|
43
43
|
end
|
44
|
+
it 'makes block safe from UnauthorizedError' do
|
45
|
+
result = cli.send(:rescue_connection_failures) do
|
46
|
+
raise Percy::Client::UnauthorizedError.new(401, 'GET', '', '')
|
47
|
+
end
|
48
|
+
expect(result).to eq(nil)
|
49
|
+
expect(cli.send(:failed?)).to eq(true)
|
50
|
+
end
|
44
51
|
it 'makes block safe from TimeoutError' do
|
45
52
|
result = cli.send(:rescue_connection_failures) do
|
46
53
|
raise Percy::Client::TimeoutError
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: percy-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Perceptual Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|