recurly 2.10.2 → 2.10.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.
- 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 +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2702f8bd8a51679c6d07306c1f72b91ee2c2c5d
|
4
|
+
data.tar.gz: 2e784689bd680743a9e1733528fb9a3cb06404f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9701540fa25472766bbe8b68025c269f93467337e2172bb6f140152136e5817fc6484180fc303bd9ff3ae448e173e5a86dbaa768e1ddf16e60f7629f8f825698
|
7
|
+
data.tar.gz: c55ee71fdc52b69180b71504dbeb225aa8777dbeb5113f4534e546d24647a04ed30bbdf2969f32a7306eca510127702a63ec2b1d31c329dbdd0db557544ac4d9
|
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.3'
|
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.7'
|
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
@@ -335,9 +335,8 @@ 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)
|
339
338
|
begin
|
340
|
-
from_response API.get(
|
339
|
+
from_response API.get(member_path(uuid), {}, options)
|
341
340
|
rescue API::NotFound => e
|
342
341
|
raise NotFound, e.description
|
343
342
|
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.10.
|
4
|
+
version: 2.10.3
|
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
|