meilisearch 0.28.1 → 0.28.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/meilisearch/error.rb +9 -0
- data/lib/meilisearch/index.rb +4 -0
- data/lib/meilisearch/version.rb +1 -1
- data/lib/meilisearch.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fb15bd61b76373cf166b4977ef4ccf7598a7aaa9c7eb1ce85f6730a306ee18e
|
4
|
+
data.tar.gz: 7e719a0c3e3bed01c3057f363688e4f5f4e447a72932585d2d9fc4a31006f0f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82b9c0d1d3deb894610ed834ed063f2864fdb19cbea2146a309b4a8ef1bbf21228141a618708da2955fb443f778b1f0799c4768ec5817ca0ea16ddbf547d91bf
|
7
|
+
data.tar.gz: 40fa4e4803ac36dac67f2b588a416f40a60a48ebbfc356686d90f5b2127825f4a4accae56ba150474a0129ad0a40f1f339fb1a764c57122eb891bb03c0513fb5
|
data/lib/meilisearch/error.rb
CHANGED
@@ -70,6 +70,15 @@ module MeiliSearch
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
+
class InvalidDocumentId < Error
|
74
|
+
attr_reader :message
|
75
|
+
|
76
|
+
def initialize(message = nil)
|
77
|
+
@message = "The document id is invalid. #{message}"
|
78
|
+
super(@message)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
73
82
|
module TenantToken
|
74
83
|
class ExpireOrInvalidSignature < MeiliSearch::Error; end
|
75
84
|
class InvalidApiKey < MeiliSearch::Error; end
|
data/lib/meilisearch/index.rb
CHANGED
@@ -220,6 +220,10 @@ module MeiliSearch
|
|
220
220
|
alias delete_multiple_documents! delete_documents!
|
221
221
|
|
222
222
|
def delete_document(document_id)
|
223
|
+
if document_id.nil? || document_id.to_s.empty?
|
224
|
+
raise MeiliSearch::InvalidDocumentId, 'document_id cannot be empty or nil'
|
225
|
+
end
|
226
|
+
|
223
227
|
encode_document = URI.encode_www_form_component(document_id)
|
224
228
|
response = http_delete "/indexes/#{@uid}/documents/#{encode_document}"
|
225
229
|
|
data/lib/meilisearch/version.rb
CHANGED
data/lib/meilisearch.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meilisearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.28.
|
4
|
+
version: 0.28.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meili
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|