promiscuous 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -9
- data/lib/promiscuous/config.rb +2 -1
- data/lib/promiscuous/version.rb +1 -1
- metadata +28 -28
data/README.md
CHANGED
@@ -75,6 +75,7 @@ WARNING/TODO
|
|
75
75
|
Promiscuous does **not** handle:
|
76
76
|
- ActiveRecord polymorphism.
|
77
77
|
- Any of the Mongoid atomic operatiors, such as inc, or add_to_set.
|
78
|
+
- Mixing databases (ActiveRecord <=> Mongoid) because of the id format mismatch.
|
78
79
|
- Association magic. Example:
|
79
80
|
```ruby
|
80
81
|
# This will NOT replicate particiation_ids:
|
@@ -101,19 +102,13 @@ equal to 2, while on the subscriber side, the document has a value of 1. This
|
|
101
102
|
will likely not occur in most scenarios BUT BEWARE. We have plans to fix this
|
102
103
|
issue by using version numbers and mongo's amazing findandmodify.
|
103
104
|
|
104
|
-
|
105
|
-
|
105
|
+
Backend: bunny / ruby-amqp
|
106
|
+
--------------------------
|
106
107
|
|
107
|
-
|
108
|
+
Your publisher app may not run an eventmachine loop, which is required for
|
108
109
|
ruby-amqp. Bunny on the other hand allows a non-eventmachine based application
|
109
110
|
to publish messages to rabbitmq.
|
110
111
|
|
111
|
-
How to run the tests
|
112
|
-
--------------------
|
113
|
-
|
114
|
-
rake appraisal:install
|
115
|
-
rake
|
116
|
-
|
117
112
|
Compatibility
|
118
113
|
-------------
|
119
114
|
|
data/lib/promiscuous/config.rb
CHANGED
@@ -3,13 +3,14 @@ module Promiscuous
|
|
3
3
|
mattr_accessor :app, :logger, :error_handler, :backend, :server_uri, :queue_options
|
4
4
|
|
5
5
|
def self.backend=(value)
|
6
|
-
@@backend = "Promiscuous::AMQP::#{value.to_s.camelize.gsub(/amqp/, 'AMQP')}".constantize
|
6
|
+
@@backend = "Promiscuous::AMQP::#{value.to_s.camelize.gsub(/amqp/, 'AMQP')}".constantize unless value.nil?
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.configure(&block)
|
10
10
|
class_variables.each { |var| class_variable_set(var, nil) }
|
11
11
|
|
12
12
|
block.call(self)
|
13
|
+
|
13
14
|
self.backend ||= defined?(EventMachine) && EventMachine.reactor_running? ? :rubyamqp : :bunny
|
14
15
|
self.logger ||= defined?(Rails) ? Rails.logger : Logger.new(STDERR).tap { |l| l.level = Logger::WARN }
|
15
16
|
self.queue_options ||= {:durable => true, :arguments => {'x-ha-policy' => 'all'}}
|
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.6.
|
4
|
+
version: 0.6.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -100,44 +100,44 @@ executables: []
|
|
100
100
|
extensions: []
|
101
101
|
extra_rdoc_files: []
|
102
102
|
files:
|
103
|
-
- lib/promiscuous
|
104
|
-
- lib/promiscuous/
|
105
|
-
- lib/promiscuous/
|
106
|
-
- lib/promiscuous/
|
107
|
-
- lib/promiscuous/
|
103
|
+
- lib/promiscuous.rb
|
104
|
+
- lib/promiscuous/amqp.rb
|
105
|
+
- lib/promiscuous/amqp/bunny.rb
|
106
|
+
- lib/promiscuous/amqp/null.rb
|
107
|
+
- lib/promiscuous/amqp/rubyamqp.rb
|
108
|
+
- lib/promiscuous/loader.rb
|
109
|
+
- lib/promiscuous/publisher.rb
|
108
110
|
- lib/promiscuous/publisher/active_record.rb
|
109
|
-
- lib/promiscuous/publisher/model.rb
|
110
|
-
- lib/promiscuous/publisher/envelope.rb
|
111
111
|
- lib/promiscuous/publisher/amqp.rb
|
112
|
+
- lib/promiscuous/publisher/attributes.rb
|
112
113
|
- lib/promiscuous/publisher/base.rb
|
114
|
+
- lib/promiscuous/publisher/class_bind.rb
|
115
|
+
- lib/promiscuous/publisher/envelope.rb
|
116
|
+
- lib/promiscuous/publisher/model.rb
|
117
|
+
- lib/promiscuous/publisher/mongoid.rb
|
118
|
+
- lib/promiscuous/publisher/mongoid/embedded.rb
|
113
119
|
- lib/promiscuous/publisher/polymorphic.rb
|
114
|
-
- lib/promiscuous/
|
115
|
-
- lib/promiscuous/
|
116
|
-
- lib/promiscuous/
|
117
|
-
- lib/promiscuous/
|
118
|
-
- lib/promiscuous/subscriber/attributes.rb
|
120
|
+
- lib/promiscuous/railtie.rb
|
121
|
+
- lib/promiscuous/railtie/replicate.rake
|
122
|
+
- lib/promiscuous/subscriber.rb
|
123
|
+
- lib/promiscuous/subscriber/active_record.rb
|
119
124
|
- lib/promiscuous/subscriber/active_record/upsert.rb
|
120
|
-
- lib/promiscuous/subscriber/
|
125
|
+
- lib/promiscuous/subscriber/amqp.rb
|
126
|
+
- lib/promiscuous/subscriber/attributes.rb
|
127
|
+
- lib/promiscuous/subscriber/base.rb
|
128
|
+
- lib/promiscuous/subscriber/custom_class.rb
|
129
|
+
- lib/promiscuous/subscriber/envelope.rb
|
121
130
|
- lib/promiscuous/subscriber/error.rb
|
122
131
|
- lib/promiscuous/subscriber/generic.rb
|
123
|
-
- lib/promiscuous/subscriber/
|
132
|
+
- lib/promiscuous/subscriber/model.rb
|
133
|
+
- lib/promiscuous/subscriber/mongoid.rb
|
124
134
|
- lib/promiscuous/subscriber/mongoid/embedded.rb
|
135
|
+
- lib/promiscuous/subscriber/mongoid/root.rb
|
125
136
|
- lib/promiscuous/subscriber/mongoid/upsert.rb
|
126
|
-
- lib/promiscuous/subscriber/active_record.rb
|
127
|
-
- lib/promiscuous/subscriber/model.rb
|
128
|
-
- lib/promiscuous/subscriber/envelope.rb
|
129
|
-
- lib/promiscuous/subscriber/amqp.rb
|
130
|
-
- lib/promiscuous/subscriber/custom_class.rb
|
131
|
-
- lib/promiscuous/subscriber/base.rb
|
132
137
|
- lib/promiscuous/subscriber/polymorphic.rb
|
133
138
|
- lib/promiscuous/worker.rb
|
134
|
-
- lib/promiscuous/railtie/replicate.rake
|
135
|
-
- lib/promiscuous/railtie.rb
|
136
|
-
- lib/promiscuous/loader.rb
|
137
|
-
- lib/promiscuous/amqp.rb
|
138
139
|
- lib/promiscuous/config.rb
|
139
|
-
- lib/promiscuous/
|
140
|
-
- lib/promiscuous.rb
|
140
|
+
- lib/promiscuous/version.rb
|
141
141
|
- README.md
|
142
142
|
homepage: http://github.com/crowdtap/promiscuous
|
143
143
|
licenses: []
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
|
-
rubygems_version: 1.8.
|
162
|
+
rubygems_version: 1.8.24
|
163
163
|
signing_key:
|
164
164
|
specification_version: 3
|
165
165
|
summary: Model replication over RabbitMQ
|