recurly 2.3.8 → 2.3.9
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: 7c3f760be1460b7992dfd4e160ee13fa9a08c147
|
4
|
+
data.tar.gz: e5ff35cb57c309d43b92e55286c5e3388396b36c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab1d12ecb1aad622e9537c18c9ce2c90ded4a49f2a9ceb259d64ebbf038182330d2fec0108093aeca1a7ffef44685cf024c5dd4933140c84b425b7671ef427e8
|
7
|
+
data.tar.gz: 1d3fcdc850fd0f065dc8d2f953ef8fca53c3116d87c06462d44222879998c82d9ce533f72423b66a2e10d994e2ed466002f1e4e9e7d740bf77e6a8b2e1962d14
|
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.3.
|
15
|
+
gem 'recurly', '~> 2.3.9'
|
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
|
FORMATS = Helper.hash_with_indifferent_read_access(
|
20
21
|
'pdf' => 'application/pdf',
|
@@ -73,6 +74,13 @@ module Recurly
|
|
73
74
|
URI.parse @@base_uri.sub('api', Recurly.subdomain)
|
74
75
|
end
|
75
76
|
|
77
|
+
def validate_uri!(uri)
|
78
|
+
domain = @@valid_domains.detect { |d| uri.host.end_with?(d) }
|
79
|
+
unless domain
|
80
|
+
raise ArgumentError, "URI #{uri} is invalid. You may only make requests to a Recurly domain."
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
76
84
|
# @return [String]
|
77
85
|
def user_agent
|
78
86
|
"Recurly/#{Version}; #{RUBY_DESCRIPTION}"
|
data/lib/recurly/resource.rb
CHANGED
@@ -321,9 +321,8 @@ module Recurly
|
|
321
321
|
raise NotFound, "can't find a record with nil identifier"
|
322
322
|
end
|
323
323
|
|
324
|
-
uri = uuid =~ /^http/ ? uuid : member_path(uuid)
|
325
324
|
begin
|
326
|
-
from_response API.get(
|
325
|
+
from_response API.get(member_path(uuid), {}, options)
|
327
326
|
rescue API::NotFound => e
|
328
327
|
raise NotFound, e.description
|
329
328
|
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.3.
|
4
|
+
version: 2.3.9
|
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
|
@@ -117,9 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.6.13
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: Recurly API Client
|
124
124
|
test_files: []
|
125
|
-
has_rdoc: true
|