recurly 2.4.9 → 2.4.10
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 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb529391ad4876854615dc3323e90221dd8ca9bb
|
4
|
+
data.tar.gz: 4c8d6af70a2568e688b2a6925b340a8b11b341cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08e01ffed40fa664c97fbbcd3f00e6757a81ead2a7c80665b935a62ace79206496319c1a35b0caeb4254b8b71f0d4ef79f47f5e68f917c926443851248cb6d3c'
|
7
|
+
data.tar.gz: a133a7f86ff28f1a605ac5214d0b4dc988d774d5d65d4d02b7d11802c08d7018fc3168083956db66868822bab6e3011f398ca1e3d6c2a45a14509a5a7a71c230
|
data/README.md
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.4.
|
15
|
+
gem 'recurly', '~> 2.4.10'
|
16
16
|
```
|
17
17
|
|
18
18
|
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.1'
|
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
@@ -322,9 +322,8 @@ module Recurly
|
|
322
322
|
raise NotFound, "can't find a record with nil identifier"
|
323
323
|
end
|
324
324
|
|
325
|
-
uri = uuid =~ /^http/ ? uuid : member_path(uuid)
|
326
325
|
begin
|
327
|
-
from_response API.get(
|
326
|
+
from_response API.get(member_path(uuid), {}, options)
|
328
327
|
rescue API::NotFound => e
|
329
328
|
raise NotFound, e.description
|
330
329
|
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.4.
|
4
|
+
version: 2.4.10
|
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-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -143,9 +143,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
145
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.
|
146
|
+
rubygems_version: 2.6.13
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Recurly API Client
|
150
150
|
test_files: []
|
151
|
-
has_rdoc: true
|