recurly 2.1.2 → 2.1.3

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.

@@ -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.1.2'
15
+ gem 'recurly', '~> 2.1.3'
16
16
  ```
17
17
 
18
18
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -62,7 +62,7 @@ Instructions and examples are available on
62
62
  [Recurly's documentation site](http://docs.recurly.com/api/basics).
63
63
 
64
64
  Recurly's gem API is available
65
- [here](http://rubydoc.info/gems/recurly/2.1.2/frames).
65
+ [here](http://rubydoc.info/gems/recurly/2.1.3/frames).
66
66
 
67
67
 
68
68
  ## Contributing
@@ -73,6 +73,18 @@ module Recurly
73
73
  def log level, message
74
74
  logger.send(level, name) { message }
75
75
  end
76
+
77
+ if RUBY_VERSION <= "1.9.0"
78
+ def const_defined? sym, inherit = false
79
+ raise ArgumentError, "inherit must be false" if inherit
80
+ super sym
81
+ end
82
+
83
+ def const_get sym, inherit = false
84
+ raise ArgumentError, "inherit must be false" if inherit
85
+ super sym
86
+ end
87
+ end
76
88
  end
77
89
  end
78
90
 
@@ -369,8 +369,10 @@ module Recurly
369
369
  xml = XML.new xml
370
370
  if xml.name == member_name
371
371
  record = new
372
- elsif Recurly.const_defined?(class_name = Helper.classify(xml.name))
373
- klass = Recurly.const_get class_name
372
+ elsif Recurly.const_defined?(
373
+ class_name = Helper.classify(xml.name), false
374
+ )
375
+ klass = Recurly.const_get class_name, false
374
376
  record = klass.send :new
375
377
  elsif root = xml.root and root.elements.empty?
376
378
  return XML.cast root
@@ -398,7 +400,7 @@ module Recurly
398
400
 
399
401
  if el.children.empty? && href = el.attribute('href')
400
402
  resource_class = Recurly.const_get(
401
- Helper.classify(el.attribute('type') || el.name)
403
+ Helper.classify(el.attribute('type') || el.name), false
402
404
  )
403
405
  record[el.name] = case el.name
404
406
  when *associations[:has_many]
@@ -464,7 +466,7 @@ module Recurly
464
466
  self::Associations.module_eval {
465
467
  define_method(member_name) { self[member_name] }
466
468
  if options.key?(:readonly) && options[:readonly] == false
467
- associated = Recurly.const_get Helper.classify(member_name)
469
+ associated = Recurly.const_get Helper.classify(member_name), false
468
470
  define_method("#{member_name}=") { |member|
469
471
  associated_uri = "#{path}/#{member_name}"
470
472
  self[member_name] = case member
@@ -946,7 +948,7 @@ module Recurly
946
948
  when Array
947
949
  value.map { |each| fetch_association Helper.singularize(name), each }
948
950
  when Hash
949
- Recurly.const_get(Helper.classify(name)).send :new, value
951
+ Recurly.const_get(Helper.classify(name), false).send :new, value
950
952
  when Proc, Resource, Resource::Pager, nil
951
953
  value
952
954
  else
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 1
5
- PATCH = 2
5
+ PATCH = 3
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
@@ -18,8 +18,8 @@ module Recurly
18
18
  else
19
19
  # FIXME: Move some of this logic to Resource.from_xml?
20
20
  resource_name = Helper.classify el.name
21
- if Recurly.const_defined? resource_name
22
- return Recurly.const_get(resource_name).from_xml el
21
+ if Recurly.const_defined? resource_name, false
22
+ return Recurly.const_get(resource_name, false).from_xml el
23
23
  end
24
24
  if el.elements.empty?
25
25
  el.text
metadata CHANGED
@@ -1,90 +1,129 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
- version: !ruby/object:Gem::Version
4
- version: 2.1.2
3
+ version: !ruby/object:Gem::Version
4
+ hash: 13
5
5
  prerelease:
6
+ segments:
7
+ - 2
8
+ - 1
9
+ - 3
10
+ version: 2.1.3
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Recurly
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-04-19 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-04-24 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
15
22
  name: rake
16
- requirement: &70210603683580 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
17
25
  none: false
18
- requirements:
26
+ requirements:
19
27
  - - ~>
20
- - !ruby/object:Gem::Version
28
+ - !ruby/object:Gem::Version
29
+ hash: 63
30
+ segments:
31
+ - 0
32
+ - 9
33
+ - 2
21
34
  version: 0.9.2
22
35
  type: :development
23
- prerelease: false
24
- version_requirements: *70210603683580
25
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
26
38
  name: minitest
27
- requirement: &70210603683080 !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
28
41
  none: false
29
- requirements:
42
+ requirements:
30
43
  - - ~>
31
- - !ruby/object:Gem::Version
44
+ - !ruby/object:Gem::Version
45
+ hash: 21
46
+ segments:
47
+ - 2
48
+ - 6
49
+ - 1
32
50
  version: 2.6.1
33
51
  type: :development
34
- prerelease: false
35
- version_requirements: *70210603683080
36
- - !ruby/object:Gem::Dependency
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
37
54
  name: webmock
38
- requirement: &70210603682620 !ruby/object:Gem::Requirement
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
39
57
  none: false
40
- requirements:
58
+ requirements:
41
59
  - - ~>
42
- - !ruby/object:Gem::Version
60
+ - !ruby/object:Gem::Version
61
+ hash: 7
62
+ segments:
63
+ - 1
64
+ - 7
65
+ - 6
43
66
  version: 1.7.6
44
67
  type: :development
45
- prerelease: false
46
- version_requirements: *70210603682620
47
- - !ruby/object:Gem::Dependency
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
48
70
  name: guard-minitest
49
- requirement: &70210603682160 !ruby/object:Gem::Requirement
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
50
73
  none: false
51
- requirements:
74
+ requirements:
52
75
  - - ~>
53
- - !ruby/object:Gem::Version
76
+ - !ruby/object:Gem::Version
77
+ hash: 15
78
+ segments:
79
+ - 0
80
+ - 4
81
+ - 0
54
82
  version: 0.4.0
55
83
  type: :development
56
- prerelease: false
57
- version_requirements: *70210603682160
58
- - !ruby/object:Gem::Dependency
84
+ version_requirements: *id004
85
+ - !ruby/object:Gem::Dependency
59
86
  name: rb-fsevent
60
- requirement: &70210603681700 !ruby/object:Gem::Requirement
87
+ prerelease: false
88
+ requirement: &id005 !ruby/object:Gem::Requirement
61
89
  none: false
62
- requirements:
90
+ requirements:
63
91
  - - ~>
64
- - !ruby/object:Gem::Version
92
+ - !ruby/object:Gem::Version
93
+ hash: 97
94
+ segments:
95
+ - 0
96
+ - 4
97
+ - 3
98
+ - 1
65
99
  version: 0.4.3.1
66
100
  type: :development
67
- prerelease: false
68
- version_requirements: *70210603681700
69
- - !ruby/object:Gem::Dependency
101
+ version_requirements: *id005
102
+ - !ruby/object:Gem::Dependency
70
103
  name: growl_notify
71
- requirement: &70210603681240 !ruby/object:Gem::Requirement
104
+ prerelease: false
105
+ requirement: &id006 !ruby/object:Gem::Requirement
72
106
  none: false
73
- requirements:
107
+ requirements:
74
108
  - - ~>
75
- - !ruby/object:Gem::Version
109
+ - !ruby/object:Gem::Version
110
+ hash: 29
111
+ segments:
112
+ - 0
113
+ - 0
114
+ - 1
76
115
  version: 0.0.1
77
116
  type: :development
78
- prerelease: false
79
- version_requirements: *70210603681240
80
- description: ! 'An API client library for Recurly: http://recurly.com'
117
+ version_requirements: *id006
118
+ description: "An API client library for Recurly: http://recurly.com"
81
119
  email: support@recurly.com
82
- executables:
120
+ executables:
83
121
  - recurly
84
122
  extensions: []
85
- extra_rdoc_files:
123
+
124
+ extra_rdoc_files:
86
125
  - README.markdown
87
- files:
126
+ files:
88
127
  - lib/rails/generators/recurly/config_generator.rb
89
128
  - lib/rails/recurly.rb
90
129
  - lib/recurly/account.rb
@@ -114,34 +153,41 @@ files:
114
153
  - lib/recurly/xml.rb
115
154
  - lib/recurly.rb
116
155
  - README.markdown
117
- - !binary |-
118
- YmluL3JlY3VybHk=
156
+ - bin/recurly
157
+ has_rdoc: true
119
158
  homepage: http://github.com/recurly/recurly-client-ruby
120
- licenses:
159
+ licenses:
121
160
  - MIT
122
161
  post_install_message:
123
- rdoc_options:
162
+ rdoc_options:
124
163
  - --main
125
164
  - README.markdown
126
- require_paths:
165
+ require_paths:
127
166
  - lib
128
- required_ruby_version: !ruby/object:Gem::Requirement
167
+ required_ruby_version: !ruby/object:Gem::Requirement
129
168
  none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
134
- required_rubygems_version: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ hash: 3
173
+ segments:
174
+ - 0
175
+ version: "0"
176
+ required_rubygems_version: !ruby/object:Gem::Requirement
135
177
  none: false
136
- requirements:
137
- - - ! '>='
138
- - !ruby/object:Gem::Version
139
- version: '0'
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ hash: 3
182
+ segments:
183
+ - 0
184
+ version: "0"
140
185
  requirements: []
186
+
141
187
  rubyforge_project:
142
- rubygems_version: 1.8.11
188
+ rubygems_version: 1.6.2
143
189
  signing_key:
144
190
  specification_version: 3
145
191
  summary: Recurly API Client
146
192
  test_files: []
147
- has_rdoc: true
193
+