active_propagation 0.2.5 → 0.2.6

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: 2f10a644e950aad615eb219271eba7a8fb941255
4
- data.tar.gz: bf681e5246713ec2de536a027a794c8974b4ad02
3
+ metadata.gz: d83bba5423ded78322dc754877851fa9cc25b966
4
+ data.tar.gz: bf869eb2765337e61bca0587b8442eb3b8c66b55
5
5
  SHA512:
6
- metadata.gz: bbda81543f339964d22e838bdcca655ee960fab44317c67454fc5cccb7467c4523705898e086f5143c50760267e10d2b578b2699ec6933cfc860a0373bc58359
7
- data.tar.gz: 6dbb556d21140b4e756e5b50962bce59fb226bc89a3463c1fc923f6a11d326d645dfed673cc14e8c6c0f0caee59d2f20c9b382a4ab6a49f00b7f2d8771a9a8b7
6
+ metadata.gz: 8231f8e0ad3be281cad93cae6402f678a24c05ea6f5f52a65bee06001a52eb7cf3afa7797f7ffc82f45e72b67a902472508c64320f3b1f46dfa66052d37eae15
7
+ data.tar.gz: 7daf4a022d22d06fee7d02349e21d38a20a7d4020c56e88badd1192cc6392ccece29f29879faaf0b5b4815534545637bacec944dd6f8142afd219e51afe402ca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_propagation (0.2.4)
4
+ active_propagation (0.2.5)
5
5
  activerecord (~> 4.0)
6
6
  activesupport (~> 4.0)
7
7
  sidekiq
@@ -81,3 +81,6 @@ DEPENDENCIES
81
81
  rake (~> 10.0)
82
82
  rspec
83
83
  sqlite3
84
+
85
+ BUNDLED WITH
86
+ 1.10.5
@@ -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 (previous_changes.keys & config[:only]).any?
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
@@ -1,3 +1,3 @@
1
1
  module ActivePropagation
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
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.5
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-06-19 00:00:00.000000000 Z
11
+ date: 2015-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler