percy-client 1.13.4 → 1.13.5

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: ea5367f8b1235063a60b2f8e530b31856eb397cc
4
- data.tar.gz: 452d020054cfcb829c4d3a0d111debd16c72a8d2
3
+ metadata.gz: 2e0d958dccb6268ab3679e448bf45263d1fac005
4
+ data.tar.gz: 2ae421a83b94e20b1bf7c32e2b0e2e980eb1e4e2
5
5
  SHA512:
6
- metadata.gz: 3648ecf2de77ea2965924b8c32d86e3cd3b90ef3b4de8b779b327de4225c373d9bfe5b9cd3952bbcf5eed3686872ae15f4c8ff0ce3f7c3b257fc34c6844a0c53
7
- data.tar.gz: 121adbe5d8e8ac6934c3863cb7fea5d22a29c766dc14517eab2c731de128b4aa572342223f4b4400363f0802001a48c3fccb2673435087c42b521771aa6791b2
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 = _raw_commit_output('HEAD') unless 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.
@@ -1,5 +1,5 @@
1
1
  module Percy
2
2
  class Client
3
- VERSION = '1.13.4'.freeze
3
+ VERSION = '1.13.5'.freeze
4
4
  end
5
5
  end
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 'httpclient', '>= 2.6'
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
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-09-08 00:00:00.000000000 Z
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: httpclient
28
+ name: excon
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '2.6'
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: '2.6'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: addressable
43
43
  requirement: !ruby/object:Gem::Requirement