promiscuous 0.100.4 → 0.100.5

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: 89d7c447d208a6d48491d22a33d531315dd7d228
4
- data.tar.gz: 686c4e37973213dbcb9c0c2a1e6a92da22c25006
3
+ metadata.gz: 36eb13f57a962d958bcd78894b1a1991e1ee5a63
4
+ data.tar.gz: ed7e75b9a906ca60da6d9e28d48c93ded541308c
5
5
  SHA512:
6
- metadata.gz: 51f5b3a0966b1e020b831c3824cd5694a40df408456d29b98d30c72ec3f6a7a92dbe9f639d8aae29e92b8c694f8fd894cf9edf6418ee110875a3cd655ce933be
7
- data.tar.gz: f447a3f6c3374dd072ddaae10cd529940f3bc1a85ee696f66f3f342710f152ee11d24e9ef0770c0629cae252c31fa9f7a066c37481782f30f1968d8f24602417
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
- Promiscuous::Subscriber::Worker::EventualDestroyer.postpone_destroy(model, id)
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
@@ -1,3 +1,3 @@
1
1
  module Promiscuous
2
- VERSION = '0.100.4'
2
+ VERSION = '0.100.5'
3
3
  end
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
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-04-04 00:00:00.000000000 Z
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