promiscuous 0.100.4 → 0.100.5
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: 36eb13f57a962d958bcd78894b1a1991e1ee5a63
|
|
4
|
+
data.tar.gz: ed7e75b9a906ca60da6d9e28d48c93ded541308c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 592f65e706d0ef1cfbf3a4bbc36a7494847003efa7e1fae07ec6bf2d1bd33e6db454e0e982843b77e1e660397187f25c25f4e4b4e5b03e81c5e78394e6db78bf
|
|
7
|
+
data.tar.gz: 1842b7b3e6627868ee1312f123a1007342b8ac241a05368f77ab2c9bf67dcc4373daaef2b5f7ec1f9ea0ef56dabcf78ff4bff42415c1dfb25f8672b03b11d35e
|
|
@@ -2,7 +2,6 @@ module Promiscuous::Subscriber::Model::Base
|
|
|
2
2
|
extend ActiveSupport::Concern
|
|
3
3
|
|
|
4
4
|
def __promiscuous_eventual_consistency_update(operation)
|
|
5
|
-
return true unless self.respond_to?(:attributes)
|
|
6
5
|
return true unless operation.dependency.try(&:version)
|
|
7
6
|
|
|
8
7
|
version = operation.dependency.version
|
|
@@ -8,6 +8,10 @@ module Promiscuous::Subscriber::Model::Observer
|
|
|
8
8
|
define_model_callbacks :save, :create, :update, :destroy, :only => :after
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
def __promiscuous_eventual_consistency_update(operation)
|
|
12
|
+
true
|
|
13
|
+
end
|
|
14
|
+
|
|
11
15
|
def __promiscuous_update(payload, options={})
|
|
12
16
|
super
|
|
13
17
|
case payload.operation
|
|
@@ -19,9 +23,6 @@ module Promiscuous::Subscriber::Model::Observer
|
|
|
19
23
|
run_callbacks :save
|
|
20
24
|
when :destroy
|
|
21
25
|
run_callbacks :destroy
|
|
22
|
-
when :bootstrap_data
|
|
23
|
-
run_callbacks :create
|
|
24
|
-
run_callbacks :save
|
|
25
26
|
else
|
|
26
27
|
raise "Unknown operation #{payload.operation}"
|
|
27
28
|
end
|
|
@@ -55,11 +55,8 @@ class Promiscuous::Subscriber::Operation
|
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
def destroy
|
|
58
|
-
if message.dependencies.present?
|
|
59
|
-
|
|
60
|
-
else
|
|
61
|
-
model.__promiscuous_fetch_existing(id).destroy
|
|
62
|
-
end
|
|
58
|
+
Promiscuous::Subscriber::Worker::EventualDestroyer.postpone_destroy(model, id) if message.dependencies.present?
|
|
59
|
+
model.__promiscuous_fetch_existing(id).destroy
|
|
63
60
|
end
|
|
64
61
|
|
|
65
62
|
def execute
|
data/lib/promiscuous/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: promiscuous
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.100.
|
|
4
|
+
version: 0.100.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nicolas Viennot
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
12
|
+
date: 2014-05-08 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|
|
@@ -236,3 +236,4 @@ signing_key:
|
|
|
236
236
|
specification_version: 4
|
|
237
237
|
summary: Replicate models across applications
|
|
238
238
|
test_files: []
|
|
239
|
+
has_rdoc: false
|