waistband 0.8.4 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -138,7 +138,7 @@ module Waistband
138
138
  fetched = execute! 'get', relative_url_for_key(key)
139
139
  parsed = JSON.parse(fetched)
140
140
 
141
- error_with('Key not found', result: parsed, kind: 'KeyMissing') if parsed['exists'] == false
141
+ error_with('Key not found', result: parsed, kind: 'KeyMissing') if (parsed.keys.include?('exists') && parsed['exists'] == false) || (parsed.keys.include?('found') && parsed['found'] == false)
142
142
 
143
143
  parsed['_source'].with_indifferent_access
144
144
  end
@@ -157,7 +157,7 @@ module Waistband
157
157
  fetched = execute! 'delete', relative_url_for_key(key)
158
158
  parsed = JSON.parse(fetched)
159
159
 
160
- error_with('Key not found', result: parsed, kind: 'KeyMissing') if parsed['found'] == false
160
+ error_with('Key not found', result: parsed, kind: 'KeyMissing') if parsed.keys.include?('found') && parsed['found'] == false
161
161
 
162
162
  true
163
163
  end
@@ -1,3 +1,3 @@
1
1
  module Waistband
2
- VERSION = "0.8.4"
2
+ VERSION = "0.8.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waistband
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: