meilisearch-rails 0.2.0 → 0.2.1

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: 1562941b9f5cf4cb5a13085147f5b9b9ba1b3ea04587f6d1c520239ae5362236
4
- data.tar.gz: 57106ef19a839131d89e45bbb3d01f6aeef6fca623f3d803ade4f63282c2221d
3
+ metadata.gz: e9d980447aeb2f250944f90bb5f4b3d3a9f331dfe05eebe7c60408e728deeaf9
4
+ data.tar.gz: 75bf6d2db221921786720f7563cbe7371b164d223c3af42295bd8716e32005e8
5
5
  SHA512:
6
- metadata.gz: 2d33ff75ad9c5dc9eeab0c602bdfc5fa8f80b1d14d3a025105cf04c7c2e644a1309e68cbff56452eeea5c1801e13fc58d11f8dd529b02bd6ac14e3baf4c30d20
7
- data.tar.gz: 02720ef33a1a0da9cc309f04c24129c87b9f1d885e9d8ff4386ba0873f1aec14e88373bbabe8eae279627a76e573046d4ae445ac1837efffda39b7a458e33fa3
6
+ metadata.gz: f07ded69841b317d70a3cdbbfd266276500b67e415d147bdb620523e203f6ca7a7a1ad10b3460aa2d6827c5417cc24dddc72427815d2fb648cdc48021e96d385
7
+ data.tar.gz: 168f2e51985ba54159565ab4b1eb0f7c205a3e32a61a5bdd8335179c37fe97f89fc25f34580316acae3a7b40df24e898b8a9a270b704da0a7013e1631284aa21
data/README.md CHANGED
@@ -104,8 +104,8 @@ Create a new file `config/initializers/meilisearch.rb` to setup your `MEILISEARC
104
104
 
105
105
  ```ruby
106
106
  MeiliSearch.configuration = {
107
- meilisearch_host: 'YourMeiliSearchHost',
108
- meilisearch_api_key: 'YourMeiliSearchAPIKey',
107
+ meilisearch_host: 'YourMeiliSearchHost',
108
+ meilisearch_api_key: 'YourMeiliSearchAPIKey',
109
109
  }
110
110
  ```
111
111
 
@@ -183,7 +183,21 @@ The **number of hits per page defaults to 20**, you can customize it by adding t
183
183
  Book.search('harry potter', hitsPerPage: 10)
184
184
  ```
185
185
 
186
- ## ⚙️ Settings
186
+ #### Extra Configuration <!-- omit in toc -->
187
+
188
+ Requests made to MeiliSearch may timeout and retry. To adapt the behavior to
189
+ your needs, you can change the parameters during configuration:
190
+
191
+ ```ruby
192
+ MeiliSearch.configuration = {
193
+ meilisearch_host: 'YourMeiliSearchHost',
194
+ meilisearch_api_key: 'YourMeiliSearchAPIKey',
195
+ timeout: 2,
196
+ max_retries: 1,
197
+ }
198
+ ```
199
+
200
+ ## ⚙️ Settings
187
201
 
188
202
  You can configure the index settings by adding them inside the `meilisearch` block as shown below:
189
203
 
@@ -9,7 +9,11 @@ module MeiliSearch
9
9
  end
10
10
 
11
11
  def client
12
- ::MeiliSearch::Client.new(@@configuration[:meilisearch_host], @@configuration[:meilisearch_api_key])
12
+ ::MeiliSearch::Client.new(
13
+ configuration[:meilisearch_host],
14
+ configuration[:meilisearch_api_key],
15
+ configuration.slice(:timeout, :max_retries)
16
+ )
13
17
  end
14
18
  end
15
19
  end
@@ -26,7 +26,7 @@ module MeiliSearch
26
26
  klasses.each do |klass|
27
27
  puts klass
28
28
  puts "Reindexing #{klass.count} records..."
29
- klass.ms_reindex
29
+ klass.ms_reindex!
30
30
  end
31
31
  end
32
32
 
@@ -1,3 +1,3 @@
1
1
  module MeiliSearch
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -41,6 +41,6 @@ Gem::Specification.new do |s|
41
41
  s.licenses = ["MIT"]
42
42
  s.require_paths = ["lib"]
43
43
  s.summary = "MeiliSearch integration for Ruby on Rails."
44
- s.add_dependency(%q<json>, [">= 1.5.1"])
45
- s.add_dependency(%q<meilisearch>, [">= 0.15.3"])
44
+ s.add_dependency("json", [">= 1.5.1"])
45
+ s.add_dependency("meilisearch", [">= 0.15.4"])
46
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meilisearch-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meili
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-24 00:00:00.000000000 Z
11
+ date: 2021-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.15.3
33
+ version: 0.15.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 0.15.3
40
+ version: 0.15.4
41
41
  description: MeiliSearch integration for Ruby on Rails. See https://github.com/meilisearch/MeiliSearch
42
42
  email: bonjour@meilisearch.com
43
43
  executables: []