capacity 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
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.3') do |p|
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/'
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{capacity}
5
- s.version = "0.0.3"
5
+ s.version = "0.0.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Peat Bakke"]
@@ -15,11 +15,15 @@ module Capacity
15
15
  @error = resp['error']
16
16
  else
17
17
  @error = nil
18
- # find the embedded hash that will contain the response data
18
+ # find and convert response data into the local format
19
19
  resp.each do |k,v|
20
- if v.is_a?( Hash ) # there it is!
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 # stop searching
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
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Peat Bakke
metadata.gz.sig CHANGED
Binary file