stripe 1.34.0 → 1.35.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/stripe.rb CHANGED
@@ -72,7 +72,7 @@ module Stripe
72
72
  @max_network_retry_delay = 2
73
73
  @initial_network_retry_delay = 0.5
74
74
 
75
- @ssl_bundle_path = DEFAULT_CA_BUNDLE_PATH
75
+ @ca_bundle_path = DEFAULT_CA_BUNDLE_PATH
76
76
  @verify_ssl_certs = true
77
77
 
78
78
  @open_timeout = 30
@@ -109,7 +109,7 @@ module Stripe
109
109
 
110
110
  if verify_ssl_certs
111
111
  request_opts = {:verify_ssl => OpenSSL::SSL::VERIFY_PEER,
112
- :ssl_ca_file => @ssl_bundle_path}
112
+ :ssl_ca_file => @ca_bundle_path}
113
113
  else
114
114
  request_opts = {:verify_ssl => false}
115
115
  unless @verify_ssl_warned
@@ -145,6 +145,17 @@ module Stripe
145
145
  [parse(response), api_key]
146
146
  end
147
147
 
148
+ # The location of a file containing a bundle of CA certificates. By default
149
+ # the library will use an included bundle that can successfully validate
150
+ # Stripe certificates.
151
+ def self.ca_bundle_path
152
+ @ca_bundle_path
153
+ end
154
+
155
+ def self.ca_bundle_path=(path)
156
+ @ca_bundle_path = path
157
+ end
158
+
148
159
  def self.max_network_retries
149
160
  @max_network_retries || 0
150
161
  end
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = '1.34.0'
2
+ VERSION = '1.35.0'
3
3
  end
data/test/stripe_test.rb CHANGED
@@ -13,4 +13,24 @@ class StripeTest < Test::Unit::TestCase
13
13
  $stderr = old_stderr
14
14
  end
15
15
  end
16
+
17
+ should "allow ca_bundle_path to be configured" do
18
+ begin
19
+ old = Stripe.ca_bundle_path
20
+ Stripe.ca_bundle_path = "path/to/ca/bundle"
21
+ assert_equal "path/to/ca/bundle", Stripe.ca_bundle_path
22
+ ensure
23
+ Stripe.ca_bundle_path = old
24
+ end
25
+ end
26
+
27
+ should "allow max_network_retries to be configured" do
28
+ begin
29
+ old = Stripe.max_network_retries
30
+ Stripe.max_network_retries = 99
31
+ assert_equal 99, Stripe.max_network_retries
32
+ ensure
33
+ Stripe.max_network_retries = old
34
+ end
35
+ end
16
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.34.0
4
+ version: 1.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Boucher
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-25 00:00:00.000000000 Z
12
+ date: 2016-02-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client