promiscuous 0.53.1 → 0.90.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. data/lib/promiscuous.rb +25 -28
  2. data/lib/promiscuous/amqp.rb +27 -8
  3. data/lib/promiscuous/amqp/bunny.rb +131 -16
  4. data/lib/promiscuous/amqp/fake.rb +52 -0
  5. data/lib/promiscuous/amqp/hot_bunnies.rb +56 -0
  6. data/lib/promiscuous/amqp/null.rb +6 -6
  7. data/lib/promiscuous/cli.rb +108 -24
  8. data/lib/promiscuous/config.rb +73 -12
  9. data/lib/promiscuous/convenience.rb +18 -0
  10. data/lib/promiscuous/dependency.rb +59 -0
  11. data/lib/promiscuous/dsl.rb +36 -0
  12. data/lib/promiscuous/error.rb +3 -1
  13. data/lib/promiscuous/error/already_processed.rb +5 -0
  14. data/lib/promiscuous/error/base.rb +1 -0
  15. data/lib/promiscuous/error/connection.rb +7 -5
  16. data/lib/promiscuous/error/dependency.rb +111 -0
  17. data/lib/promiscuous/error/lock_unavailable.rb +12 -0
  18. data/lib/promiscuous/error/lost_lock.rb +12 -0
  19. data/lib/promiscuous/error/missing_context.rb +29 -0
  20. data/lib/promiscuous/error/publisher.rb +5 -15
  21. data/lib/promiscuous/error/recovery.rb +7 -0
  22. data/lib/promiscuous/error/subscriber.rb +2 -4
  23. data/lib/promiscuous/key.rb +36 -0
  24. data/lib/promiscuous/loader.rb +12 -16
  25. data/lib/promiscuous/middleware.rb +112 -0
  26. data/lib/promiscuous/publisher.rb +7 -4
  27. data/lib/promiscuous/publisher/context.rb +92 -0
  28. data/lib/promiscuous/publisher/mock_generator.rb +72 -0
  29. data/lib/promiscuous/publisher/model.rb +3 -86
  30. data/lib/promiscuous/publisher/model/active_record.rb +8 -15
  31. data/lib/promiscuous/publisher/model/base.rb +136 -0
  32. data/lib/promiscuous/publisher/model/ephemeral.rb +69 -0
  33. data/lib/promiscuous/publisher/model/mock.rb +61 -0
  34. data/lib/promiscuous/publisher/model/mongoid.rb +57 -100
  35. data/lib/promiscuous/{common/lint.rb → publisher/operation.rb} +1 -1
  36. data/lib/promiscuous/publisher/operation/base.rb +707 -0
  37. data/lib/promiscuous/publisher/operation/mongoid.rb +370 -0
  38. data/lib/promiscuous/publisher/worker.rb +22 -0
  39. data/lib/promiscuous/railtie.rb +21 -3
  40. data/lib/promiscuous/redis.rb +132 -40
  41. data/lib/promiscuous/resque.rb +12 -0
  42. data/lib/promiscuous/sidekiq.rb +15 -0
  43. data/lib/promiscuous/subscriber.rb +9 -20
  44. data/lib/promiscuous/subscriber/model.rb +4 -104
  45. data/lib/promiscuous/subscriber/model/active_record.rb +10 -0
  46. data/lib/promiscuous/subscriber/model/base.rb +96 -0
  47. data/lib/promiscuous/subscriber/model/mongoid.rb +86 -0
  48. data/lib/promiscuous/subscriber/model/observer.rb +37 -0
  49. data/lib/promiscuous/subscriber/operation.rb +167 -0
  50. data/lib/promiscuous/subscriber/payload.rb +34 -0
  51. data/lib/promiscuous/subscriber/worker.rb +22 -18
  52. data/lib/promiscuous/subscriber/worker/message.rb +48 -25
  53. data/lib/promiscuous/subscriber/worker/message_synchronizer.rb +273 -181
  54. data/lib/promiscuous/subscriber/worker/pump.rb +17 -43
  55. data/lib/promiscuous/subscriber/worker/recorder.rb +24 -0
  56. data/lib/promiscuous/subscriber/worker/runner.rb +24 -3
  57. data/lib/promiscuous/subscriber/worker/stats.rb +62 -0
  58. data/lib/promiscuous/timer.rb +38 -0
  59. data/lib/promiscuous/version.rb +1 -1
  60. metadata +98 -143
  61. data/README.md +0 -33
  62. data/lib/promiscuous/amqp/ruby_amqp.rb +0 -140
  63. data/lib/promiscuous/common.rb +0 -4
  64. data/lib/promiscuous/common/class_helpers.rb +0 -12
  65. data/lib/promiscuous/common/lint/base.rb +0 -24
  66. data/lib/promiscuous/common/options.rb +0 -51
  67. data/lib/promiscuous/ephemeral.rb +0 -14
  68. data/lib/promiscuous/error/recover.rb +0 -1
  69. data/lib/promiscuous/observer.rb +0 -5
  70. data/lib/promiscuous/publisher/active_record.rb +0 -7
  71. data/lib/promiscuous/publisher/amqp.rb +0 -18
  72. data/lib/promiscuous/publisher/attributes.rb +0 -32
  73. data/lib/promiscuous/publisher/base.rb +0 -23
  74. data/lib/promiscuous/publisher/class.rb +0 -36
  75. data/lib/promiscuous/publisher/envelope.rb +0 -7
  76. data/lib/promiscuous/publisher/ephemeral.rb +0 -9
  77. data/lib/promiscuous/publisher/lint.rb +0 -35
  78. data/lib/promiscuous/publisher/lint/amqp.rb +0 -14
  79. data/lib/promiscuous/publisher/lint/attributes.rb +0 -12
  80. data/lib/promiscuous/publisher/lint/base.rb +0 -5
  81. data/lib/promiscuous/publisher/lint/class.rb +0 -15
  82. data/lib/promiscuous/publisher/lint/polymorphic.rb +0 -22
  83. data/lib/promiscuous/publisher/mock.rb +0 -79
  84. data/lib/promiscuous/publisher/mongoid.rb +0 -33
  85. data/lib/promiscuous/publisher/mongoid/embedded.rb +0 -27
  86. data/lib/promiscuous/publisher/mongoid/embedded_many.rb +0 -12
  87. data/lib/promiscuous/publisher/polymorphic.rb +0 -8
  88. data/lib/promiscuous/subscriber/active_record.rb +0 -11
  89. data/lib/promiscuous/subscriber/amqp.rb +0 -25
  90. data/lib/promiscuous/subscriber/attributes.rb +0 -35
  91. data/lib/promiscuous/subscriber/base.rb +0 -29
  92. data/lib/promiscuous/subscriber/class.rb +0 -29
  93. data/lib/promiscuous/subscriber/dummy.rb +0 -19
  94. data/lib/promiscuous/subscriber/envelope.rb +0 -18
  95. data/lib/promiscuous/subscriber/lint.rb +0 -30
  96. data/lib/promiscuous/subscriber/lint/amqp.rb +0 -21
  97. data/lib/promiscuous/subscriber/lint/attributes.rb +0 -21
  98. data/lib/promiscuous/subscriber/lint/base.rb +0 -14
  99. data/lib/promiscuous/subscriber/lint/class.rb +0 -13
  100. data/lib/promiscuous/subscriber/lint/polymorphic.rb +0 -39
  101. data/lib/promiscuous/subscriber/mongoid.rb +0 -27
  102. data/lib/promiscuous/subscriber/mongoid/embedded.rb +0 -17
  103. data/lib/promiscuous/subscriber/mongoid/embedded_many.rb +0 -44
  104. data/lib/promiscuous/subscriber/observer.rb +0 -26
  105. data/lib/promiscuous/subscriber/polymorphic.rb +0 -36
  106. data/lib/promiscuous/subscriber/upsert.rb +0 -12
@@ -1,50 +1,24 @@
1
- require 'eventmachine'
2
-
3
1
  class Promiscuous::Subscriber::Worker::Pump
4
- include Celluloid
5
-
6
- attr_accessor :subscribe_sync
7
-
8
- def initialize
9
- # We need to subscribe to everything to keep up with the version tracking
10
- queue_name = "#{Promiscuous::Config.app}.promiscuous"
11
- bindings = ['*']
12
-
13
- unless Promiscuous::Config.backend == :rubyamqp
14
- raise "you must use the ruby_amqp backend"
15
- end
16
- Promiscuous::AMQP.ensure_connected
17
-
18
- @subscribe_sync = Promiscuous::AMQP::RubyAMQP::Synchronizer.new
19
- Promiscuous::AMQP::RubyAMQP.get_channel(:pump) do |channel|
20
- @channel = channel
21
- # TODO channel.on_error ?
22
-
23
- queue = channel.queue(queue_name, Promiscuous::Config.queue_options)
24
- exchange = Promiscuous::AMQP::RubyAMQP.get_exchange(:pump)
25
- bindings.each do |binding|
26
- queue.bind(exchange, :routing_key => binding)
27
- Promiscuous.debug "[bind] #{queue_name} -> #{binding}"
28
- end
29
- queue.subscribe(:ack => true, :confirm => proc { @subscribe_sync.signal }, &method(:process_payload))
30
- end
31
- @subscribe_sync.wait
2
+ def initialize(root)
3
+ @root = root
4
+ # late include of CelluloidSubscriber because the class is resolved
5
+ # at runtime since we can have different backends.
6
+ extend Promiscuous::AMQP::Subscriber
32
7
  end
33
8
 
34
- def finalize
35
- channel_sync = Promiscuous::AMQP::RubyAMQP::Synchronizer.new
36
- Promiscuous::AMQP::RubyAMQP.close_channel(:pump) do
37
- channel_sync.signal
38
- end
39
- channel_sync.wait
40
- end
41
-
42
- def recover
43
- EM.next_tick { @channel.recover }
9
+ def connect
10
+ options = {}
11
+ options[:queue_name] = ENV['QUEUE_NAME'] || "#{Promiscuous::Config.app}.promiscuous"
12
+ # We need to subscribe to everything to keep up with the version tracking
13
+ options[:bindings] = ['*']
14
+ subscribe(options, &method(:on_message))
44
15
  end
45
16
 
46
- def process_payload(metadata, payload)
47
- msg = Promiscuous::Subscriber::Worker::Message.new(metadata, payload)
48
- Celluloid::Actor[:message_synchronizer].process_when_ready(msg)
17
+ def on_message(metadata, payload)
18
+ msg = Promiscuous::Subscriber::Worker::Message.new(payload, :metadata => metadata, :root_worker => @root)
19
+ @root.message_synchronizer.process_when_ready(msg)
20
+ rescue Exception => e
21
+ Promiscuous.warn "[receive] cannot process message: #{e} #{e.backtrace.join("\n")}"
22
+ Promiscuous::Config.error_notifier.try(:call, e)
49
23
  end
50
24
  end
@@ -0,0 +1,24 @@
1
+ class Promiscuous::Subscriber::Worker::Recorder
2
+ def initialize(log_file)
3
+ @log_file = log_file
4
+ extend Promiscuous::AMQP::Subscriber
5
+ end
6
+
7
+ def start
8
+ @file = File.open(@log_file, 'a')
9
+ options = {}
10
+ options[:queue_name] = "#{Promiscuous::Config.app}.promiscuous"
11
+ # We need to subscribe to everything to keep up with the version tracking
12
+ options[:bindings] = ['*']
13
+
14
+ subscribe(options) do |metadata, payload|
15
+ @file.puts payload
16
+ metadata.ack
17
+ end
18
+ end
19
+
20
+ def stop
21
+ disconnect
22
+ @file.try(:close)
23
+ end
24
+ end
@@ -1,7 +1,28 @@
1
1
  class Promiscuous::Subscriber::Worker::Runner
2
- include Celluloid
2
+ attr_accessor :messages_to_process
3
3
 
4
- def process(msg)
5
- msg.process
4
+ def initialize(root)
5
+ @root = root
6
+ @messages_to_process = Queue.new
7
+ end
8
+
9
+ def start
10
+ num_threads = Promiscuous::Config.subscriber_threads
11
+ @locks ||= num_threads.times.map { Mutex.new }
12
+ @threads ||= num_threads.times.map { |i| Thread.new { main_loop(@locks[i]) } }
13
+ end
14
+
15
+ def stop
16
+ return unless @threads
17
+ @threads.zip(@locks).each { |thread, lock| lock.synchronize { thread.kill } }
18
+ @threads = @locks = nil
19
+ @messages_to_process.clear
20
+ end
21
+
22
+ def main_loop(lock)
23
+ loop do
24
+ msg = @messages_to_process.pop
25
+ lock.synchronize { msg.process }
26
+ end
6
27
  end
7
28
  end
@@ -0,0 +1,62 @@
1
+ class Promiscuous::Subscriber::Worker::Stats
2
+ def connect
3
+ @interval = Promiscuous::Config.stats_interval.to_f
4
+ return if @interval.zero? || @redis
5
+
6
+ url = Promiscuous::Config.redis_stats_url
7
+ @redis = ::Redis.new(:url => url)
8
+ key = Promiscuous::Key.new(:sub).join(Socket.gethostname)
9
+ @key_processed_message = key.join('__stats__', 'processed_messages').to_s
10
+ @key_total_response_time = key.join('__stats__', 'total_response_time').to_s
11
+
12
+ @redis.set(@key_processed_message, 0)
13
+ @redis.set(@key_total_response_time, 0)
14
+ @last_aggregate = Time.now
15
+
16
+ STDERR.puts ""
17
+
18
+ @timer ||= Promiscuous::Timer.new
19
+ @timer.run_every(@interval) { aggregate_stats }
20
+ end
21
+
22
+ def disconnect
23
+ @timer.try(:reset)
24
+ @redis.client.disconnect rescue nil if @redis
25
+ end
26
+
27
+ def aggregate_stats
28
+ processed_messages = nil
29
+ total_response_time = nil
30
+ @redis.multi do
31
+ processed_messages = @redis.getset(@key_processed_message, 0)
32
+ total_response_time = @redis.getset(@key_total_response_time, 0)
33
+ end
34
+
35
+ last_aggregate = @last_aggregate
36
+ @last_aggregate = Time.now
37
+ processed_messages = processed_messages.value.to_i
38
+ total_response_time = total_response_time.value.to_i
39
+
40
+ rate = sprintf("%.1f", processed_messages.to_f / (Time.now - last_aggregate))
41
+ latency = "N/A"
42
+ unless processed_messages.zero?
43
+ latency = total_response_time.to_f / (1000 * processed_messages).to_f
44
+ if latency > 2.minutes
45
+ latency = sprintf("%.3fmin", latency / 1.minute)
46
+ else
47
+ latency = sprintf("%.3fsec", latency)
48
+ end
49
+ end
50
+ STDERR.puts "\e[1A" + "\b" * 200 + "Messages: #{processed_messages} Rate: #{rate} msg/s Latency: #{latency}" + " " * 30
51
+ end
52
+
53
+ def notify_processed_message(msg, time)
54
+ return if msg.timestamp.zero? || !@redis
55
+
56
+ msecs = (time.to_i * 1000 + time.usec / 1000).to_i - msg.timestamp
57
+ @redis.pipelined do
58
+ @redis.incr(@key_processed_message)
59
+ @redis.incrby(@key_total_response_time, msecs)
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,38 @@
1
+ class Promiscuous::Timer
2
+ def initialize
3
+ @lock = Mutex.new
4
+ end
5
+
6
+ def run_every(duration, options={}, &block)
7
+ options = options.dup
8
+ duration = duration.to_f unless duration.is_a?(Integer)
9
+ reset
10
+
11
+ @lock.synchronize do
12
+ @thread ||= Thread.new do
13
+ loop do
14
+ sleep duration unless options.delete(:run_immediately)
15
+ @lock.synchronize do
16
+ if @thread == Thread.current
17
+ begin
18
+ block.call
19
+ rescue Exception
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+
28
+ def reset
29
+ if @thread == Thread.current
30
+ @thread = nil
31
+ else
32
+ @lock.synchronize do
33
+ @thread.try(:kill)
34
+ @thread = nil
35
+ end
36
+ end
37
+ end
38
+ end
@@ -1,3 +1,3 @@
1
1
  module Promiscuous
2
- VERSION = '0.53.1'
2
+ VERSION = '0.90.0'
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.53.1
4
+ version: 0.90.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,168 +10,136 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-10 00:00:00.000000000 Z
13
+ date: 2013-04-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: activesupport
16
+ type: :runtime
17
17
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
18
  requirements:
20
19
  - - ! '>='
21
20
  - !ruby/object:Gem::Version
22
21
  version: 3.0.0
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
22
  none: false
23
+ version_requirements: !ruby/object:Gem::Requirement
27
24
  requirements:
28
25
  - - ! '>='
29
26
  - !ruby/object:Gem::Version
30
27
  version: 3.0.0
28
+ none: false
29
+ prerelease: false
30
+ name: activesupport
31
31
  - !ruby/object:Gem::Dependency
32
- name: activemodel
32
+ type: :runtime
33
33
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
34
  requirements:
36
35
  - - ! '>='
37
36
  - !ruby/object:Gem::Version
38
37
  version: 3.0.0
39
- type: :runtime
40
- prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
38
  none: false
39
+ version_requirements: !ruby/object:Gem::Requirement
43
40
  requirements:
44
41
  - - ! '>='
45
42
  - !ruby/object:Gem::Version
46
43
  version: 3.0.0
47
- - !ruby/object:Gem::Dependency
48
- name: bunny
49
- requirement: !ruby/object:Gem::Requirement
50
44
  none: false
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- version: 0.8.0
55
- type: :runtime
56
45
  prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - ~>
61
- - !ruby/object:Gem::Version
62
- version: 0.8.0
46
+ name: activemodel
63
47
  - !ruby/object:Gem::Dependency
64
- name: amqp
48
+ type: :runtime
65
49
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
50
  requirements:
68
- - - ~>
51
+ - - ! '>='
69
52
  - !ruby/object:Gem::Version
70
- version: 0.9.8
71
- type: :runtime
72
- prerelease: false
73
- version_requirements: !ruby/object:Gem::Requirement
53
+ version: 0.9.0.pre8
74
54
  none: false
55
+ version_requirements: !ruby/object:Gem::Requirement
75
56
  requirements:
76
- - - ~>
57
+ - - ! '>='
77
58
  - !ruby/object:Gem::Version
78
- version: 0.9.8
59
+ version: 0.9.0.pre8
60
+ none: false
61
+ prerelease: false
62
+ name: bunny
79
63
  - !ruby/object:Gem::Dependency
80
- name: ruby-progressbar
64
+ type: :runtime
81
65
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
66
  requirements:
84
67
  - - ~>
85
68
  - !ruby/object:Gem::Version
86
69
  version: 1.0.2
87
- type: :runtime
88
- prerelease: false
89
- version_requirements: !ruby/object:Gem::Requirement
90
70
  none: false
71
+ version_requirements: !ruby/object:Gem::Requirement
91
72
  requirements:
92
73
  - - ~>
93
74
  - !ruby/object:Gem::Version
94
75
  version: 1.0.2
95
- - !ruby/object:Gem::Dependency
96
- name: redis
97
- requirement: !ruby/object:Gem::Requirement
98
76
  none: false
99
- requirements:
100
- - - ! '>='
101
- - !ruby/object:Gem::Version
102
- version: '0'
103
- type: :runtime
104
77
  prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
108
- - - ! '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
78
+ name: ruby-progressbar
111
79
  - !ruby/object:Gem::Dependency
112
- name: crowdtap_redis_lock
80
+ type: :runtime
113
81
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
82
  requirements:
116
83
  - - ~>
117
84
  - !ruby/object:Gem::Version
118
- version: 0.1.2
119
- type: :runtime
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
85
+ version: 3.0.2
122
86
  none: false
87
+ version_requirements: !ruby/object:Gem::Requirement
123
88
  requirements:
124
89
  - - ~>
125
90
  - !ruby/object:Gem::Version
126
- version: 0.1.2
91
+ version: 3.0.2
92
+ none: false
93
+ prerelease: false
94
+ name: redis
127
95
  - !ruby/object:Gem::Dependency
128
- name: celluloid
96
+ type: :runtime
129
97
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
98
  requirements:
132
99
  - - ~>
133
100
  - !ruby/object:Gem::Version
134
- version: 0.12.4
135
- type: :runtime
136
- prerelease: false
137
- version_requirements: !ruby/object:Gem::Requirement
101
+ version: 0.6.1
138
102
  none: false
103
+ version_requirements: !ruby/object:Gem::Requirement
139
104
  requirements:
140
105
  - - ~>
141
106
  - !ruby/object:Gem::Version
142
- version: 0.12.4
107
+ version: 0.6.1
108
+ none: false
109
+ prerelease: false
110
+ name: algorithms
143
111
  - !ruby/object:Gem::Dependency
144
- name: celluloid-io
112
+ type: :runtime
145
113
  requirement: !ruby/object:Gem::Requirement
146
- none: false
147
114
  requirements:
148
- - - ~>
115
+ - - '='
149
116
  - !ruby/object:Gem::Version
150
- version: 0.12.1
151
- type: :runtime
152
- prerelease: false
153
- version_requirements: !ruby/object:Gem::Requirement
117
+ version: 0.2.0
154
118
  none: false
119
+ version_requirements: !ruby/object:Gem::Requirement
155
120
  requirements:
156
- - - ~>
121
+ - - '='
157
122
  - !ruby/object:Gem::Version
158
- version: 0.12.1
123
+ version: 0.2.0
124
+ none: false
125
+ prerelease: false
126
+ name: fnv
159
127
  - !ruby/object:Gem::Dependency
160
- name: algorithms
128
+ type: :runtime
161
129
  requirement: !ruby/object:Gem::Requirement
162
- none: false
163
130
  requirements:
164
131
  - - ~>
165
132
  - !ruby/object:Gem::Version
166
- version: 0.1.0
167
- type: :runtime
168
- prerelease: false
169
- version_requirements: !ruby/object:Gem::Requirement
133
+ version: 1.7.2
170
134
  none: false
135
+ version_requirements: !ruby/object:Gem::Requirement
171
136
  requirements:
172
137
  - - ~>
173
138
  - !ruby/object:Gem::Version
174
- version: 0.1.0
139
+ version: 1.7.2
140
+ none: false
141
+ prerelease: false
142
+ name: multi_json
175
143
  description: Replicate your Mongoid/ActiveRecord models across your applications
176
144
  email:
177
145
  - nicolas@viennot.biz
@@ -183,78 +151,65 @@ extra_rdoc_files: []
183
151
  files:
184
152
  - lib/promiscuous/amqp/null.rb
185
153
  - lib/promiscuous/amqp/bunny.rb
186
- - lib/promiscuous/amqp/ruby_amqp.rb
187
- - lib/promiscuous/common/lint/base.rb
188
- - lib/promiscuous/common/class_helpers.rb
189
- - lib/promiscuous/common/options.rb
190
- - lib/promiscuous/common/lint.rb
191
- - lib/promiscuous/publisher/lint/amqp.rb
192
- - lib/promiscuous/publisher/lint/attributes.rb
193
- - lib/promiscuous/publisher/lint/base.rb
194
- - lib/promiscuous/publisher/lint/polymorphic.rb
195
- - lib/promiscuous/publisher/lint/class.rb
196
- - lib/promiscuous/publisher/mongoid/embedded_many.rb
197
- - lib/promiscuous/publisher/mongoid/embedded.rb
154
+ - lib/promiscuous/amqp/fake.rb
155
+ - lib/promiscuous/amqp/hot_bunnies.rb
198
156
  - lib/promiscuous/publisher/model/active_record.rb
199
157
  - lib/promiscuous/publisher/model/mongoid.rb
200
- - lib/promiscuous/publisher/envelope.rb
201
- - lib/promiscuous/publisher/polymorphic.rb
202
- - lib/promiscuous/publisher/mock.rb
203
- - lib/promiscuous/publisher/class.rb
204
- - lib/promiscuous/publisher/ephemeral.rb
205
- - lib/promiscuous/publisher/attributes.rb
206
- - lib/promiscuous/publisher/active_record.rb
207
- - lib/promiscuous/publisher/base.rb
208
- - lib/promiscuous/publisher/lint.rb
209
- - lib/promiscuous/publisher/mongoid.rb
210
- - lib/promiscuous/publisher/amqp.rb
158
+ - lib/promiscuous/publisher/model/ephemeral.rb
159
+ - lib/promiscuous/publisher/model/base.rb
160
+ - lib/promiscuous/publisher/model/mock.rb
161
+ - lib/promiscuous/publisher/operation.rb
162
+ - lib/promiscuous/publisher/operation/mongoid.rb
163
+ - lib/promiscuous/publisher/operation/base.rb
211
164
  - lib/promiscuous/publisher/model.rb
212
- - lib/promiscuous/subscriber/lint/amqp.rb
213
- - lib/promiscuous/subscriber/lint/base.rb
214
- - lib/promiscuous/subscriber/lint/class.rb
215
- - lib/promiscuous/subscriber/lint/polymorphic.rb
216
- - lib/promiscuous/subscriber/lint/attributes.rb
217
- - lib/promiscuous/subscriber/mongoid/embedded_many.rb
218
- - lib/promiscuous/subscriber/mongoid/embedded.rb
219
- - lib/promiscuous/subscriber/worker/runner.rb
165
+ - lib/promiscuous/publisher/mock_generator.rb
166
+ - lib/promiscuous/publisher/context.rb
167
+ - lib/promiscuous/publisher/worker.rb
168
+ - lib/promiscuous/subscriber/worker/recorder.rb
220
169
  - lib/promiscuous/subscriber/worker/pump.rb
221
- - lib/promiscuous/subscriber/worker/message.rb
170
+ - lib/promiscuous/subscriber/worker/stats.rb
222
171
  - lib/promiscuous/subscriber/worker/message_synchronizer.rb
223
- - lib/promiscuous/subscriber/active_record.rb
224
- - lib/promiscuous/subscriber/envelope.rb
225
- - lib/promiscuous/subscriber/upsert.rb
226
- - lib/promiscuous/subscriber/polymorphic.rb
227
- - lib/promiscuous/subscriber/attributes.rb
228
- - lib/promiscuous/subscriber/base.rb
229
- - lib/promiscuous/subscriber/class.rb
230
- - lib/promiscuous/subscriber/lint.rb
231
- - lib/promiscuous/subscriber/mongoid.rb
232
- - lib/promiscuous/subscriber/observer.rb
233
- - lib/promiscuous/subscriber/amqp.rb
234
- - lib/promiscuous/subscriber/dummy.rb
172
+ - lib/promiscuous/subscriber/worker/message.rb
173
+ - lib/promiscuous/subscriber/worker/runner.rb
174
+ - lib/promiscuous/subscriber/model/active_record.rb
175
+ - lib/promiscuous/subscriber/model/mongoid.rb
176
+ - lib/promiscuous/subscriber/model/base.rb
177
+ - lib/promiscuous/subscriber/model/observer.rb
235
178
  - lib/promiscuous/subscriber/model.rb
179
+ - lib/promiscuous/subscriber/payload.rb
180
+ - lib/promiscuous/subscriber/operation.rb
236
181
  - lib/promiscuous/subscriber/worker.rb
237
- - lib/promiscuous/error/subscriber.rb
238
- - lib/promiscuous/error/publisher.rb
182
+ - lib/promiscuous/error/already_processed.rb
183
+ - lib/promiscuous/error/base.rb
239
184
  - lib/promiscuous/error/connection.rb
240
- - lib/promiscuous/error/recover.rb
241
- - lib/promiscuous/ephemeral.rb
185
+ - lib/promiscuous/error/lock_unavailable.rb
186
+ - lib/promiscuous/error/publisher.rb
187
+ - lib/promiscuous/error/recovery.rb
188
+ - lib/promiscuous/error/subscriber.rb
189
+ - lib/promiscuous/error/lost_lock.rb
190
+ - lib/promiscuous/error/missing_context.rb
191
+ - lib/promiscuous/error/dependency.rb
242
192
  - lib/promiscuous/autoload.rb
243
- - lib/promiscuous/loader.rb
244
- - lib/promiscuous/railtie.rb
245
- - lib/promiscuous/common.rb
246
- - lib/promiscuous/publisher.rb
247
193
  - lib/promiscuous/subscriber.rb
248
- - lib/promiscuous/redis.rb
249
- - lib/promiscuous/observer.rb
194
+ - lib/promiscuous/dsl.rb
195
+ - lib/promiscuous/convenience.rb
196
+ - lib/promiscuous/key.rb
197
+ - lib/promiscuous/publisher.rb
250
198
  - lib/promiscuous/error.rb
251
- - lib/promiscuous/amqp.rb
199
+ - lib/promiscuous/sidekiq.rb
200
+ - lib/promiscuous/resque.rb
201
+ - lib/promiscuous/middleware.rb
202
+ - lib/promiscuous/dependency.rb
252
203
  - lib/promiscuous/cli.rb
204
+ - lib/promiscuous/redis.rb
205
+ - lib/promiscuous/timer.rb
206
+ - lib/promiscuous/amqp.rb
253
207
  - lib/promiscuous/config.rb
208
+ - lib/promiscuous/railtie.rb
209
+ - lib/promiscuous/loader.rb
254
210
  - lib/promiscuous/version.rb
255
211
  - lib/promiscuous.rb
256
212
  - bin/promiscuous
257
- - README.md
258
213
  homepage: http://github.com/crowdtap/promiscuous
259
214
  licenses: []
260
215
  post_install_message:
@@ -262,20 +217,20 @@ rdoc_options: []
262
217
  require_paths:
263
218
  - lib
264
219
  required_ruby_version: !ruby/object:Gem::Requirement
265
- none: false
266
220
  requirements:
267
221
  - - ! '>='
268
222
  - !ruby/object:Gem::Version
269
223
  version: '0'
270
- required_rubygems_version: !ruby/object:Gem::Requirement
271
224
  none: false
225
+ required_rubygems_version: !ruby/object:Gem::Requirement
272
226
  requirements:
273
227
  - - ! '>='
274
228
  - !ruby/object:Gem::Version
275
229
  version: '0'
230
+ none: false
276
231
  requirements: []
277
232
  rubyforge_project:
278
- rubygems_version: 1.8.24
233
+ rubygems_version: 1.8.25
279
234
  signing_key:
280
235
  specification_version: 3
281
236
  summary: Model replication over RabbitMQ