rabbitmq-cluster 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,4 @@
1
1
  require 'rabbitmq_manager'
2
- require 'json'
3
2
 
4
3
  class RabbitMQManager
5
4
  def aliveness_test(vhost)
@@ -66,7 +65,7 @@ module RabbitMQ::Cluster
66
65
  client.user_set_permissions('guest', 'aliveness-test', '.*', '.*', '.*')
67
66
  end
68
67
 
69
- JSON.parse(client.aliveness_test('aliveness-test'))['status'] == 'ok'
68
+ client.aliveness_test('aliveness-test')['status'] == 'ok'
70
69
  end
71
70
 
72
71
  def join_cluster
@@ -1,5 +1,5 @@
1
1
  module RabbitMQ
2
2
  module Cluster
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ describe RabbitMQ::Cluster::Server do
29
29
  let(:client) { double(:client).as_null_object }
30
30
 
31
31
  before do
32
- allow(client).to receive(:aliveness_test).and_return('{ "status":"ok" }')
32
+ allow(client).to receive(:aliveness_test).and_return({ "status" => "ok" })
33
33
  end
34
34
 
35
35
  it 'returns false if we cannot connect to the management api' do
@@ -71,7 +71,7 @@ describe RabbitMQ::Cluster::Server do
71
71
 
72
72
  context 'the aliveness test is not working' do
73
73
  before do
74
- allow(client).to receive(:aliveness_test).and_return('{ "status":"borked" }')
74
+ allow(client).to receive(:aliveness_test).and_return({ "status" => "borked" })
75
75
  end
76
76
 
77
77
  specify { expect(subject).to_not be_up }
@@ -84,7 +84,7 @@ describe RabbitMQ::Cluster::Server do
84
84
 
85
85
  before do
86
86
  allow(subject).to receive(:system)
87
- allow(client).to receive(:aliveness_test).and_return('{ "status":"ok" }')
87
+ allow(client).to receive(:aliveness_test).and_return({ "status" => "ok" })
88
88
  allow(File).to receive(:open)
89
89
  allow(IO).to receive(:read)
90
90
  allow(subject).to receive(:"`")
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.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  segments:
146
146
  - 0
147
- hash: 4339417511143423344
147
+ hash: 1600397402041588985
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  segments:
155
155
  - 0
156
- hash: 4339417511143423344
156
+ hash: 1600397402041588985
157
157
  requirements: []
158
158
  rubyforge_project:
159
159
  rubygems_version: 1.8.25