recurly 2.7.6 → 2.7.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd9d1d07fa94f9b335fdba85b964b456e154b954
4
- data.tar.gz: b8a84548b0f123d751d51ad7c87b87b9ba3052c7
3
+ metadata.gz: afbc3bb6037d107f1f36c30b255d5e93c238b8bd
4
+ data.tar.gz: e2b014696c8bf5ec21069049f6fb1f1739977c35
5
5
  SHA512:
6
- metadata.gz: ef60058964d67fe8dc0b131131f16da67c8da524d81f327cb29fd48d91d6679450b0c0a4ee930f24118dc9207c0c0b1b6930c30de06c583b56c6937b2e23b578
7
- data.tar.gz: 7742e4683e407f6fb7ec3e69ef769b07aca98e993e81eff176e28a7e0b9b5e9f14774e4a1d0e276812dc3fbe18887bb1a8d97251ff26c388f8faecd0e16713a1
6
+ metadata.gz: 4d6d450dc243d756b7bbbfff5baac7d607c3fbf48057a876bb79eb582b098fd0433139e3c84d89cc8364c4f5b327be99035a81dc93e05d7d5e73edbac24931a1
7
+ data.tar.gz: 0ce64ffb3794adf9ca2ad2ee4d72a5214d461daf265e6cbb65791704a7ccd30bae83764ba589d936e9273153051b95602a7dbc33b48aba561d3da5acac2af1e0
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.7.5'
15
+ gem 'recurly', '~> 2.7.7'
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.4'
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}"
@@ -43,6 +43,7 @@ module Recurly
43
43
  }
44
44
  uri += "?#{pairs.join '&'}"
45
45
  end
46
+ self.validate_uri!(uri)
46
47
  request = METHODS[method].new uri.request_uri, head
47
48
  request.basic_auth(*[Recurly.api_key, nil].flatten[0, 2])
48
49
  if options[:body]
@@ -337,9 +337,8 @@ module Recurly
337
337
  raise NotFound, "can't find a record with nil identifier"
338
338
  end
339
339
 
340
- uri = uuid =~ /^http/ ? uuid : member_path(uuid)
341
340
  begin
342
- from_response API.get(uri, {}, options)
341
+ from_response API.get(member_path(uuid), {}, options)
343
342
  rescue API::NotFound => e
344
343
  raise NotFound, e.description
345
344
  end
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 7
5
- PATCH = 6
5
+ PATCH = 7
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
metadata CHANGED
@@ -1,139 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.6
4
+ version: 2.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-30 00:00:00.000000000 Z
11
+ date: 2017-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.6.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.6.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 11.1.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 11.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 5.8.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 5.8.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: addressable
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 2.4.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.4.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: webmock
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.24.6
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.24.6
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: redcarpet
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: yard
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: racc
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: pry
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  description: 'An API client library for Recurly: http://recurly.com'
@@ -144,18 +144,21 @@ extensions: []
144
144
  extra_rdoc_files:
145
145
  - README.md
146
146
  files:
147
+ - README.md
148
+ - bin/recurly
147
149
  - lib/ecurly.rb
148
150
  - lib/rails/generators/recurly/config_generator.rb
149
151
  - lib/rails/recurly.rb
152
+ - lib/recurly.rb
150
153
  - lib/recurly/account.rb
151
154
  - lib/recurly/account_balance.rb
152
155
  - lib/recurly/add_on.rb
153
156
  - lib/recurly/address.rb
154
157
  - lib/recurly/adjustment.rb
155
158
  - lib/recurly/all.rb
159
+ - lib/recurly/api.rb
156
160
  - lib/recurly/api/errors.rb
157
161
  - lib/recurly/api/net_http_adapter.rb
158
- - lib/recurly/api.rb
159
162
  - lib/recurly/billing_info.rb
160
163
  - lib/recurly/coupon.rb
161
164
  - lib/recurly/delivery.rb
@@ -168,19 +171,20 @@ files:
168
171
  - lib/recurly/money.rb
169
172
  - lib/recurly/plan.rb
170
173
  - lib/recurly/redemption.rb
174
+ - lib/recurly/resource.rb
171
175
  - lib/recurly/resource/association.rb
172
176
  - lib/recurly/resource/errors.rb
173
177
  - lib/recurly/resource/pager.rb
174
- - lib/recurly/resource.rb
175
178
  - lib/recurly/shipping_address.rb
176
- - lib/recurly/subscription/add_ons.rb
177
179
  - lib/recurly/subscription.rb
180
+ - lib/recurly/subscription/add_ons.rb
178
181
  - lib/recurly/subscription_add_on.rb
179
182
  - lib/recurly/tax_detail.rb
180
- - lib/recurly/transaction/errors.rb
181
183
  - lib/recurly/transaction.rb
184
+ - lib/recurly/transaction/errors.rb
182
185
  - lib/recurly/usage.rb
183
186
  - lib/recurly/version.rb
187
+ - lib/recurly/webhook.rb
184
188
  - lib/recurly/webhook/account_notification.rb
185
189
  - lib/recurly/webhook/billing_info_updated_notification.rb
186
190
  - lib/recurly/webhook/canceled_account_notification.rb
@@ -207,38 +211,33 @@ files:
207
211
  - lib/recurly/webhook/transaction_notification.rb
208
212
  - lib/recurly/webhook/updated_subscription_notification.rb
209
213
  - lib/recurly/webhook/void_payment_notification.rb
210
- - lib/recurly/webhook.rb
214
+ - lib/recurly/xml.rb
211
215
  - lib/recurly/xml/nokogiri.rb
212
216
  - lib/recurly/xml/rexml.rb
213
- - lib/recurly/xml.rb
214
- - lib/recurly.rb
215
- - README.md
216
- - bin/recurly
217
217
  homepage: https://github.com/recurly/recurly-client-ruby
218
218
  licenses:
219
219
  - MIT
220
220
  metadata: {}
221
221
  post_install_message:
222
222
  rdoc_options:
223
- - --main
223
+ - "--main"
224
224
  - README.md
225
225
  require_paths:
226
226
  - lib
227
227
  required_ruby_version: !ruby/object:Gem::Requirement
228
228
  requirements:
229
- - - '>='
229
+ - - ">="
230
230
  - !ruby/object:Gem::Version
231
231
  version: 1.9.3
232
232
  required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - '>='
234
+ - - ">="
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
237
  requirements: []
238
238
  rubyforge_project:
239
- rubygems_version: 2.0.14.1
239
+ rubygems_version: 2.6.13
240
240
  signing_key:
241
241
  specification_version: 4
242
242
  summary: Recurly API Client
243
243
  test_files: []
244
- has_rdoc: true