recurly 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of recurly might be problematic. Click here for more details.
- data/README.markdown +12 -2
- data/lib/recurly/api/net_http_adapter.rb +18 -0
- data/lib/recurly/subscription.rb +1 -1
- data/lib/recurly/version.rb +1 -1
- metadata +3 -3
data/README.markdown
CHANGED
@@ -12,7 +12,7 @@ Recurly is packaged as a Ruby gem. We recommend you install it with
|
|
12
12
|
[Bundler](http://gembundler.com/) by adding the following line to your Gemfile:
|
13
13
|
|
14
14
|
``` ruby
|
15
|
-
gem 'recurly', '~> 2.0.
|
15
|
+
gem 'recurly', '~> 2.0.3'
|
16
16
|
```
|
17
17
|
|
18
18
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
@@ -45,6 +45,16 @@ The default currency is USD. To override with a different code:
|
|
45
45
|
Recurly.default_currency = 'EUR' # Assign nil to disable the default entirely.
|
46
46
|
```
|
47
47
|
|
48
|
+
The client library currently uses a Net::HTTP adapter. If you need to
|
49
|
+
configure the settings passed to Net::HTTP (e.g., an SSL certificates path),
|
50
|
+
make sure you assign them before you make any requests:
|
51
|
+
|
52
|
+
``` ruby
|
53
|
+
Recurly::API.net_http = {
|
54
|
+
:ca_path => "/etc/ssl/certs"
|
55
|
+
}
|
56
|
+
```
|
57
|
+
|
48
58
|
|
49
59
|
## Usage
|
50
60
|
|
@@ -52,7 +62,7 @@ Instructions and examples are available on
|
|
52
62
|
[Recurly's documentation site](http://docs.recurly.com/api/basics).
|
53
63
|
|
54
64
|
Recurly's gem API is available
|
55
|
-
[here](http://rubydoc.info/gems/recurly/2.0.
|
65
|
+
[here](http://rubydoc.info/gems/recurly/2.0.3/frames).
|
56
66
|
|
57
67
|
|
58
68
|
## Contributing
|
@@ -4,6 +4,23 @@ module Recurly
|
|
4
4
|
class API
|
5
5
|
module Net
|
6
6
|
module HTTPAdapter
|
7
|
+
# A hash of Net::HTTP settings configured before the request.
|
8
|
+
#
|
9
|
+
# @return [Hash]
|
10
|
+
def net_http
|
11
|
+
@net_http ||= {}
|
12
|
+
end
|
13
|
+
|
14
|
+
# Used to store any Net::HTTP settings.
|
15
|
+
#
|
16
|
+
# @example
|
17
|
+
# Recurly::API.net_http = {
|
18
|
+
# :verify_mode => OpenSSL::SSL::VERIFY_PEER,
|
19
|
+
# :ca_path => "/etc/ssl/certs",
|
20
|
+
# :ca_file => "/opt/local/share/curl/curl-ca-bundle.crt"
|
21
|
+
# }
|
22
|
+
attr_writer :net_http
|
23
|
+
|
7
24
|
private
|
8
25
|
|
9
26
|
METHODS = {
|
@@ -30,6 +47,7 @@ module Recurly
|
|
30
47
|
end
|
31
48
|
http = ::Net::HTTP.new uri.host, uri.port
|
32
49
|
http.use_ssl = uri.scheme == 'https'
|
50
|
+
net_http.each_pair { |key, value| http.send "#{key}=", value }
|
33
51
|
|
34
52
|
if Recurly.logger
|
35
53
|
Recurly.log :info, "===> %s %s" % [request.method, uri]
|
data/lib/recurly/subscription.rb
CHANGED
data/lib/recurly/version.rb
CHANGED
metadata
CHANGED