recurly 2.6.1 → 2.6.2

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: 4c5b83e22ab78dc6ab018b997aa49e62924e16dd
4
- data.tar.gz: f6995514fff1bcb1f57760916664d41bf7cee0b4
3
+ metadata.gz: d5549e7fb104deb12612a8e7648fd307b6e03244
4
+ data.tar.gz: dee8847dbf5764c8cbc74f0eb39588fc2cc37d2e
5
5
  SHA512:
6
- metadata.gz: 6f678aeb84ea1e296ad9a025912898c7c100f9c4618e548eea9f6a29f4fe1a66fc678b6f01d063df3484dd7c9b4e2d665ea447a40d7080509b105d552dc8d8a8
7
- data.tar.gz: 527871a9c478f14e5aabc8356f35a339972a06bec74c251cc7ba3efe492463e11b5553bd4cfe6e628687da7b0038631f8ed4e4ee65522fffbd384dc6962b2cfc
6
+ metadata.gz: a39c5a27b2e179df57364e2ada55c64c42a085db61301c1938b3a56cfc03810514d231093a0f57b4e8b0be2c61e0c65c69c4efd07241f69670254ad07721aba3
7
+ data.tar.gz: f89571f8f9631218ee69cb4565fe6cfc6f7ccf96f07a0499802dc63182f1b9b07ac8f0a980eefbf5b4db1df48cef1d85cd133ccbfefc6ca751fcc975e4224461
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.6.1'
15
+ gem 'recurly', '~> 2.6.2'
16
16
  ```
17
17
 
18
18
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -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.2'
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]
@@ -328,9 +328,8 @@ module Recurly
328
328
  raise NotFound, "can't find a record with nil identifier"
329
329
  end
330
330
 
331
- uri = uuid =~ /^http/ ? uuid : member_path(uuid)
332
331
  begin
333
- from_response API.get(uri, {}, options)
332
+ from_response API.get(member_path(uuid), {}, options)
334
333
  rescue API::NotFound => e
335
334
  raise NotFound, e.description
336
335
  end
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 6
5
- PATCH = 1
5
+ PATCH = 2
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-01 00:00:00.000000000 Z
11
+ date: 2017-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '11.1'
20
20
  type: :development
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: '11.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '5.8'
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: '5.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: webmock
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.24'
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: '1.24'
55
55
  description: 'An API client library for Recurly: http://recurly.com'
@@ -60,17 +60,20 @@ extensions: []
60
60
  extra_rdoc_files:
61
61
  - README.md
62
62
  files:
63
+ - README.md
64
+ - bin/recurly
63
65
  - lib/ecurly.rb
64
66
  - lib/rails/generators/recurly/config_generator.rb
65
67
  - lib/rails/recurly.rb
68
+ - lib/recurly.rb
66
69
  - lib/recurly/account.rb
67
70
  - lib/recurly/add_on.rb
68
71
  - lib/recurly/address.rb
69
72
  - lib/recurly/adjustment.rb
70
73
  - lib/recurly/all.rb
74
+ - lib/recurly/api.rb
71
75
  - lib/recurly/api/errors.rb
72
76
  - lib/recurly/api/net_http_adapter.rb
73
- - lib/recurly/api.rb
74
77
  - lib/recurly/billing_info.rb
75
78
  - lib/recurly/coupon.rb
76
79
  - lib/recurly/error.rb
@@ -81,18 +84,19 @@ files:
81
84
  - lib/recurly/money.rb
82
85
  - lib/recurly/plan.rb
83
86
  - lib/recurly/redemption.rb
87
+ - lib/recurly/resource.rb
84
88
  - lib/recurly/resource/association.rb
85
89
  - lib/recurly/resource/errors.rb
86
90
  - lib/recurly/resource/pager.rb
87
- - lib/recurly/resource.rb
88
- - lib/recurly/subscription/add_ons.rb
89
91
  - lib/recurly/subscription.rb
92
+ - lib/recurly/subscription/add_ons.rb
90
93
  - lib/recurly/subscription_add_on.rb
91
94
  - lib/recurly/tax_detail.rb
92
- - lib/recurly/transaction/errors.rb
93
95
  - lib/recurly/transaction.rb
96
+ - lib/recurly/transaction/errors.rb
94
97
  - lib/recurly/usage.rb
95
98
  - lib/recurly/version.rb
99
+ - lib/recurly/webhook.rb
96
100
  - lib/recurly/webhook/account_notification.rb
97
101
  - lib/recurly/webhook/billing_info_updated_notification.rb
98
102
  - lib/recurly/webhook/canceled_account_notification.rb
@@ -117,38 +121,33 @@ files:
117
121
  - lib/recurly/webhook/transaction_notification.rb
118
122
  - lib/recurly/webhook/updated_subscription_notification.rb
119
123
  - lib/recurly/webhook/void_payment_notification.rb
120
- - lib/recurly/webhook.rb
124
+ - lib/recurly/xml.rb
121
125
  - lib/recurly/xml/nokogiri.rb
122
126
  - lib/recurly/xml/rexml.rb
123
- - lib/recurly/xml.rb
124
- - lib/recurly.rb
125
- - README.md
126
- - bin/recurly
127
127
  homepage: https://github.com/recurly/recurly-client-ruby
128
128
  licenses:
129
129
  - MIT
130
130
  metadata: {}
131
131
  post_install_message:
132
132
  rdoc_options:
133
- - --main
133
+ - "--main"
134
134
  - README.md
135
135
  require_paths:
136
136
  - lib
137
137
  required_ruby_version: !ruby/object:Gem::Requirement
138
138
  requirements:
139
- - - '>='
139
+ - - ">="
140
140
  - !ruby/object:Gem::Version
141
141
  version: 1.9.3
142
142
  required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - '>='
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  requirements: []
148
148
  rubyforge_project:
149
- rubygems_version: 2.0.14.1
149
+ rubygems_version: 2.6.13
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: Recurly API Client
153
153
  test_files: []
154
- has_rdoc: true