recurly 2.9.0 → 2.9.1
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 +4 -4
- data/README.md +1 -1
- data/lib/recurly/api.rb +8 -0
- data/lib/recurly/api/net_http_adapter.rb +1 -0
- data/lib/recurly/resource.rb +1 -2
- data/lib/recurly/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 382945e67697e9d83035980b470bb292d35ef6a6
|
4
|
+
data.tar.gz: 5cafbb61ed4b574ab2069c560d33abd5b3cf0e3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8bac175a30affc998d5dcf2b9bf25a71992c15d6a0f6171259aa1051c3bca20fd0e0f33fe3942405da4dfd29f9ff6ab5c023869744c2d9d48f905fc8414fbe7
|
7
|
+
data.tar.gz: ad3ff89f7048cf55cd1590000de0015facd858350b07e705a968fc91c91e594ccf538103d49f3bb5e2c3eba9979799eb31b845f22d54fce53d993674d52af08c
|
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.9.
|
17
|
+
gem 'recurly', '~> 2.9.1'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly/api.rb
CHANGED
@@ -15,6 +15,7 @@ module Recurly
|
|
15
15
|
require 'recurly/api/errors'
|
16
16
|
|
17
17
|
@@base_uri = "https://api.recurly.com/v2/"
|
18
|
+
@@valid_domains = [".recurly.com"]
|
18
19
|
|
19
20
|
RECURLY_API_VERSION = '2.5'
|
20
21
|
|
@@ -75,6 +76,13 @@ module Recurly
|
|
75
76
|
URI.parse @@base_uri.sub('api', Recurly.subdomain)
|
76
77
|
end
|
77
78
|
|
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
|
+
|
78
86
|
# @return [String]
|
79
87
|
def user_agent
|
80
88
|
"Recurly/#{Version}; #{RUBY_DESCRIPTION}"
|
data/lib/recurly/resource.rb
CHANGED
@@ -336,9 +336,8 @@ module Recurly
|
|
336
336
|
raise NotFound, "can't find a record with nil identifier"
|
337
337
|
end
|
338
338
|
|
339
|
-
uri = uuid =~ /^http/ ? uuid : member_path(uuid)
|
340
339
|
begin
|
341
|
-
from_response API.get(
|
340
|
+
from_response API.get(member_path(uuid), {}, options)
|
342
341
|
rescue API::NotFound => e
|
343
342
|
raise NotFound, e.description
|
344
343
|
end
|
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.9.
|
4
|
+
version: 2.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-08 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.6.
|
241
|
+
rubygems_version: 2.6.13
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: Recurly API Client
|