meilisearch-rails 0.8.0 → 0.8.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: cd9b1257d27f252b6dc5caf4dcc3316d6b8e2a026b6266e4aec67eb05106ace0
4
- data.tar.gz: 356acde3b6a894b8a3e8c2e2206c04527b5927968a33030a6f73e0d807f709af
3
+ metadata.gz: 95c22d57895ceb454d6026064d0e27d4f0abcba6cf6e8d30171bde564174bf83
4
+ data.tar.gz: 45e490dae97786d644cbd0c4bd3f63e84d02b7cffc3b4cb1fc5f393c53a61b80
5
5
  SHA512:
6
- metadata.gz: a813264676828158494dd04f5192ab902fd735e3ef0bbc17960b9a8f54fdc581139ec528cd87c0883be6bc96becdce8d455c0055d31b0464f9ba0d53cfbf0751
7
- data.tar.gz: 0b5c4276212a365b038de5492a606be125902bac3bb9417a7cdf279c6e8bccdc146eb84b991b3c8e55928ee99c99510934da0cbbe958813709b6af6725fd7922
6
+ metadata.gz: 9cf32c4a4a74f4c29be2e89ed97fc592de962402001473ddfb0a9cbb8d8c258aec87f2ccca18efce1db338e403065df08159e6f31d96d83060cf0815d2c0c2e6
7
+ data.tar.gz: cdcbc8944ab5be9ddf5e8b60a56620ab843488a8699b81e5df152127d8ce7dab79ab1bfc1430680d3f15b472f121196b248c69fae30c67d9fc405b421da1c010
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  <h4 align="center">
8
8
  <a href="https://github.com/meilisearch/meilisearch">Meilisearch</a> |
9
9
  <a href="https://docs.meilisearch.com">Documentation</a> |
10
- <a href="https://slack.meilisearch.com">Slack</a> |
10
+ <a href="https://discord.meilisearch.com">Discord</a> |
11
11
  <a href="https://roadmap.meilisearch.com/tabs/1-under-consideration">Roadmap</a> |
12
12
  <a href="https://www.meilisearch.com">Website</a> |
13
13
  <a href="https://docs.meilisearch.com/faq">FAQ</a>
@@ -62,7 +62,7 @@ To learn more about Meilisearch, check out our [Documentation](https://docs.meil
62
62
 
63
63
  ## 🤖 Compatibility with Meilisearch
64
64
 
65
- This package only guarantees the compatibility with the [version v0.30.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.30.0).
65
+ This package only guarantees the compatibility with the [version v1.0.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v1.0.0).
66
66
 
67
67
  ## 🔧 Installation <!-- omit in toc -->
68
68
 
@@ -199,6 +199,13 @@ All the supported options are described in the [search parameters](https://docs.
199
199
  ```ruby
200
200
  Book.search('Harry', attributes_to_highlight: ['*'])
201
201
  ```
202
+
203
+ Then it's possible to retrieve the highlighted or cropped value by using the `formatted` method available in the object.
204
+
205
+ ```ruby
206
+ harry_book.formatted # => {"id"=>"1", "name"=>"<em>Harry</em> Potter", "description"=>…
207
+ ```
208
+
202
209
  👉 Don't forget that `attributes_to_highlight`, `attributes_to_crop`, and
203
210
  `crop_length` can be set up in the `meilisearch` block of your model.
204
211
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module MeiliSearch
4
4
  module Rails
5
- VERSION = '0.8.0'
5
+ VERSION = '0.8.1'
6
6
 
7
7
  def self.qualified_version
8
8
  "Meilisearch Rails (v#{VERSION})"
@@ -34,5 +34,5 @@ Gem::Specification.new do |s|
34
34
 
35
35
  s.required_ruby_version = '>= 2.6.0'
36
36
 
37
- s.add_dependency 'meilisearch', '~> 0.21.0'
37
+ s.add_dependency 'meilisearch', '~> 0.22.0'
38
38
  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.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meili
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-01 00:00:00.000000000 Z
11
+ date: 2023-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: meilisearch
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.21.0
19
+ version: 0.22.0
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.21.0
26
+ version: 0.22.0
27
27
  description: Meilisearch integration for Ruby on Rails. See https://github.com/meilisearch/meilisearch
28
28
  email: bonjour@meilisearch.com
29
29
  executables: []