recurly 2.10.5 → 2.11.0
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.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/lib/recurly.rb +0 -18
- data/lib/recurly/api.rb +1 -9
- data/lib/recurly/api/net_http_adapter.rb +0 -1
- data/lib/recurly/purchase.rb +3 -0
- data/lib/recurly/resource.rb +5 -7
- data/lib/recurly/subscription.rb +1 -0
- data/lib/recurly/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 86a4a49660c2a809ff771b6ae267bcdc47d6d915
|
4
|
+
data.tar.gz: 7478ca330dab1ddbfceafd73fca39d4b4dd2a0c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98bf5846b115094c09baf037498a002fa73ba2adab27f2a8e9d46ad81818cf7f4a0d4a8f261dbefd2a09ffadaa882daa00b5c62612b99dd65ee5d7efee54fcc0
|
7
|
+
data.tar.gz: 2d7365c45ffa1459377d275e94c323f4a1d7b0fe85257d3d31651aa734429fdf068049acc83b606cde459f35c845273109c2be83ddf4cc541da24fd9be812572
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ Recurly is packaged as a Ruby gem. We recommend you install it with
|
|
14
14
|
[Bundler](http://gembundler.com/) by adding the following line to your Gemfile:
|
15
15
|
|
16
16
|
``` ruby
|
17
|
-
gem 'recurly', '~> 2.10.
|
17
|
+
gem 'recurly', '~> 2.10.2'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly.rb
CHANGED
@@ -87,8 +87,6 @@ module Recurly
|
|
87
87
|
end
|
88
88
|
|
89
89
|
# Assigns a logger to log requests/responses and more.
|
90
|
-
# The logger can only be set if the environment variable
|
91
|
-
# `RECURLY_INSECURE_DEBUG` equals `true`.
|
92
90
|
#
|
93
91
|
# @return [Logger, nil]
|
94
92
|
# @example
|
@@ -100,22 +98,6 @@ module Recurly
|
|
100
98
|
# Recurly.logger = nil # Or Recurly.logger = Logger.new nil
|
101
99
|
attr_accessor :logger
|
102
100
|
|
103
|
-
def logger=(logger)
|
104
|
-
if ENV['RECURLY_INSECURE_DEBUG'].to_s.downcase == 'true'
|
105
|
-
@logger = logger
|
106
|
-
puts <<-MSG
|
107
|
-
[WARNING] Recurly logger enabled. The logger has the potential to leak
|
108
|
-
PII and should never be used in production environments.
|
109
|
-
MSG
|
110
|
-
else
|
111
|
-
puts <<-MSG
|
112
|
-
[WARNING] Recurly logger has been disabled. If you wish to use it,
|
113
|
-
only do so in a non-production environment and make sure
|
114
|
-
the `RECURLY_INSECURE_DEBUG` environment variable is set to `true`.
|
115
|
-
MSG
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
101
|
# Convenience logging method includes a Logger#progname dynamically.
|
120
102
|
# @return [true, nil]
|
121
103
|
def log level, message
|
data/lib/recurly/api.rb
CHANGED
@@ -15,9 +15,8 @@ module Recurly
|
|
15
15
|
require 'recurly/api/errors'
|
16
16
|
|
17
17
|
@@base_uri = "https://api.recurly.com/v2/"
|
18
|
-
@@valid_domains = [".recurly.com"]
|
19
18
|
|
20
|
-
RECURLY_API_VERSION = '2.
|
19
|
+
RECURLY_API_VERSION = '2.8'
|
21
20
|
|
22
21
|
FORMATS = Helper.hash_with_indifferent_read_access(
|
23
22
|
'pdf' => 'application/pdf',
|
@@ -76,13 +75,6 @@ module Recurly
|
|
76
75
|
URI.parse @@base_uri.sub('api', Recurly.subdomain)
|
77
76
|
end
|
78
77
|
|
79
|
-
def validate_uri!(uri)
|
80
|
-
domain = @@valid_domains.detect { |d| uri.host.end_with?(d) }
|
81
|
-
unless domain
|
82
|
-
raise ArgumentError, "URI #{uri} is invalid. You may only make requests to a Recurly domain."
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
78
|
# @return [String]
|
87
79
|
def user_agent
|
88
80
|
"Recurly/#{Version}; #{RUBY_DESCRIPTION}"
|
data/lib/recurly/purchase.rb
CHANGED
data/lib/recurly/resource.rb
CHANGED
@@ -335,8 +335,9 @@ module Recurly
|
|
335
335
|
raise NotFound, "can't find a record with nil identifier"
|
336
336
|
end
|
337
337
|
|
338
|
+
uri = uuid =~ /^http/ ? uuid : member_path(uuid)
|
338
339
|
begin
|
339
|
-
from_response API.get(
|
340
|
+
from_response API.get(uri, {}, options)
|
340
341
|
rescue API::NotFound => e
|
341
342
|
raise NotFound, e.description
|
342
343
|
end
|
@@ -633,12 +634,9 @@ module Recurly
|
|
633
634
|
return if response.body.to_s.length.zero?
|
634
635
|
fresh = self.class.from_response response
|
635
636
|
else
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
else
|
640
|
-
self.class.find(to_param, options)
|
641
|
-
end
|
637
|
+
fresh = self.class.find(
|
638
|
+
@href || to_param, :etag => (etag unless changed?)
|
639
|
+
)
|
642
640
|
end
|
643
641
|
fresh and copy_from fresh
|
644
642
|
persist! true
|
data/lib/recurly/subscription.rb
CHANGED
data/lib/recurly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recurly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
238
|
version: '0'
|
239
239
|
requirements: []
|
240
240
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.6.13
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: Recurly API Client
|