active_propagation 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d83bba5423ded78322dc754877851fa9cc25b966
4
- data.tar.gz: bf869eb2765337e61bca0587b8442eb3b8c66b55
3
+ metadata.gz: 79d774d7dacfb77da2804df440ed5998e69f66ab
4
+ data.tar.gz: 49bd82afebce0fb782ef4ea589d01b5ff5471f5d
5
5
  SHA512:
6
- metadata.gz: 8231f8e0ad3be281cad93cae6402f678a24c05ea6f5f52a65bee06001a52eb7cf3afa7797f7ffc82f45e72b67a902472508c64320f3b1f46dfa66052d37eae15
7
- data.tar.gz: 7daf4a022d22d06fee7d02349e21d38a20a7d4020c56e88badd1192cc6392ccece29f29879faaf0b5b4815534545637bacec944dd6f8142afd219e51afe402ca
6
+ metadata.gz: 000adc4aa24ea939f3be6334450a67c28ad9c6a7bee40c0fca5398148d3b4cfe825a4c00baec9dd32a0d1bc76cc537b3af260829c5ab3d191f774a4eb9b33f4b
7
+ data.tar.gz: 19acdd08c2d216dd27e27e2be241a9be39d0bf08402dad61d3c89e038927252d9fb1814e6cc527ca20b79b9f464b6959864757e49a50b02b3174d8c8946958f6
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
  /vendor
11
11
  *.sqlite3
12
12
  *.swp
13
+ *.gem
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_propagation (0.2.5)
4
+ active_propagation (0.2.6)
5
5
  activerecord (~> 4.0)
6
6
  activesupport (~> 4.0)
7
7
  sidekiq
@@ -11,5 +11,5 @@ module ActivePropagation::ClassExtensions
11
11
  self.class_variable_get(:@@propagations)[association] = {only: only, async: async, nested_async: nested_async}
12
12
  end
13
13
 
14
- attr_reader :_active_propagation_changes
14
+ attr_accessor :_active_propagation_changes
15
15
  end
@@ -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 = self.changes
26
+ @_active_propagation_changes ||= self.changes
24
27
  end
25
28
  end
@@ -1,3 +1,3 @@
1
1
  module ActivePropagation
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  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.6
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-10 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler