esse-active_record 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +16 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +99 -66
- data/README.md +19 -19
- data/ci/Gemfile.rails-5.2 +10 -0
- data/ci/Gemfile.rails-5.2.lock +160 -0
- data/ci/Gemfile.rails-6.0 +10 -0
- data/ci/Gemfile.rails-6.0.lock +159 -0
- data/ci/Gemfile.rails-6.1 +10 -0
- data/ci/Gemfile.rails-6.1.lock +159 -0
- data/ci/Gemfile.rails-7.0 +10 -0
- data/ci/Gemfile.rails-7.0.lock +159 -0
- data/ci/Gemfile.rails-7.1 +10 -0
- data/ci/Gemfile.rails-7.1.lock +171 -0
- data/lib/esse/active_record/hooks.rb +2 -2
- data/lib/esse/active_record/model.rb +5 -3
- data/lib/esse/active_record/version.rb +1 -1
- metadata +45 -41
@@ -31,7 +31,7 @@ module Esse
|
|
31
31
|
|
32
32
|
esse_index_repos[index_repo_name] ||= {}
|
33
33
|
esse_index_repos[index_repo_name][operation_name] = {
|
34
|
-
record:
|
34
|
+
record: block || -> { self },
|
35
35
|
options: options,
|
36
36
|
}
|
37
37
|
|
@@ -45,7 +45,7 @@ module Esse
|
|
45
45
|
record = instance_exec(&record) if record.respond_to?(:call)
|
46
46
|
repo = Esse::ActiveRecord::Hooks.resolve_index_repository(index_repo_name)
|
47
47
|
document = repo.serialize(record)
|
48
|
-
repo.
|
48
|
+
repo.index.index(document, **opts[:options]) if document
|
49
49
|
true
|
50
50
|
end
|
51
51
|
end
|
@@ -56,7 +56,9 @@ module Esse
|
|
56
56
|
record = instance_exec(&record) if record.respond_to?(:call)
|
57
57
|
repo = Esse::ActiveRecord::Hooks.resolve_index_repository(index_repo_name)
|
58
58
|
document = repo.serialize(record)
|
59
|
-
repo.
|
59
|
+
repo.index.delete(document, **opts[:options]) if document
|
60
|
+
true
|
61
|
+
rescue Esse::Transport::NotFoundError
|
60
62
|
true
|
61
63
|
end
|
62
64
|
end
|
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.
|
4
|
+
version: 0.2.0
|
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:
|
11
|
+
date: 2024-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: esse
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.2.3
|
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:
|
26
|
+
version: 0.2.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,120 +90,114 @@ dependencies:
|
|
90
90
|
name: rake
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- - "
|
93
|
+
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
95
|
+
version: '0'
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - "
|
100
|
+
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
102
|
+
version: '0'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: rspec
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
109
|
+
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- - "
|
114
|
+
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
116
|
+
version: '0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: webmock
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- - "
|
121
|
+
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
123
|
+
version: '0'
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- - "
|
128
|
+
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
130
|
+
version: '0'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: yard
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
|
-
- - "
|
135
|
+
- - ">="
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: 0
|
137
|
+
version: '0'
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
|
-
- - "
|
142
|
+
- - ">="
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: 0
|
144
|
+
version: '0'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: standard
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
|
-
- - "
|
149
|
+
- - ">="
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
151
|
+
version: '0'
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
|
-
- - "
|
156
|
+
- - ">="
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
158
|
+
version: '0'
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: rubocop
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
|
-
- - "
|
163
|
+
- - ">="
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: '
|
165
|
+
version: '0'
|
166
166
|
type: :development
|
167
167
|
prerelease: false
|
168
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
|
-
- - "
|
170
|
+
- - ">="
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: '
|
172
|
+
version: '0'
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
174
|
name: rubocop-performance
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
|
-
- - "~>"
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: '1.11'
|
180
177
|
- - ">="
|
181
178
|
- !ruby/object:Gem::Version
|
182
|
-
version:
|
179
|
+
version: '0'
|
183
180
|
type: :development
|
184
181
|
prerelease: false
|
185
182
|
version_requirements: !ruby/object:Gem::Requirement
|
186
183
|
requirements:
|
187
|
-
- - "~>"
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
version: '1.11'
|
190
184
|
- - ">="
|
191
185
|
- !ruby/object:Gem::Version
|
192
|
-
version:
|
186
|
+
version: '0'
|
193
187
|
- !ruby/object:Gem::Dependency
|
194
188
|
name: rubocop-rspec
|
195
189
|
requirement: !ruby/object:Gem::Requirement
|
196
190
|
requirements:
|
197
|
-
- - "
|
191
|
+
- - ">="
|
198
192
|
- !ruby/object:Gem::Version
|
199
|
-
version: '
|
193
|
+
version: '0'
|
200
194
|
type: :development
|
201
195
|
prerelease: false
|
202
196
|
version_requirements: !ruby/object:Gem::Requirement
|
203
197
|
requirements:
|
204
|
-
- - "
|
198
|
+
- - ">="
|
205
199
|
- !ruby/object:Gem::Version
|
206
|
-
version: '
|
200
|
+
version: '0'
|
207
201
|
description: ActiveRecord extensions for Esse
|
208
202
|
email:
|
209
203
|
- mgzmaster@gmail.com
|
@@ -217,6 +211,16 @@ files:
|
|
217
211
|
- LICENSE.txt
|
218
212
|
- README.md
|
219
213
|
- Rakefile
|
214
|
+
- ci/Gemfile.rails-5.2
|
215
|
+
- ci/Gemfile.rails-5.2.lock
|
216
|
+
- ci/Gemfile.rails-6.0
|
217
|
+
- ci/Gemfile.rails-6.0.lock
|
218
|
+
- ci/Gemfile.rails-6.1
|
219
|
+
- ci/Gemfile.rails-6.1.lock
|
220
|
+
- ci/Gemfile.rails-7.0
|
221
|
+
- ci/Gemfile.rails-7.0.lock
|
222
|
+
- ci/Gemfile.rails-7.1
|
223
|
+
- ci/Gemfile.rails-7.1.lock
|
220
224
|
- lib/esse/active_record.rb
|
221
225
|
- lib/esse/active_record/collection.rb
|
222
226
|
- lib/esse/active_record/hooks.rb
|
@@ -246,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
250
|
- !ruby/object:Gem::Version
|
247
251
|
version: '0'
|
248
252
|
requirements: []
|
249
|
-
rubygems_version: 3.
|
253
|
+
rubygems_version: 3.2.32
|
250
254
|
signing_key:
|
251
255
|
specification_version: 4
|
252
256
|
summary: ActiveRecord extensions for Esse
|