recurly 2.8.0 → 2.8.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: bda4d35d87900de4ee2353984043bb17a820e507
|
4
|
+
data.tar.gz: 7a7b7268fdd116d01c392b6c31ea5e7cf1911f93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca3ad99fe2627f3056f8b10350fc1a3ea5fe622bd9b54aa3ae0c26272fa1074b059c6a8754575e60d251e2ef99afea74a3046116c769bd7912db6a5dcdd489ca
|
7
|
+
data.tar.gz: 2f91d57d1aefa3f3976482defd961b003e3a5fa6efec57050c9f050e0e3635a7e8485f8febcca8ea9a9f0b4b3be34e4cf66bccf4a00748505011de426717481f
|
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.8.
|
17
|
+
gem 'recurly', '~> 2.8.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.8.
|
4
|
+
version: 2.8.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.
|
241
|
+
rubygems_version: 2.6.13
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: Recurly API Client
|