meilisearch-rails 0.14.1 → 0.14.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: 24559c8e70fcdaef7392de52e689ed37427c1e87a8981e693f123c8b7348d75a
4
- data.tar.gz: 415f7739643c82925fa54dc3b6a3d2dcf182d66969010fc84d3cf64a9444fc37
3
+ metadata.gz: dab897ac0b83c33721dc40eab5be2d2cc5013c14380a1d47df590f44339433fc
4
+ data.tar.gz: d99e1fd1970915a665a328233df77bf526f0510478fa2087b502a6224e8a2635
5
5
  SHA512:
6
- metadata.gz: ce2015617e15a63f5d9fa39686b92272e83fb70c8ae66144847aa712ac51341ff1f56073006936fb568996105ee45142cedccfb5123befd79a033312efd37173
7
- data.tar.gz: a906f6cc4bb10f6de8c38e19ab4225ffc7a1009517dedf0849972af3a6df50d6518371e66660477a8eb92291266bfea23e5ae135ebc3ca6f611e9e17828a4429
6
+ metadata.gz: 67e71e231498dd94223096fd3bb02a7f79a8861a4a013f3a628ee3141db3436e323df1cd671caeb20937fe39533c558bd540c4eceae6f6b69713a3af8ceb1a93
7
+ data.tar.gz: 23ac15e8d4d42a1af5d9f2c38e84b9e7c810979af2ca8264eb818b80aaaf84d2ad973512857f2c40c0708dee82a6d67ddc2097e542cc71c4e64f7bc1cb72edbe
data/Gemfile CHANGED
@@ -13,17 +13,18 @@ group :development do
13
13
  end
14
14
 
15
15
  group :test do
16
- rails_version = ENV['RAILS_VERSION'] || '6.1'
16
+ rails_version = ENV['RAILS_VERSION'] || '7.1'
17
17
  sequel_version = ENV['SEQUEL_VERSION'] ? "~> #{ENV['SEQUEL_VERSION']}" : '>= 4.0'
18
18
 
19
19
  gem 'active_model_serializers'
20
20
  gem 'rails', "~> #{rails_version}"
21
21
  gem 'sequel', sequel_version
22
22
 
23
- if Gem::Version.new(rails_version) >= Gem::Version.new('6.0')
24
- gem 'sqlite3', '~> 1.4.0', platform: %i[rbx ruby]
23
+ # remove when deprecate rails 6
24
+ if Gem::Version.new(rails_version) >= Gem::Version.new('7.0')
25
+ gem 'sqlite3', '~> 2', platform: %i[rbx ruby]
25
26
  else
26
- gem 'sqlite3', '< 1.4.0', platform: %i[rbx ruby]
27
+ gem 'sqlite3', '< 2', platform: %i[rbx ruby]
27
28
  end
28
29
 
29
30
  gem 'activerecord-jdbc-adapter', platform: :jruby
@@ -33,6 +34,7 @@ group :test do
33
34
  gem 'simplecov', require: 'false'
34
35
  gem 'simplecov-cobertura', require: 'false'
35
36
  gem 'threads'
37
+ gem 'logger'
36
38
 
37
39
  gem 'byebug'
38
40
  gem 'dotenv', '~> 2.7', '>= 2.7.6'
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021-2024 Meili SAS
3
+ Copyright (c) 2021-2025 Meili SAS
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -32,7 +32,6 @@
32
32
  ## Table of Contents <!-- omit in TOC -->
33
33
 
34
34
  - [📖 Documentation](#-documentation)
35
- - [⚡ Supercharge your Meilisearch experience](#-supercharge-your-meilisearch-experience)
36
35
  - [🤖 Compatibility with Meilisearch](#-compatibility-with-meilisearch)
37
36
  - [🚀 Getting started](#-getting-started)
38
37
  - [Compatibility](#-compatibility)
@@ -66,10 +65,6 @@ The whole usage of this gem is detailed in this README.
66
65
 
67
66
  To learn more about Meilisearch, check out our [Documentation](https://www.meilisearch.com/docs/learn/tutorials/getting_started.html) or our [API References](https://www.meilisearch.com/docs/reference/api/).
68
67
 
69
- ## ⚡ Supercharge your Meilisearch experience
70
-
71
- Say goodbye to server deployment and manual updates with [Meilisearch Cloud](https://www.meilisearch.com/pricing?utm_campaign=oss&utm_source=integration&utm_medium=meilisearch-rails). No credit card required.
72
-
73
68
  ## 🤖 Compatibility with Meilisearch
74
69
 
75
70
  This package guarantees compatibility with [version v1.x of Meilisearch](https://github.com/meilisearch/meilisearch/releases/latest), but some features may not be present. Please check the [issues](https://github.com/meilisearch/meilisearch-rails/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3Aenhancement) for more info.
@@ -92,16 +87,9 @@ gem 'meilisearch-rails'
92
87
 
93
88
  ### Run Meilisearch <!-- omit in toc -->
94
89
 
95
- There are many easy ways to [download and run a Meilisearch instance](https://www.meilisearch.com/docs/reference/features/installation.html#download-and-launch).
96
-
97
- For example, if you use Docker:
98
-
99
- ```bash
100
- docker pull getmeili/meilisearch:latest # Fetch the latest version of Meilisearch image from Docker Hub
101
- docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey
102
- ```
90
+ ⚡️ **Launch, scale, and streamline in minutes with Meilisearch Cloud**—no maintenance, no commitment, cancel anytime. [Try it free now](https://cloud.meilisearch.com/login?utm_campaign=oss&utm_source=github&utm_medium=meilisearch-rails).
103
91
 
104
- NB: you can also download Meilisearch from **Homebrew** or **APT**.
92
+ 🪨 Prefer to self-host? [Download and deploy](https://www.meilisearch.com/docs/learn/self_hosted/getting_started_with_self_hosted_meilisearch?utm_campaign=oss&utm_source=github&utm_medium=meilisearch-rails) our fast, open-source search engine on your own infrastructure.
105
93
 
106
94
  ## 🚀 Getting started
107
95
 
@@ -19,13 +19,16 @@ module MeiliSearch
19
19
 
20
20
  def self.create(results, total_hits, options = {})
21
21
  offset = ((options[:page] - 1) * options[:per_page])
22
- array = new results, limit: options[:per_page], offset: offset, total_count: total_hits
22
+ total_hits = 0 if total_hits.nil?
23
+ offset = 0 if offset.nil?
24
+ limit = 0 if options[:per_page].nil?
25
+ array = new results, limit: limit, offset: offset, total_count: total_hits
23
26
 
24
27
  if array.empty? && !results.empty?
25
28
  # since Kaminari 0.16.0, you need to pad the results with nil values so it matches the offset param
26
29
  # otherwise you'll get an empty array: https://github.com/amatsuda/kaminari/commit/29fdcfa8865f2021f710adaedb41b7a7b081e34d
27
30
  results = Array.new(offset) + results
28
- array = new results, offset: offset, limit: options[:per_page], total_count: total_hits
31
+ array = new results, offset: offset, limit: limit, total_count: total_hits
29
32
  end
30
33
 
31
34
  array
@@ -2,7 +2,7 @@
2
2
 
3
3
  module MeiliSearch
4
4
  module Rails
5
- VERSION = '0.14.1'
5
+ VERSION = '0.14.2'
6
6
 
7
7
  def self.qualified_version
8
8
  "Meilisearch Rails (v#{VERSION})"
@@ -34,5 +34,6 @@ Gem::Specification.new do |s|
34
34
 
35
35
  s.required_ruby_version = '>= 3.0.0'
36
36
 
37
- s.add_dependency 'meilisearch', '~> 0.28'
37
+ s.add_dependency 'meilisearch', '~> 0.28.4'
38
+ s.add_dependency 'mutex_m', '~> 0.2'
38
39
  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.14.1
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meili
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-25 00:00:00.000000000 Z
11
+ date: 2025-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: meilisearch
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.28'
19
+ version: 0.28.4
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.28'
26
+ version: 0.28.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: mutex_m
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.2'
27
41
  description: Meilisearch integration for Ruby on Rails. See https://github.com/meilisearch/meilisearch
28
42
  email: bonjour@meilisearch.com
29
43
  executables: []
@@ -58,7 +72,7 @@ homepage: https://github.com/meilisearch/meilisearch-rails
58
72
  licenses:
59
73
  - MIT
60
74
  metadata: {}
61
- post_install_message:
75
+ post_install_message:
62
76
  rdoc_options: []
63
77
  require_paths:
64
78
  - lib
@@ -74,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
88
  version: '0'
75
89
  requirements: []
76
90
  rubygems_version: 3.4.19
77
- signing_key:
91
+ signing_key:
78
92
  specification_version: 4
79
93
  summary: Meilisearch integration for Ruby on Rails.
80
94
  test_files: []