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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b1b083f21f2c8bfb297d77dde590257b12c298b
4
- data.tar.gz: a0d12202dfdb1f42d50614dd7710abb9d91cdbd3
3
+ metadata.gz: ee87bfea103f066eda4d7ac553788e6e23656a16
4
+ data.tar.gz: 7d1c845034ce2600a20fe5d13ec1dea65c2c4160
5
5
  SHA512:
6
- metadata.gz: 8af1fdbfa2d69a73a83cf8fabc7c3e3c610a8ba7d935d1798b447104d1b6475e9d61f2df240a03df3fdb4985940ec94a4494ed762a8ed626ae63eb3b540adda9
7
- data.tar.gz: d3f30c4b6c70885e5f506c9c2b4abad1b76bebc2f7a57d0e0eba034d301d89113b1643403ee15549ee68f7ddd3573004dbdd69dd24ef082290221644ddfedb9c
6
+ metadata.gz: bdbb6a029b5ca50d1d5699b7bb264b1cb7e36f94a1884dd60cc79bbdabc155b200e6869b8064e00ce56581affaee9f8d1f299cc62757d87f03ed1d51a13c7b1f
7
+ data.tar.gz: 770b16ea20ae4c68b040e1b7296621e72fa1c02f48892a950d75b7c3316719c3333c8112465d2db2e4226f02383dde08dda270621e1f66e126a07604fed8e742
@@ -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
- @response.merge!(
64
- strip_nils(status: status, contentType: content_type, body: body, headers: headers)
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
- res = RestClient.get "http://localhost:#{@port}/_vanilli/captures/#{capture_id}"
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
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "vanilli-ruby"
7
- spec.version = "1.2.2"
7
+ spec.version = "1.2.3"
8
8
  spec.authors = ["Alistair Dutton"]
9
9
  spec.email = ["kelveden@gmail.com"]
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanilli-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alistair Dutton