vanilli-ruby 1.2.2 → 1.2.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.
- checksums.yaml +4 -4
- data/lib/vanilli/client.rb +7 -9
- data/vanilli-ruby.gemspec +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: ee87bfea103f066eda4d7ac553788e6e23656a16
|
4
|
+
data.tar.gz: 7d1c845034ce2600a20fe5d13ec1dea65c2c4160
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdbb6a029b5ca50d1d5699b7bb264b1cb7e36f94a1884dd60cc79bbdabc155b200e6869b8064e00ce56581affaee9f8d1f299cc62757d87f03ed1d51a13c7b1f
|
7
|
+
data.tar.gz: 770b16ea20ae4c68b040e1b7296621e72fa1c02f48892a950d75b7c3316719c3333c8112465d2db2e4226f02383dde08dda270621e1f66e126a07604fed8e742
|
data/lib/vanilli/client.rb
CHANGED
@@ -60,9 +60,9 @@ class VanilliClient
|
|
60
60
|
fail_body_with_no_contenttype(body, content_type)
|
61
61
|
|
62
62
|
@response = stringify_non_json_content(
|
63
|
-
|
64
|
-
|
65
|
-
|
63
|
+
@response.merge!(
|
64
|
+
strip_nils(status: status, contentType: content_type, body: body, headers: headers)
|
65
|
+
)
|
66
66
|
)
|
67
67
|
|
68
68
|
@times = times unless times == :any
|
@@ -180,13 +180,11 @@ class VanilliClient
|
|
180
180
|
# Pulls back details of all requests that were logged against the
|
181
181
|
# specified capture id.
|
182
182
|
def get_captures(capture_id)
|
183
|
-
|
183
|
+
return JSON.parse(RestClient.get "http://localhost:#{@port}/_vanilli/captures/#{capture_id}")
|
184
|
+
|
185
|
+
rescue RestClient::ResourceNotFound
|
186
|
+
return []
|
184
187
|
|
185
|
-
if res.code == 200
|
186
|
-
return JSON.parse res
|
187
|
-
else
|
188
|
-
return []
|
189
|
-
end
|
190
188
|
rescue => e
|
191
189
|
raise e.response
|
192
190
|
end
|
data/vanilli-ruby.gemspec
CHANGED