rack-test-poc 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rack/test/poc.rb +9 -4
- data/test/test_description.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: d6f05e25d699ec3adec988de31c1c15e82644e1f
|
4
|
+
data.tar.gz: 702cd9d4f30b3062c219a284a97b6f8716158f1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bc08029aa3c8c6fd4cea633ec95266a03347463dbd30046bd3c4df1478a2b3b25572a635dd5589d1847a82c67a9cd42f47c9a45933482b4825a94e102a7e49f
|
7
|
+
data.tar.gz: 33aece186ebfc4cdaaec0b346dfae8530021d00e2bf068e83c90b4aec33ff3c5b16622322d5048677ebee6b51a3b14b5b026cb3c681f95e51c7dc2435f585695
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.1
|
data/lib/rack/test/poc.rb
CHANGED
@@ -18,8 +18,7 @@ module RackTestPoc
|
|
18
18
|
|
19
19
|
}.call
|
20
20
|
|
21
|
-
|
22
|
-
RackTestPoc.description_helper(desc_body,self,description_text)
|
21
|
+
RackTestPoc.description_helper(self,description_text)
|
23
22
|
|
24
23
|
nil
|
25
24
|
|
@@ -53,8 +52,8 @@ module RackTestPoc
|
|
53
52
|
end
|
54
53
|
end
|
55
54
|
|
56
|
-
def description_helper(
|
57
|
-
case container
|
55
|
+
def description_helper(object,description_text)
|
56
|
+
case container = RackTestPoc.last_poc['response']['body']['description']
|
58
57
|
|
59
58
|
when Array,Hash
|
60
59
|
desc_comp_search(container,object,description_text)
|
@@ -115,6 +114,12 @@ module RackTestPoc
|
|
115
114
|
|
116
115
|
def process_request(uri, env, *args)
|
117
116
|
|
117
|
+
if RackTestPoc.last_poc && RackTestPoc.last_poc['response']['body']['description']
|
118
|
+
|
119
|
+
RackTestPoc.last_poc['response']['body']['description']
|
120
|
+
|
121
|
+
end
|
122
|
+
|
118
123
|
__init_dump_poc__
|
119
124
|
|
120
125
|
super
|
data/test/test_description.rb
CHANGED
@@ -3,7 +3,7 @@ require 'rack'
|
|
3
3
|
|
4
4
|
class APP
|
5
5
|
def self.call(env)
|
6
|
-
[200, {"Content-Type" => "application/json"}, '{"msg":"Hello Rack!","data":{"key":"value"}}']
|
6
|
+
[200, {"Content-Type" => "application/json"}, '{"msg":"Hello Rack!","data":{"key":"value","key2":"value2"}}']
|
7
7
|
# [200, {"Content-Type" => "text/html"}, 'true']
|
8
8
|
end
|
9
9
|
end
|