capacity 0.0.2 → 0.0.3
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 +8 -1
- 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.3') 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
@@ -8,7 +8,9 @@ module Capacity
|
|
8
8
|
# setup the local key/value store
|
9
9
|
@data = {}
|
10
10
|
|
11
|
-
|
11
|
+
@status = resp['status']
|
12
|
+
|
13
|
+
if @status != 'OK'
|
12
14
|
# see if there's an error
|
13
15
|
@error = resp['error']
|
14
16
|
else
|
@@ -33,6 +35,11 @@ module Capacity
|
|
33
35
|
@error
|
34
36
|
end
|
35
37
|
|
38
|
+
# returns the status string
|
39
|
+
def status
|
40
|
+
@status
|
41
|
+
end
|
42
|
+
|
36
43
|
# satisfies Enumerable requirements
|
37
44
|
def each
|
38
45
|
@data.each do |k,v|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|