percy-client 1.13.4 → 1.13.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/percy/client/connection.rb +1 -12
- data/lib/percy/client/environment.rb +1 -1
- data/lib/percy/client/version.rb +1 -1
- data/percy-client.gemspec +1 -1
- data/spec/lib/percy/client/connection_spec.rb +0 -6
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e0d958dccb6268ab3679e448bf45263d1fac005
|
4
|
+
data.tar.gz: 2ae421a83b94e20b1bf7c32e2b0e2e980eb1e4e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0918a1918c049d77188323d387f33bbd83a4aa6ed0e947911564732034849e97581e62404f516962ab97a88f3095792ae4fb3683cdd5dad761b0c76d21abb7eb
|
7
|
+
data.tar.gz: 7967e3894498c7d3ee5d2008d011a377369f938bffc936cd856b3025d9a26315dfabfa95a59f8317f5286db7c1d469ea5b24b440cc3bfe5c8d7973aac392d2a2
|
@@ -5,16 +5,6 @@ require 'faraday'
|
|
5
5
|
module Percy
|
6
6
|
class Client
|
7
7
|
module Connection
|
8
|
-
class NoCookiesHTTPClientAdapter < Faraday::Adapter::HTTPClient
|
9
|
-
def client
|
10
|
-
@client ||= ::HTTPClient.new
|
11
|
-
@client.cookie_manager = nil
|
12
|
-
@client.ssl_config.options |= OpenSSL::SSL::OP_NO_SSLv2
|
13
|
-
@client.ssl_config.options |= OpenSSL::SSL::OP_NO_SSLv3
|
14
|
-
@client
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
8
|
class NiceErrorMiddleware < Faraday::Response::Middleware
|
19
9
|
CLIENT_ERROR_STATUS_RANGE = 400...600
|
20
10
|
|
@@ -61,9 +51,8 @@ module Percy
|
|
61
51
|
|
62
52
|
@connection = Faraday.new(url: base_url) do |faraday|
|
63
53
|
faraday.request :token_auth, config.access_token if config.access_token
|
64
|
-
|
65
|
-
faraday.use Percy::Client::Connection::NoCookiesHTTPClientAdapter
|
66
54
|
faraday.use Percy::Client::Connection::NiceErrorMiddleware
|
55
|
+
faraday.adapter :excon
|
67
56
|
end
|
68
57
|
|
69
58
|
@connection
|
@@ -30,7 +30,7 @@ module Percy
|
|
30
30
|
# not be found.
|
31
31
|
def self.commit
|
32
32
|
output = _raw_commit_output(_commit_sha) if _commit_sha
|
33
|
-
output
|
33
|
+
output ||= _raw_commit_output('HEAD')
|
34
34
|
output = output.force_encoding('UTF-8') if output && output.encoding.to_s == 'US-ASCII'
|
35
35
|
|
36
36
|
# Use the specified SHA or, if not given, the parsed SHA at HEAD.
|
data/lib/percy/client/version.rb
CHANGED
data/percy-client.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.add_dependency 'faraday', '>= 0.9'
|
23
|
-
spec.add_dependency '
|
23
|
+
spec.add_dependency 'excon'
|
24
24
|
spec.add_dependency 'addressable'
|
25
25
|
|
26
26
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
@@ -11,12 +11,6 @@ RSpec.describe Percy::Client::Connection do
|
|
11
11
|
let(:ci_name) { 'buildkite' }
|
12
12
|
let(:uri) { "#{Percy.config.api_url}/test" }
|
13
13
|
|
14
|
-
describe '#connection' do
|
15
|
-
it 'disables cookies on faraday httpclient adapter' do
|
16
|
-
expect(Percy.client.connection.builder.app.client.cookie_manager).to be_nil
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
14
|
shared_examples_for 'a connection that sets headers with HTTP method' do |http_method|
|
21
15
|
it 'sets headers' do
|
22
16
|
stub_request(http_method, uri)
|
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.13.
|
4
|
+
version: 1.13.5
|
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-
|
11
|
+
date: 2017-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.9'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: excon
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: addressable
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|