capacity 0.0.6 → 0.0.7
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 +2 -19
- metadata +2 -2
- metadata.gz.sig +2 -3
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.7') 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
@@ -1,8 +1,6 @@
|
|
1
1
|
module Capacity
|
2
2
|
|
3
3
|
class Response
|
4
|
-
include Enumerable
|
5
|
-
|
6
4
|
# Expects 'raw' to be a hash, created from the API's JSON response
|
7
5
|
def initialize( raw )
|
8
6
|
# setup the local key/value store
|
@@ -44,21 +42,6 @@ module Capacity
|
|
44
42
|
@status
|
45
43
|
end
|
46
44
|
|
47
|
-
# satisfies Enumerable requirements
|
48
|
-
def each
|
49
|
-
@data.each do |k,v|
|
50
|
-
yield k,v
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def []( key )
|
55
|
-
if key.is_a?( Fixnum )
|
56
|
-
@data[key]
|
57
|
-
else
|
58
|
-
@data[key.to_sym]
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
45
|
def hash?
|
63
46
|
@data.is_a? Hash
|
64
47
|
end
|
@@ -67,8 +50,8 @@ module Capacity
|
|
67
50
|
@data.is_a? Array
|
68
51
|
end
|
69
52
|
|
70
|
-
def
|
71
|
-
@data
|
53
|
+
def data
|
54
|
+
@data
|
72
55
|
end
|
73
56
|
end
|
74
57
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
��
|
2
|
-
|
3
|
-
�.8�in 3�*e������;h�JpE�cB �+)@�@���v0����[��Qޫ��B\��"�*��;�NI�r���T�f��j�kL��BVڮ��P�D�r6�x3�,�]�BQ�"���:~��)��O�c9��,9�,)j�����$iĻ{Q�� eT�^["m0��<d����PѢPX���=&�{
|
1
|
+
=�P�<.�+�w1ワp���8H���«/=M��
|
2
|
+
���9�)���¿k��y�>J��`6���1�o]K��G�pY�i�/�]r���3���:�.U��ݔ�a29�+���)'i#��m�O�c����H��qә�hZj�v|c׆���,p��Գ
|