capacity 0.0.3 → 0.0.5
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.
- data.tar.gz.sig +0 -0
- data/Rakefile +1 -1
- data/capacity.gemspec +1 -1
- data/lib/capacity/response.rb +7 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('capacity', '0.0.
|
5
|
+
Echoe.new('capacity', '0.0.5') do |p|
|
6
6
|
p.summary = "Driver for the Capacity API"
|
7
7
|
p.description = 'Not even alpha, not for production use, and not much use to anyone but us at the moment!'
|
8
8
|
p.url = 'http://getcapacity.com/'
|
data/capacity.gemspec
CHANGED
data/lib/capacity/response.rb
CHANGED
@@ -15,11 +15,15 @@ module Capacity
|
|
15
15
|
@error = resp['error']
|
16
16
|
else
|
17
17
|
@error = nil
|
18
|
-
# find
|
18
|
+
# find and convert response data into the local format
|
19
19
|
resp.each do |k,v|
|
20
|
-
if v.is_a?( Hash ) #
|
20
|
+
if v.is_a?( Hash ) # process ye olde hash
|
21
21
|
v.each { |kp,vp| @data[kp.to_sym] = vp } # symbolize keys
|
22
|
-
break
|
22
|
+
break
|
23
|
+
end
|
24
|
+
if v.is_a?( Array ) # we're just an array
|
25
|
+
@data[k.to_sym] = v # symbolize the key
|
26
|
+
break
|
23
27
|
end
|
24
28
|
end
|
25
29
|
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|