esse-active_record 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +3 -3
- data/ci/Gemfile.rails-5.2.lock +1 -1
- data/ci/Gemfile.rails-6.0.lock +1 -1
- data/ci/Gemfile.rails-6.1.lock +1 -1
- data/ci/Gemfile.rails-7.0.lock +1 -1
- data/ci/Gemfile.rails-7.1.lock +1 -1
- data/lib/esse/active_record/model.rb +8 -1
- data/lib/esse/active_record/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9927e9810121b26ea8b9288532ce8868326a48388a3ede20afd5722f3d3b8828
|
4
|
+
data.tar.gz: 9851522354c3c42fef276d2f2a84a6b85bf192f5d482f82676861710bdf01828
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: befe01d6e114cdec51fed21dcd4928d0f080a3de13e63879e9db67797518a4a7555d86d98a6175e94587e90c98730528d451aabaa4adc4c96cebb62d60704872
|
7
|
+
data.tar.gz: 00b61f1dbbe7efc9a1ee7b37361b120faa254ccddc4fe40e26411fa075bf27b0de6b8d970b9afae4a9e13b8407b241b434e5a51c125efaad67a4da70afed7bdb
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
esse-active_record (0.3.
|
4
|
+
esse-active_record (0.3.3)
|
5
5
|
activerecord (>= 4.2, < 8)
|
6
6
|
esse (>= 0.3.0)
|
7
7
|
|
@@ -39,7 +39,7 @@ GEM
|
|
39
39
|
elasticsearch-transport (7.17.10)
|
40
40
|
faraday (>= 1, < 3)
|
41
41
|
multi_json
|
42
|
-
esse (0.3.
|
42
|
+
esse (0.3.1)
|
43
43
|
multi_json
|
44
44
|
thor (>= 0.19)
|
45
45
|
esse-rspec (0.0.6)
|
@@ -142,7 +142,7 @@ DEPENDENCIES
|
|
142
142
|
awesome_print
|
143
143
|
dotenv
|
144
144
|
elasticsearch (~> 7.17, >= 7.17.10)
|
145
|
-
esse (~> 0.3.
|
145
|
+
esse (~> 0.3.1)
|
146
146
|
esse-active_record!
|
147
147
|
esse-rspec (~> 0.0.6)
|
148
148
|
pry
|
data/ci/Gemfile.rails-5.2.lock
CHANGED
data/ci/Gemfile.rails-6.0.lock
CHANGED
data/ci/Gemfile.rails-6.1.lock
CHANGED
data/ci/Gemfile.rails-7.0.lock
CHANGED
data/ci/Gemfile.rails-7.1.lock
CHANGED
@@ -14,7 +14,14 @@ module Esse
|
|
14
14
|
|
15
15
|
def esse_callback(index_repo_name, operation_name, on: %i[create update destroy], **options, &block)
|
16
16
|
@esse_callbacks = esse_callbacks.dup
|
17
|
-
|
17
|
+
cb_if = options.delete(:if)
|
18
|
+
cb_unless = options.delete(:unless)
|
19
|
+
if_enabled = -> {
|
20
|
+
(cb_if.nil? || (cb_if.respond_to?(:call) ? instance_exec(&cb_if) : send(cb_if))) &&
|
21
|
+
(cb_unless.nil? || (cb_unless.respond_to?(:call) ? !instance_exec(&cb_unless) : !send(cb_unless))) &&
|
22
|
+
Esse::ActiveRecord::Hooks.enabled?(index_repo_name) &&
|
23
|
+
Esse::ActiveRecord::Hooks.enabled_for_model?(self.class, index_repo_name)
|
24
|
+
}
|
18
25
|
|
19
26
|
Array(on).each do |event|
|
20
27
|
identifier, klass = Esse::ActiveRecord::Callbacks.fetch!(operation_name, event)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esse-active_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos G. Zimmermann
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: esse
|