Permalink
Browse files

Bug fix in Transaprent Post encoding of arrays of addons in protected…

… data hash.
  • Loading branch information...
1 parent ebe5626 commit 1c35ee7cd5309f88c6b9c6e030c5c51f3e23160b @isaachall isaachall committed with Oct 21, 2011
Showing with 9 additions and 2 deletions.
  1. +4 −0 changelog.md
  2. +4 −1 lib/recurly/transparent.rb
  3. +1 −1 lib/recurly/version.rb
View
@@ -1,5 +1,9 @@
= Recurly Ruby Client Library CHANGELOG
+== Version 0.4.15 (October 21, 2011)
+
+- Bug fix in Transparent Post parameter encoding for arrays of add ons.
+
== Version 0.4.14 (September 22, 2011)
- Added alias for Recurly.password to Recurly.api_key for compatibility with Recurly.configure blocks.
@@ -128,13 +128,16 @@ def self.encrypt_string(input_string)
# recursively process the query data (running to_s on values)
def self.process_data(data = {})
+ return data unless data.is_a?(Hash)
data.each do |key, val|
if val.is_a?(Hash)
data[key] = process_data(val)
elsif val.is_a?(String)
data[key] = val.to_s
elsif val.is_a?(Enumerable)
- data[key] = val.map{|i| i.to_s}
+ values = Hash.new
+ val.each_with_index{ |item, index| values[index] = process_data(item) }
+ data[key] = values
else
data[key] = val.to_s
end
View
@@ -1,3 +1,3 @@
module Recurly #:nodoc
- VERSION = "0.4.14"
+ VERSION = "0.4.15"
end

0 comments on commit 1c35ee7

Please sign in to comment.