recurly 2.1.1 → 2.1.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.
- data/README.markdown +2 -2
- data/lib/recurly/api/net_http_adapter.rb +1 -0
- data/lib/recurly/resource.rb +3 -3
- data/lib/recurly/version.rb +1 -1
- data/lib/recurly/xml.rb +3 -5
- metadata +17 -16
data/README.markdown
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.1.
|
15
|
+
gem 'recurly', '~> 2.1.2'
|
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.
|
65
|
+
[here](http://rubydoc.info/gems/recurly/2.1.2/frames).
|
66
66
|
|
67
67
|
|
68
68
|
## Contributing
|
@@ -34,6 +34,7 @@ module Recurly
|
|
34
34
|
def request method, uri, options = {}
|
35
35
|
head = headers.dup
|
36
36
|
head.update options[:head] if options[:head]
|
37
|
+
head.delete_if { |_, value| value.nil? }
|
37
38
|
uri = base_uri + uri
|
38
39
|
if options[:params] && !options[:params].empty?
|
39
40
|
uri += "?#{options[:params].map { |k, v| "#{k}=#{v}" }.join '&' }"
|
data/lib/recurly/resource.rb
CHANGED
@@ -551,7 +551,7 @@ module Recurly
|
|
551
551
|
# @return [self] Reloads the record from the server.
|
552
552
|
def reload response = nil
|
553
553
|
if response
|
554
|
-
return if response.body.length.zero?
|
554
|
+
return if response.body.to_s.length.zero?
|
555
555
|
fresh = self.class.from_response response
|
556
556
|
else
|
557
557
|
fresh = self.class.find(
|
@@ -632,7 +632,7 @@ module Recurly
|
|
632
632
|
def read_attribute key
|
633
633
|
value = attributes[key = key.to_s]
|
634
634
|
if value.respond_to?(:call) && self.class.reflect_on_association(key)
|
635
|
-
value = attributes[key] = value.call
|
635
|
+
value = attributes[key] = value.call
|
636
636
|
end
|
637
637
|
value
|
638
638
|
end
|
@@ -650,7 +650,7 @@ module Recurly
|
|
650
650
|
if changed_attributes.key?(key = key.to_s)
|
651
651
|
changed_attributes.delete key if changed_attributes[key] == value
|
652
652
|
elsif self[key] != value
|
653
|
-
changed_attributes[key] = self[key]
|
653
|
+
changed_attributes[key] = self[key]
|
654
654
|
end
|
655
655
|
|
656
656
|
if self.class.associations.values.flatten.include? key
|
data/lib/recurly/version.rb
CHANGED
data/lib/recurly/xml.rb
CHANGED
@@ -17,11 +17,9 @@ module Recurly
|
|
17
17
|
when 'integer' then el.text.to_i
|
18
18
|
else
|
19
19
|
# FIXME: Move some of this logic to Resource.from_xml?
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
return resource_class.new resource_class.from_xml(el)
|
24
|
-
end
|
20
|
+
resource_name = Helper.classify el.name
|
21
|
+
if Recurly.const_defined? resource_name
|
22
|
+
return Recurly.const_get(resource_name).from_xml el
|
25
23
|
end
|
26
24
|
if el.elements.empty?
|
27
25
|
el.text
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recurly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70210603683580 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.9.2
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70210603683580
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: minitest
|
27
|
-
requirement: &
|
27
|
+
requirement: &70210603683080 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 2.6.1
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70210603683080
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: webmock
|
38
|
-
requirement: &
|
38
|
+
requirement: &70210603682620 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.7.6
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70210603682620
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: guard-minitest
|
49
|
-
requirement: &
|
49
|
+
requirement: &70210603682160 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.4.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70210603682160
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rb-fsevent
|
60
|
-
requirement: &
|
60
|
+
requirement: &70210603681700 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.4.3.1
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70210603681700
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: growl_notify
|
71
|
-
requirement: &
|
71
|
+
requirement: &70210603681240 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: 0.0.1
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70210603681240
|
80
80
|
description: ! 'An API client library for Recurly: http://recurly.com'
|
81
81
|
email: support@recurly.com
|
82
82
|
executables:
|
@@ -114,7 +114,8 @@ files:
|
|
114
114
|
- lib/recurly/xml.rb
|
115
115
|
- lib/recurly.rb
|
116
116
|
- README.markdown
|
117
|
-
-
|
117
|
+
- !binary |-
|
118
|
+
YmluL3JlY3VybHk=
|
118
119
|
homepage: http://github.com/recurly/recurly-client-ruby
|
119
120
|
licenses:
|
120
121
|
- MIT
|
@@ -138,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
139
|
version: '0'
|
139
140
|
requirements: []
|
140
141
|
rubyforge_project:
|
141
|
-
rubygems_version: 1.8.
|
142
|
+
rubygems_version: 1.8.11
|
142
143
|
signing_key:
|
143
144
|
specification_version: 3
|
144
145
|
summary: Recurly API Client
|