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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '068526c1c6c9f47c815ab2ce81bb39b6b5bb12c3802f3902375c46638d9bfe1f'
4
- data.tar.gz: c67d1ba33bd12157246d23efcca30a70ba35b57c7bad38de6f9b9740773b6ea5
3
+ metadata.gz: d7d49c317408cfd47fe666dd7f21f346f9c107fa01e7505a7c70993c54709681
4
+ data.tar.gz: deeac2295e5afdc0b87c5441c1dc69cd134fae9a3029d2b7eba4d580425b1d6b
5
5
  SHA512:
6
- metadata.gz: 335d9c9ee96a791d29f4dabeae26145386beba2409a0437ebf93511904953ffaf0c3a6275cf7a730c84e7d9a7a5f07a66ed1979eea5551caada60524ba1fa4ee
7
- data.tar.gz: 40aa1f1f55dd9fc2334531e8d1e7b660033031dc8969a67723fd1513b81d368f1bd36b95840d5adb6bcbb998e5d529a75b4fdc92b95f9116953ab2a6ee3909ec
6
+ metadata.gz: 6aa5945c623ed7a407ccda6a2d5b6a7ef4a19697ae08caaa8fbd8198930ac6b2ead9bdd5a8faf958a2b81c44c3a5e1f671567b1cd6c3e04ee26692c370b68ad4
7
+ data.tar.gz: 51b4d954bb4f615026a641fc3dc29bc8e4d381d73a3192866f38289a82a544adcfd2fcd2e8df5ecc1f26df6c89f476624c7ca735507c5c6c4e4c7b4e0e1f5a8c
@@ -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
@@ -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
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MeiliSearch
4
- VERSION = '0.28.0'
4
+ VERSION = '0.28.2'
5
5
 
6
6
  def self.qualified_version
7
7
  "Meilisearch Ruby (v#{VERSION})"
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.0
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-07-01 00:00:00.000000000 Z
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.1
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.1
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: []