active_propagation 0.2.1 → 0.2.2

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: 3e00938b35501723e36afe6ec04011464588d594
4
- data.tar.gz: 5c348effb95ccccceabf508bc49e979c88d9d526
3
+ metadata.gz: 74bc55ff758a716c017f4d37657ef0983c2bc9cd
4
+ data.tar.gz: 629e2024937b34b203bf0b2907c4d5d897648336
5
5
  SHA512:
6
- metadata.gz: c4136786fc4c3360ab773609ea828aaa59efe957d683e6faa6d660e53cb4c2e1e5b1fcd1ea069b76a00854290fe1a8ea095611d80b3e5f770c1e17c59cc8c135
7
- data.tar.gz: bee8f450fc60056c75bad9d0d7e0a0ddb0305f43689ab0a6d8f137f89730388b3014d5d0b41a8a8a78a0cc0420c8d52953af330f0378a786dc5ef4ba4f0821be
6
+ metadata.gz: 9635a329f64052be13c20407998c2e0262422b0c813f52d11e602ddf5f64e7aa4c689187e232dfb2b7acabb344047e7e163cabb89e515dd0d171f5f8de11badc
7
+ data.tar.gz: 0272bd1219cc930aad72de105f25c05706f5037b8dc013112cab427734578f947274f399f02df6ae0ab6d04b06ed6413642b17445307d40f7c5fd18611e84b9e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_propagation (0.1.0)
4
+ active_propagation (0.2.1)
5
5
  activerecord (~> 4.0)
6
6
  activesupport (~> 4.0)
7
7
  sidekiq
@@ -1,6 +1,11 @@
1
1
  module ActivePropagation::ClassExtensions
2
2
  def propagates_changes_to(association, only: [], async: false, nested_async: false, on: [:update, :destroy])
3
- self.class_variable_set(:@@propagations, self.class_variable_get(:@@propagations) || {})
3
+ props = if class_variable_defined?(:@@propagations)
4
+ self.class_variable_get(:@@propagations) || {}
5
+ else
6
+ {}
7
+ end
8
+ self.class_variable_set(:@@propagations, props)
4
9
  after_commit(:_run_active_propagation, on: on) unless _commit_callbacks.map(&:filter).include?(:_run_active_propagation)
5
10
  self.class_variable_get(:@@propagations)[association] = {only: only, async: async, nested_async: nested_async}
6
11
  end
@@ -1,3 +1,3 @@
1
1
  module ActivePropagation
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_propagation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshiki Schmitz