meilisearch 0.28.0 → 0.28.2
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
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7d49c317408cfd47fe666dd7f21f346f9c107fa01e7505a7c70993c54709681
|
4
|
+
data.tar.gz: deeac2295e5afdc0b87c5441c1dc69cd134fae9a3029d2b7eba4d580425b1d6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aa5945c623ed7a407ccda6a2d5b6a7ef4a19697ae08caaa8fbd8198930ac6b2ead9bdd5a8faf958a2b81c44c3a5e1f671567b1cd6c3e04ee26692c370b68ad4
|
7
|
+
data.tar.gz: 51b4d954bb4f615026a641fc3dc29bc8e4d381d73a3192866f38289a82a544adcfd2fcd2e8df5ecc1f26df6c89f476624c7ca735507c5c6c4e4c7b4e0e1f5a8c
|
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
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.2
|
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-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.17
|
19
|
+
version: '0.17'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.17
|
26
|
+
version: '0.17'
|
27
27
|
description: An easy-to-use ruby client for Meilisearch API. See https://github.com/meilisearch/meilisearch
|
28
28
|
email: bonjour@meilisearch.com
|
29
29
|
executables: []
|