rabbitmq-cluster 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,6 @@
1
1
  require 'rabbitmq/cluster'
2
2
 
3
- server = RabbitMQ::Cluster::Server.new(
4
- RabbitMQManager.new('http://guest:guest@localhost:15672'),
5
- RabbitMQ::Cluster::Etcd.new(
6
- Etcd::Client.new(uri: ENV['ETCD_HOST'])
7
- )
8
- )
9
-
3
+ server = RabbitMQ::Cluster::Server.build
10
4
  server.start
11
5
 
12
6
  while true do
@@ -1,11 +1,6 @@
1
1
  require 'rabbitmq/cluster'
2
2
 
3
- server = RabbitMQ::Cluster::Server.new(
4
- RabbitMQManager.new('http://guest:guest@localhost:15672'),
5
- RabbitMQ::Cluster::Etcd.new(
6
- Etcd::Client.new(uri: ENV['ETCD_HOST'])
7
- )
8
- )
3
+ server = RabbitMQ::Cluster::Server.build
9
4
 
10
5
  while true do
11
6
  server.healthcheck
@@ -11,6 +11,15 @@ module RabbitMQ::Cluster
11
11
  attr_accessor :client, :etcd
12
12
  private :client, :etcd
13
13
 
14
+ def self.build
15
+ new(
16
+ RabbitMQManager.new(ENV['RABBITMQ_MNGR'] || 'http://guest:guest@localhost:15672'),
17
+ RabbitMQ::Cluster::Etcd.new(
18
+ Etcd::Client.new(uri: ENV['ETCD_HOST'])
19
+ )
20
+ )
21
+ end
22
+
14
23
  def initialize(client, etcd)
15
24
  self.client = client
16
25
  self.etcd = etcd
@@ -1,5 +1,5 @@
1
1
  module RabbitMQ
2
2
  module Cluster
3
- VERSION = "0.0.10"
3
+ VERSION = "0.0.11"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbitmq-cluster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-11 00:00:00.000000000 Z
12
+ date: 2014-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rabbitmq_manager
@@ -146,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  segments:
148
148
  - 0
149
- hash: -240540097057601169
149
+ hash: -1898050737678359289
150
150
  required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  none: false
152
152
  requirements:
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  segments:
157
157
  - 0
158
- hash: -240540097057601169
158
+ hash: -1898050737678359289
159
159
  requirements: []
160
160
  rubyforge_project:
161
161
  rubygems_version: 1.8.25