riot-gear 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/riot/gear/middleware/riotparty.rb +5 -4
- data/lib/riot/gear/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02105d972253f19b54af37e35149d8b468ba65ab
|
4
|
+
data.tar.gz: b762bed40d2664b222219bf0ad402cb8f305afb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 503a045e316f61ba0e42ce782ef4685f7de7aeffec505b699d15fe913e39e78e4edd2c5e5af3443f7405c334283fc6b839a2501ee938b474c5c3d5e7ef378b4f
|
7
|
+
data.tar.gz: 670908263b29103e87e562c06b0b3ce39c74e1899def92e70f25204db9ea7e90dd80fcf0a3fbcd4ab695f427632039ba620886161f01f09258b4eb9b8351e5fd
|
@@ -31,13 +31,14 @@ private
|
|
31
31
|
if topic
|
32
32
|
topic
|
33
33
|
else
|
34
|
-
@saved_responses =
|
34
|
+
@saved_responses = []
|
35
|
+
@named_responses = {}
|
35
36
|
Class.new { include HTTParty }
|
36
37
|
end
|
37
38
|
end
|
38
39
|
|
39
40
|
context.helper(:response) do |name=nil|
|
40
|
-
@saved_responses[name]
|
41
|
+
name.nil? ? @saved_responses.last : @named_responses[name]
|
41
42
|
end
|
42
43
|
end # setup_faux_class
|
43
44
|
|
@@ -92,8 +93,8 @@ private
|
|
92
93
|
path, options = *args
|
93
94
|
end
|
94
95
|
result = topic.__send__(method_name, path, options || {})
|
95
|
-
@saved_responses
|
96
|
-
@
|
96
|
+
@saved_responses += [result]
|
97
|
+
@named_responses[name] = result unless name.nil?
|
97
98
|
end
|
98
99
|
end
|
99
100
|
|
data/lib/riot/gear/version.rb
CHANGED