active_propagation 0.2.6 → 0.2.7
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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/lib/active_propagation/class_extensions.rb +1 -1
- data/lib/active_propagation/instance_extensions.rb +5 -2
- data/lib/active_propagation/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79d774d7dacfb77da2804df440ed5998e69f66ab
|
|
4
|
+
data.tar.gz: 49bd82afebce0fb782ef4ea589d01b5ff5471f5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 000adc4aa24ea939f3be6334450a67c28ad9c6a7bee40c0fca5398148d3b4cfe825a4c00baec9dd32a0d1bc76cc537b3af260829c5ab3d191f774a4eb9b33f4b
|
|
7
|
+
data.tar.gz: 19acdd08c2d216dd27e27e2be241a9be39d0bf08402dad61d3c89e038927252d9fb1814e6cc527ca20b79b9f464b6959864757e49a50b02b3174d8c8946958f6
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
module ActivePropagation::InstanceExtensions
|
|
2
|
+
|
|
3
|
+
attr_reader :_active_propagation_changes
|
|
4
|
+
|
|
2
5
|
def _run_active_propagation
|
|
3
6
|
klass = self.class
|
|
4
7
|
klass.class_variable_get(:@@propagations).each do |association, config|
|
|
@@ -9,7 +12,7 @@ module ActivePropagation::InstanceExtensions
|
|
|
9
12
|
else
|
|
10
13
|
ActivePropagation::Deletor.run(*args)
|
|
11
14
|
end
|
|
12
|
-
elsif (_active_propagation_changes.keys & config[:only]).any?
|
|
15
|
+
elsif (_active_propagation_changes.keys.map(&:to_s) & config[:only].map(&:to_s)).any?
|
|
13
16
|
if config[:async]
|
|
14
17
|
ActivePropagation::AsyncUpdater.run(*args)
|
|
15
18
|
else
|
|
@@ -20,6 +23,6 @@ module ActivePropagation::InstanceExtensions
|
|
|
20
23
|
end
|
|
21
24
|
|
|
22
25
|
def _save_active_propagation_changes
|
|
23
|
-
@_active_propagation_changes
|
|
26
|
+
@_active_propagation_changes ||= self.changes
|
|
24
27
|
end
|
|
25
28
|
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.7
|
|
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-07-
|
|
11
|
+
date: 2015-07-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|