pagoda-client 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ require 'pagoda-client/apis/database'
13
13
 
14
14
  module Pagoda
15
15
  class Client
16
- VERSION = "0.2.1"
16
+ VERSION = "0.2.2"
17
17
 
18
18
  # Mix ins (cleaner)
19
19
  include Apis::App
@@ -108,25 +108,30 @@ module Pagoda
108
108
  end
109
109
 
110
110
  def symbolize(hash)
111
- new_hash = {}
112
- hash.each do |key,value|
113
- if value.is_a?(Hash)
114
- new_hash[key.to_sym] = symbolize(value)
115
- elsif value.is_a?(Array)
116
- arr = []
117
- value.each do |ele|
118
- if ele.is_a?(Hash)
119
- arr << symbolize(ele)
120
- else
121
- arr << ele
111
+ if hash.is_a?(Hash)
112
+ new_hash = {}
113
+ hash.each do |key,value|
114
+ if value.is_a?(Hash)
115
+ new_hash[key.to_sym] = symbolize(value)
116
+ elsif value.is_a?(Array)
117
+ arr = []
118
+ value.each do |ele|
119
+ if ele.is_a?(Hash)
120
+ arr << symbolize(ele)
121
+ else
122
+ arr << ele
123
+ end
122
124
  end
125
+ new_hash[key.to_sym] = arr
126
+ else
127
+ new_hash[key.to_sym] = value
123
128
  end
124
- new_hash[key.to_sym] = arr
125
- else
126
- new_hash[key.to_sym] = value
127
129
  end
130
+ new_hash
131
+ elsif hash.is_a?(Array)
132
+ arr = []
133
+ hash.map {|hash| symbolize(hash) }
128
134
  end
129
- new_hash
130
135
  end
131
136
 
132
137
  end
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "pagoda-client"
6
- s.version = "0.2.1"
6
+ s.version = "0.2.2"
7
7
  s.authors = ["Lyon"]
8
8
  s.email = ["lyon@pagodabox.com"]
9
9
  s.homepage = "http://www.pagodabox.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagoda-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: