spreedly 2.0.26 → 2.0.27

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
  SHA256:
3
- metadata.gz: 4241e7c879a8e9176ed51042a716ba1725874f5d4fa788929775cb09237df89d
4
- data.tar.gz: 84b1c9b35b9574267727e23b1c06e325d8170dcbbc2d761de6fd58e74fbf1a75
3
+ metadata.gz: '03482c0ff755ba3e4e0792be1edfa78100b3fd662daf03d4124c5509b5dd9cda'
4
+ data.tar.gz: cecad9999bea554a379b3b3d9b0c881dd44a0c4a2926be3cec6e4caf67f56cc6
5
5
  SHA512:
6
- metadata.gz: 75e042c324d777daaf5376ec19fd6f4fd504dead642fe571c9fbf3020a3275687ed1738dea120ff26f8bbfc41762d66227d5f56ef0400206dd0e04c8d9bde844
7
- data.tar.gz: f664bd05e797fa1bbda9db56a089c2f6069e7d39af69b7b5f8c282889876d53d7f1aab18f733020ebd417277f6adde6cc3ba0b9dab0578310bc84e851b99897d
6
+ metadata.gz: 253faba99872d14b1ef94d4a03fe3be0de152665da145eac55294e4beb6a3fd827d338f8b43e6454affc7cacc7705a4703b258246a704792ca2da7cf77baa067
7
+ data.tar.gz: 71ac07a96d3e37910b7cf9c609af9ed3859f378e1a270bf6e29bf024c9e511616da4eaff45387362522290eafb1abcee66584a66abd27e3205ec863ae988c2bd
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Changelog
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
+ ## [2.0.27] - 2023-03-27
5
+ ### Changed
6
+ - @jknipp - Add User-Agent header to requests
7
+ - @jknipp - Remove unused options request logic
8
+
4
9
  ## [2.0.26] - 2023-03-24
5
10
  ### Changed
6
11
  - @jknipp - Update the gateway options url to use `GET /v1/gateways_options.xml` instead of `OPTIONS /v1/gateways.xml`
@@ -20,8 +20,6 @@ module Spreedly
20
20
  http.put(endpoint.request_uri, body, headers)
21
21
  when :delete
22
22
  http.delete(endpoint.request_uri, headers)
23
- when :options
24
- http.request(OptionsWithResponseBody.new(endpoint.request_uri, headers))
25
23
  else
26
24
  raise ArgumentError, "Unsupported request method #{method.to_s.upcase}"
27
25
  end
@@ -45,11 +43,5 @@ module Spreedly
45
43
 
46
44
  end
47
45
 
48
- class OptionsWithResponseBody < Net::HTTPRequest
49
- METHOD = 'OPTIONS'
50
- REQUEST_HAS_BODY = false
51
- RESPONSE_HAS_BODY = true
52
- end
53
-
54
46
  end
55
47
 
@@ -166,7 +166,8 @@ module Spreedly
166
166
  def headers
167
167
  {
168
168
  'Authorization' => ('Basic ' + Base64.strict_encode64("#{@key}:#{@access_secret}").chomp),
169
- 'Content-Type' => 'text/xml'
169
+ 'Content-Type' => 'text/xml',
170
+ 'User-Agent' => "spreedly-gem/#{Spreedly::VERSION}"
170
171
  }
171
172
  end
172
173
 
@@ -16,10 +16,6 @@ module Spreedly
16
16
  ssl_request(:put, endpoint, body, headers)
17
17
  end
18
18
 
19
- def ssl_options(endpoint)
20
- ssl_request(:options, endpoint, nil, {})
21
- end
22
-
23
19
  private
24
20
 
25
21
  def ssl_request(method, endpoint, body, headers, options = {})
@@ -1,3 +1,3 @@
1
1
  module Spreedly
2
- VERSION = "2.0.26"
2
+ VERSION = "2.0.27"
3
3
  end
@@ -10,7 +10,7 @@ class RemoteGatewayOptionsTest < Test::Unit::TestCase
10
10
  gateway_classes = @environment.gateway_options
11
11
  braintree = gateway_classes.select { |each| each.name == "Braintree" }.first
12
12
  assert_equal "http://www.braintreepaymentsolutions.com/", braintree.homepage
13
- assert_equal %w(credit_card third_party_token apple_pay android_pay google_pay), braintree.payment_methods
13
+ assert (%w(credit_card third_party_token apple_pay android_pay google_pay) - braintree.payment_methods).empty?
14
14
  assert_equal %w(asia_pacific europe north_america), braintree.regions
15
15
  assert_equal %w(orange blue), braintree.auth_modes.map { |e| e.auth_mode_type }
16
16
  assert_equal %w(login password), braintree.auth_modes.first.credentials.map { |e| e.name }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spreedly
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.26
4
+ version: 2.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spreedly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-28 00:00:00.000000000 Z
11
+ date: 2023-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri