waistband 0.8.4 → 0.8.5
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.
- 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