recurly 2.0.5 → 2.0.6

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 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.5'
15
+ gem 'recurly', '~> 2.0.6'
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.5/frames).
65
+ [here](http://rubydoc.info/gems/recurly/2.0.6/frames).
66
66
 
67
67
 
68
68
  ## Contributing
@@ -45,6 +45,17 @@ module Recurly
45
45
  raise Invalid, e.message
46
46
  end
47
47
 
48
+ # Reopen an account.
49
+ #
50
+ # @return [true, false] +true+ when successful, +false+ when unable to
51
+ # (e.g., the account is already opwn), and may raise an exception if the
52
+ # attempt fails.
53
+ def reopen
54
+ return false unless self[:reopen]
55
+ reload self[:reopen].call
56
+ true
57
+ end
58
+
48
59
  private
49
60
 
50
61
  def xml_keys
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
- PATCH = 5
5
+ PATCH = 6
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
data/lib/recurly/xml.rb CHANGED
@@ -39,11 +39,11 @@ module Recurly
39
39
  xml.each do |el|
40
40
  el = XML.new el
41
41
  case el.name
42
- when /number/
42
+ when "number"
43
43
  text = el.text
44
44
  last = text[-4, 4]
45
- el.text = "#{text[0, text.length - 4].gsub(/\d/, '*')}#{last}"
46
- when /verification_value/
45
+ el.text = "#{text[0, text.length - 4].to_s.gsub(/\d/, '*')}#{last}"
46
+ when "verification_value"
47
47
  el.text = el.text.gsub(/\d/, '*')
48
48
  end
49
49
  end
@@ -32,7 +32,13 @@ module Recurly
32
32
  end
33
33
 
34
34
  def text xpath = nil
35
- node = root.at_xpath(xpath) and node.text
35
+ if node = (xpath ? root.at_xpath(xpath) : root)
36
+ if node.text?
37
+ node.text
38
+ else
39
+ node.children.each { |e| return e.text if e.text? }
40
+ end
41
+ end
36
42
  end
37
43
 
38
44
  def text= 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.5
4
+ version: 2.0.6
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-11-07 00:00:00.000000000 Z
12
+ date: 2011-11-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70183197314660 !ruby/object:Gem::Requirement
16
+ requirement: &70254031391940 !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: *70183197314660
24
+ version_requirements: *70254031391940
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &70183197313940 !ruby/object:Gem::Requirement
27
+ requirement: &70254031391420 !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: *70183197313940
35
+ version_requirements: *70254031391420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: minitest
38
- requirement: &70183197313440 !ruby/object:Gem::Requirement
38
+ requirement: &70254031390960 !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: *70183197313440
46
+ version_requirements: *70254031390960
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: webmock
49
- requirement: &70183197312820 !ruby/object:Gem::Requirement
49
+ requirement: &70254031390500 !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: *70183197312820
57
+ version_requirements: *70254031390500
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: guard-minitest
60
- requirement: &70183197312160 !ruby/object:Gem::Requirement
60
+ requirement: &70254031390040 !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: *70183197312160
68
+ version_requirements: *70254031390040
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rb-fsevent
71
- requirement: &70183197311660 !ruby/object:Gem::Requirement
71
+ requirement: &70254031389580 !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: *70183197311660
79
+ version_requirements: *70254031389580
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: growl_notify
82
- requirement: &70183197311200 !ruby/object:Gem::Requirement
82
+ requirement: &70254031389120 !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: *70183197311200
90
+ version_requirements: *70254031389120
91
91
  description: ! 'An API client library for Recurly: http://recurly.com'
92
92
  email: support@recurly.com
93
93
  executables: