recurly 2.0.9 → 2.0.10
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/bin/recurly +1 -1
- data/lib/recurly/all.rb +20 -0
- data/lib/recurly/helper.rb +4 -2
- data/lib/recurly/resource.rb +26 -0
- data/lib/recurly/subscription/add_ons.rb +1 -0
- data/lib/recurly/subscription.rb +1 -0
- data/lib/recurly/version.rb +1 -1
- data/lib/recurly/xml.rb +1 -4
- 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.0.
|
15
|
+
gem 'recurly', '~> 2.0.10'
|
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.0.
|
65
|
+
[here](http://rubydoc.info/gems/recurly/2.0.10/frames).
|
66
66
|
|
67
67
|
|
68
68
|
## Contributing
|
data/bin/recurly
CHANGED
data/lib/recurly/all.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'recurly'
|
2
|
+
require 'recurly/account'
|
3
|
+
require 'recurly/add_on'
|
4
|
+
require 'recurly/adjustment'
|
5
|
+
require 'recurly/api'
|
6
|
+
require 'recurly/billing_info'
|
7
|
+
require 'recurly/coupon'
|
8
|
+
require 'recurly/helper'
|
9
|
+
require 'recurly/invoice'
|
10
|
+
require 'recurly/js'
|
11
|
+
require 'recurly/money'
|
12
|
+
require 'recurly/plan'
|
13
|
+
require 'recurly/redemption'
|
14
|
+
require 'recurly/resource'
|
15
|
+
require 'recurly/resource/pager'
|
16
|
+
require 'recurly/subscription'
|
17
|
+
require 'recurly/subscription/add_ons'
|
18
|
+
require 'recurly/transaction'
|
19
|
+
require 'recurly/version'
|
20
|
+
require 'recurly/xml'
|
data/lib/recurly/helper.rb
CHANGED
@@ -30,8 +30,10 @@ module Recurly
|
|
30
30
|
word
|
31
31
|
end
|
32
32
|
|
33
|
-
def hash_with_indifferent_read_access
|
34
|
-
Hash.new { |hash, key| hash[key.to_s] if key.is_a? Symbol }
|
33
|
+
def hash_with_indifferent_read_access base = {}
|
34
|
+
indifferent = Hash.new { |hash, key| hash[key.to_s] if key.is_a? Symbol }
|
35
|
+
base.each_pair { |key, value| indifferent[key.to_s] = value }
|
36
|
+
indifferent
|
35
37
|
end
|
36
38
|
|
37
39
|
extend self
|
data/lib/recurly/resource.rb
CHANGED
@@ -845,6 +845,32 @@ module Recurly
|
|
845
845
|
other.is_a?(self.class) && other.to_s == to_s
|
846
846
|
end
|
847
847
|
|
848
|
+
def marshal_dump
|
849
|
+
[
|
850
|
+
@attributes.reject { |k, v| v.is_a? Proc },
|
851
|
+
@new_record,
|
852
|
+
@destroyed,
|
853
|
+
@uri,
|
854
|
+
@href,
|
855
|
+
changed_attributes,
|
856
|
+
previous_changes,
|
857
|
+
etag,
|
858
|
+
response
|
859
|
+
]
|
860
|
+
end
|
861
|
+
|
862
|
+
def marshal_load serialization
|
863
|
+
@attributes,
|
864
|
+
@new_record,
|
865
|
+
@destroyed,
|
866
|
+
@uri,
|
867
|
+
@href,
|
868
|
+
@changed_attributes,
|
869
|
+
@previous_changes,
|
870
|
+
@response,
|
871
|
+
@etag = serialization
|
872
|
+
end
|
873
|
+
|
848
874
|
# @return [String]
|
849
875
|
def inspect attributes = self.class.attribute_names.to_a
|
850
876
|
string = "#<#{self.class}"
|
@@ -27,6 +27,7 @@ module Recurly
|
|
27
27
|
when AddOn then add_on = { :add_on_code => add_on.add_on_code }
|
28
28
|
when String, Symbol then add_on = { :add_on_code => add_on.to_s }
|
29
29
|
end
|
30
|
+
add_on = Helper.hash_with_indifferent_read_access add_on
|
30
31
|
|
31
32
|
exist = @add_ons.find { |a| a[:add_on_code] == add_on[:add_on_code] }
|
32
33
|
if exist
|
data/lib/recurly/subscription.rb
CHANGED
data/lib/recurly/version.rb
CHANGED
data/lib/recurly/xml.rb
CHANGED
@@ -9,10 +9,7 @@ module Recurly
|
|
9
9
|
end
|
10
10
|
|
11
11
|
case type
|
12
|
-
when 'array'
|
13
|
-
el.elements.map { |e|
|
14
|
-
e.elements.empty? ? XML.cast(e) : { e.name => XML.cast(e) }
|
15
|
-
}
|
12
|
+
when 'array' then el.elements.map { |e| XML.cast e }
|
16
13
|
when 'boolean' then el.text == 'true'
|
17
14
|
when 'date' then Date.parse el.text
|
18
15
|
when 'datetime' then DateTime.parse 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.0.
|
4
|
+
version: 2.0.10
|
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: 2011-
|
12
|
+
date: 2011-12-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70198296894000 !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: *70198296894000
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &70198297061820 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.1.pre.10
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70198297061820
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: minitest
|
38
|
-
requirement: &
|
38
|
+
requirement: &70198297061020 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.6.1
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70198297061020
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: webmock
|
49
|
-
requirement: &
|
49
|
+
requirement: &70198297060280 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.7.6
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70198297060280
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: guard-minitest
|
60
|
-
requirement: &
|
60
|
+
requirement: &70198297059360 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.4.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70198297059360
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rb-fsevent
|
71
|
-
requirement: &
|
71
|
+
requirement: &70198297058380 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.4.3.1
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70198297058380
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: growl_notify
|
82
|
-
requirement: &
|
82
|
+
requirement: &70198297057560 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: 0.0.1
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70198297057560
|
91
91
|
description: ! 'An API client library for Recurly: http://recurly.com'
|
92
92
|
email: support@recurly.com
|
93
93
|
executables:
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- lib/recurly/account.rb
|
102
102
|
- lib/recurly/add_on.rb
|
103
103
|
- lib/recurly/adjustment.rb
|
104
|
+
- lib/recurly/all.rb
|
104
105
|
- lib/recurly/api/errors.rb
|
105
106
|
- lib/recurly/api/net_http_adapter.rb
|
106
107
|
- lib/recurly/api.rb
|