mongoid 6.1.1 → 6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -0
- data.tar.gz.sig +0 -0
- data/lib/mongoid/interceptable.rb +6 -2
- data/lib/mongoid/version.rb +1 -1
- data/spec/mongoid/interceptable_spec.rb +16 -8
- data/spec/spec_helper.rb +1 -1
- metadata +27 -5
- metadata.gz.sig +1 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ad94ff3f533cda7ba799fbe4ea06a5a3fde553e
|
4
|
+
data.tar.gz: 3a20eae84bfb9f4639b3b1efa76dfacc6dbcd46e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b5d2570c1dedf556f81e40bd2e1ef38157c39757decab9d12a111c239c3ad823c0da7a4804c4e558c9b612388f560e8c5b6007daac1e2a23a3505fb52c03db3
|
7
|
+
data.tar.gz: 3d966d851b62722926e7dc78ff18badd848722f5a6ebcc0f9da6e7820974a5c521b37d00ccd0029756c7eb28c36b2e9a0bcdbf8150277a2f4fe2e6ee583a90cc
|
checksums.yaml.gz.sig
ADDED
data.tar.gz.sig
ADDED
Binary file
|
@@ -254,8 +254,12 @@ module Mongoid
|
|
254
254
|
chain.append(callback) if callback.kind == place
|
255
255
|
end
|
256
256
|
self.class.send :define_method, name do
|
257
|
-
|
258
|
-
chain.compile
|
257
|
+
env = ActiveSupport::Callbacks::Filters::Environment.new(self, false, nil)
|
258
|
+
sequence = chain.compile
|
259
|
+
sequence.invoke_before(env)
|
260
|
+
env.value = !env.halted
|
261
|
+
sequence.invoke_after(env)
|
262
|
+
env.value
|
259
263
|
end
|
260
264
|
self.class.send :protected, name
|
261
265
|
end
|
data/lib/mongoid/version.rb
CHANGED
@@ -484,32 +484,40 @@ describe Mongoid::Interceptable do
|
|
484
484
|
|
485
485
|
context "when the child does not have the same callback defined" do
|
486
486
|
|
487
|
-
let(:
|
488
|
-
|
487
|
+
let(:exhibition) do
|
488
|
+
Exhibition.new
|
489
489
|
end
|
490
490
|
|
491
|
-
let!(:
|
492
|
-
|
491
|
+
let!(:exhibitor) do
|
492
|
+
exhibition.exhibitors.build
|
493
493
|
end
|
494
494
|
|
495
495
|
context "when running the callbacks directly" do
|
496
496
|
|
497
497
|
before(:all) do
|
498
|
-
|
499
|
-
|
498
|
+
Exhibition.define_model_callbacks(:rearrange)
|
499
|
+
Exhibition.after_rearrange { }
|
500
500
|
end
|
501
501
|
|
502
502
|
after(:all) do
|
503
|
-
|
503
|
+
Exhibition.reset_callbacks(:rearrange)
|
504
504
|
end
|
505
505
|
|
506
506
|
it "does not cascade to the child" do
|
507
|
-
expect(
|
507
|
+
expect(exhibition.run_callbacks(:rearrange)).to be true
|
508
508
|
end
|
509
509
|
end
|
510
510
|
|
511
511
|
context "when the callbacks get triggered by a destroy" do
|
512
512
|
|
513
|
+
let(:band) do
|
514
|
+
Band.new
|
515
|
+
end
|
516
|
+
|
517
|
+
let!(:record) do
|
518
|
+
band.records.build
|
519
|
+
end
|
520
|
+
|
513
521
|
before(:all) do
|
514
522
|
Band.define_model_callbacks(:rearrange)
|
515
523
|
Band.set_callback(:validation, :before) do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,36 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Durran Jordan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BA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28
|
+
sp5xWiv93DlLXGmas0hv9VRYDvV1vLFaG05FHOAZKdo6pD2t6jNyMSAn4fMHKctw
|
29
|
+
UoYN5FLt84jacRQF5nhy9gBhfgvA19LcjeMLQC11x3fykDLzCXF2wEe5Q5iYaWvb
|
30
|
+
cGiNQIiHBj/9/xHfOyOthBPUevTiVnuffarDr434z/LGLwYzgaG5EcJFvZqpvUpP
|
31
|
+
fGcAPtAZUMGLXwcOB1BJEFkDxUQIJiEpSmf4YzzZhEM=
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2017-06-07 00:00:00.000000000 Z
|
12
34
|
dependencies:
|
13
35
|
- !ruby/object:Gem::Dependency
|
14
36
|
name: activemodel
|
@@ -16,14 +38,14 @@ dependencies:
|
|
16
38
|
requirements:
|
17
39
|
- - "~>"
|
18
40
|
- !ruby/object:Gem::Version
|
19
|
-
version: '5.
|
41
|
+
version: '5.1'
|
20
42
|
type: :runtime
|
21
43
|
prerelease: false
|
22
44
|
version_requirements: !ruby/object:Gem::Requirement
|
23
45
|
requirements:
|
24
46
|
- - "~>"
|
25
47
|
- !ruby/object:Gem::Version
|
26
|
-
version: '5.
|
48
|
+
version: '5.1'
|
27
49
|
- !ruby/object:Gem::Dependency
|
28
50
|
name: mongo
|
29
51
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
\1��j��XD�|�@m�3-@��{�MG�谞�kb��V�$O����E[U/��Q���b\77��戮ߨ�s�\����]E� ��KFw(2�h#������$;s-�����W� #@k�c���%@c�G���B6 �GD�WyqA�Y[��j4�v��� �x9߮(����j]an�����ۚ~���ྲf����y�Y�Y�N�@�4z6�1�Y��6�~i2=�#��stz���ŚWqi��
|