active_propagation 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d83bba5423ded78322dc754877851fa9cc25b966
|
|
4
|
+
data.tar.gz: bf869eb2765337e61bca0587b8442eb3b8c66b55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8231f8e0ad3be281cad93cae6402f678a24c05ea6f5f52a65bee06001a52eb7cf3afa7797f7ffc82f45e72b67a902472508c64320f3b1f46dfa66052d37eae15
|
|
7
|
+
data.tar.gz: 7daf4a022d22d06fee7d02349e21d38a20a7d4020c56e88badd1192cc6392ccece29f29879faaf0b5b4815534545637bacec944dd6f8142afd219e51afe402ca
|
data/Gemfile.lock
CHANGED
|
@@ -6,7 +6,10 @@ module ActivePropagation::ClassExtensions
|
|
|
6
6
|
{}
|
|
7
7
|
end
|
|
8
8
|
self.class_variable_set(:@@propagations, props)
|
|
9
|
+
before_save(:_save_active_propagation_changes, on: on) unless _commit_callbacks.map(&:filter).include?(:_save_active_propagation_changes)
|
|
9
10
|
after_commit(:_run_active_propagation, on: on) unless _commit_callbacks.map(&:filter).include?(:_run_active_propagation)
|
|
10
11
|
self.class_variable_get(:@@propagations)[association] = {only: only, async: async, nested_async: nested_async}
|
|
11
12
|
end
|
|
13
|
+
|
|
14
|
+
attr_reader :_active_propagation_changes
|
|
12
15
|
end
|
|
@@ -9,7 +9,7 @@ module ActivePropagation::InstanceExtensions
|
|
|
9
9
|
else
|
|
10
10
|
ActivePropagation::Deletor.run(*args)
|
|
11
11
|
end
|
|
12
|
-
elsif (
|
|
12
|
+
elsif (_active_propagation_changes.keys & config[:only]).any?
|
|
13
13
|
if config[:async]
|
|
14
14
|
ActivePropagation::AsyncUpdater.run(*args)
|
|
15
15
|
else
|
|
@@ -18,4 +18,8 @@ module ActivePropagation::InstanceExtensions
|
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
|
+
|
|
22
|
+
def _save_active_propagation_changes
|
|
23
|
+
@_active_propagation_changes = self.changes
|
|
24
|
+
end
|
|
21
25
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_propagation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yoshiki Schmitz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-07-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|