meilisearch-rails 0.5.1 → 0.5.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: 914f91a350294c8909a15781828048a0501cb659f782fb22294e189d8f99c20d
4
- data.tar.gz: c07ab9397326bed33fca52c556730b38adb4aba84df4ba02d784682280c01a12
3
+ metadata.gz: 2541e903db43e95ae8290c07308159dc9d724949dc1ffa27214df3e52cd37fe6
4
+ data.tar.gz: 8b4e32b34e9e3c4fbae0e5c21efa20d87e611ebada16889ba01ba236343b0f6d
5
5
  SHA512:
6
- metadata.gz: 15ce645d1ab372b13af052fea2fdca5a5f9ede5c1f4b11f483ccf3f389bdd21734743c847f858765860fa94f9db02866a09265b710d4068c932242035f203b2c
7
- data.tar.gz: db881fdc4cec5de57c7eb294782c35f8a3494e82f181a52d41000cf7270e3d275a75191799341c72f54e2e87921c1ae55b10a8e621aa2ee63c568405fd04acce
6
+ metadata.gz: 1eba16d0d03695d817998c5249a1ad33d343df4816332a63c7e7b220d42cd2734b9d1ed90e1893a12de6b67d5ed4b1f4e4ca8cad21f3d3e206f8e108f3ffc07f
7
+ data.tar.gz: 53ffa781649f9370e7fe35aa5b7263f8792a7f04ede7c28da6e2f6d85b015ae2fcef236affeea659b11c538385a39ca50fb13dab7857d50e8e76067b813f7dfc
data/Gemfile CHANGED
@@ -1,14 +1,13 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
- gem 'json', '~> 2.5', '>= 2.5.1'
4
- gem 'meilisearch', '~> 0.18.0'
3
+ gemspec
5
4
 
6
5
  gem 'rubysl', '~> 2.0', platform: :rbx if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
7
6
 
8
7
  group :development do
9
- gem 'rubocop', '~> 1.22'
10
- gem 'rubocop-rails'
11
- gem 'rubocop-rspec'
8
+ gem 'rubocop', '1.27.0'
9
+ gem 'rubocop-rails', '2.13.2'
10
+ gem 'rubocop-rspec', '2.9.0'
12
11
  end
13
12
 
14
13
  group :test do
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 Meilisearch
3
+ Copyright (c) 2021-2022 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
@@ -58,7 +58,7 @@ To learn more about Meilisearch, check out our [Documentation](https://docs.meil
58
58
 
59
59
  ## 🤖 Compatibility with Meilisearch
60
60
 
61
- This package only guarantees the compatibility with the [version v0.25.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.25.0).
61
+ This package only guarantees the compatibility with the [version v0.27.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.27.0).
62
62
 
63
63
  ## 🔧 Installation <!-- omit in toc -->
64
64
 
@@ -84,7 +84,7 @@ For example, if you use Docker:
84
84
 
85
85
  ```bash
86
86
  docker pull getmeili/meilisearch:latest # Fetch the latest version of Meilisearch image from Docker Hub
87
- docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey
87
+ docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey
88
88
  ```
89
89
 
90
90
  NB: you can also download Meilisearch from **Homebrew** or **APT**.
@@ -458,16 +458,16 @@ With [**Sidekiq**](https://github.com/mperham/sidekiq):
458
458
  class Book < ActiveRecord::Base
459
459
  include MeiliSearch::Rails
460
460
 
461
- meilisearch enqueue: :trigger_sidekiq_worker do
461
+ meilisearch enqueue: :trigger_sidekiq_job do
462
462
  attribute :title, :author, :description
463
463
  end
464
464
 
465
- def self.trigger_sidekiq_worker(record, remove)
466
- MySidekiqWorker.perform_async(record.id, remove)
465
+ def self.trigger_sidekiq_job(record, remove)
466
+ MySidekiqJob.perform_async(record.id, remove)
467
467
  end
468
468
  end
469
469
 
470
- class MySidekiqWorker
470
+ class MySidekiqJob
471
471
  def perform(id, remove)
472
472
  if remove
473
473
  # The record has likely already been removed from your database so we cannot
@@ -2,6 +2,6 @@
2
2
 
3
3
  module MeiliSearch
4
4
  module Rails
5
- VERSION = '0.5.1'
5
+ VERSION = '0.5.2'
6
6
  end
7
7
  end
@@ -674,6 +674,7 @@ module MeiliSearch
674
674
  [options[:if], options[:unless]].each do |condition|
675
675
  case condition
676
676
  when nil
677
+ return false
677
678
  when String, Symbol
678
679
  return true if ms_attribute_changed?(document, condition)
679
680
  else
@@ -1,19 +1,21 @@
1
- require File.join(File.dirname(__FILE__), 'lib', 'meilisearch', 'rails', 'version')
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
2
3
 
3
- require 'date'
4
+ require 'meilisearch/rails/version'
4
5
 
5
6
  Gem::Specification.new do |s|
6
7
  s.name = 'meilisearch-rails'
7
8
  s.version = MeiliSearch::Rails::VERSION
8
9
 
9
- s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
10
10
  s.authors = ['Meili']
11
- s.description = 'Meilisearch integration for Ruby on Rails. See https://github.com/meilisearch/meilisearch'
12
11
  s.email = 'bonjour@meilisearch.com'
13
- s.homepage = 'http://github.com/meilisearch/meilisearch-rails'
14
- s.licenses = ['MIT']
15
- s.require_paths = ['lib']
12
+
13
+ s.description = 'Meilisearch integration for Ruby on Rails. See https://github.com/meilisearch/meilisearch'
14
+ s.homepage = 'https://github.com/meilisearch/meilisearch-rails'
16
15
  s.summary = 'Meilisearch integration for Ruby on Rails.'
16
+ s.licenses = 'MIT'
17
+
18
+ s.require_paths = ['lib']
17
19
 
18
20
  s.extra_rdoc_files = [
19
21
  'LICENSE',
@@ -31,6 +33,6 @@ Gem::Specification.new do |s|
31
33
  ]
32
34
 
33
35
  s.required_ruby_version = '>= 2.6.0'
34
- s.add_dependency('json', ['>= 1.5.1'])
35
- s.add_dependency('meilisearch', ['>= 0.15.4'])
36
+
37
+ s.add_dependency 'meilisearch', '~> 0.18'
36
38
  end
metadata CHANGED
@@ -1,43 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meilisearch-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meili
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-14 00:00:00.000000000 Z
11
+ date: 2022-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: json
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 1.5.1
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: 1.5.1
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: meilisearch
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
- - - ">="
17
+ - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: 0.15.4
19
+ version: '0.18'
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
- - - ">="
24
+ - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: 0.15.4
26
+ version: '0.18'
41
27
  description: Meilisearch integration for Ruby on Rails. See https://github.com/meilisearch/meilisearch
42
28
  email: bonjour@meilisearch.com
43
29
  executables: []
@@ -63,7 +49,7 @@ files:
63
49
  - lib/meilisearch/rails/utilities.rb
64
50
  - lib/meilisearch/rails/version.rb
65
51
  - meilisearch-rails.gemspec
66
- homepage: http://github.com/meilisearch/meilisearch-rails
52
+ homepage: https://github.com/meilisearch/meilisearch-rails
67
53
  licenses:
68
54
  - MIT
69
55
  metadata: {}