waistband 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/waistband/connection.rb +2 -2
- data/lib/waistband/version.rb +1 -1
- metadata +1 -1
data/lib/waistband/connection.rb
CHANGED
@@ -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
|
data/lib/waistband/version.rb
CHANGED