rabbitmqadmin-cli 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,29 +1,12 @@
1
1
  require 'json'
2
2
 
3
3
  class RabbitMqAdminCli
4
-
5
- def self.test_connect(host, port, username, password, scheme = "http")
6
- `wget --spider -T 1 -t 1 --user=#{username} --password=#{password} #{scheme}://#{host}:#{port}/img/rabbitmqlogo.png >/dev/null 2>&1`
7
- case $?.exitstatus
8
- when 0, 6
9
- [0, "All OK"]
10
- when 4
11
- [1, "Attempt to connect to #{host}:#{port} timed out"]
12
- when 5
13
- [2, "Using scheme #{scheme}, SSL verification failed"]
14
- else
15
- [3, "General problem, cannot determine if RabbitMq http server is running on #{host}:#{port}"]
16
- end
17
- end
18
-
19
4
  def initialize admin_user = 'guest', admin_password = 'guest', host = 'localhost', port = 55672
20
5
  @admin_user = admin_user
21
6
  @admin_password = admin_password
22
7
  @host = host
23
8
  @port = port
24
9
  @verbose = false
25
- code, msg = self.class.test_connect(@host, @port, @admin_user, @admin_password)
26
- raise msg unless code == 0
27
10
  end
28
11
 
29
12
  attr_accessor :verbose, :host, :port
@@ -1,3 +1,3 @@
1
1
  module RabbitMqAdminCli
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rabbitmqadmin-cli'
3
- s.version = '1.0.7'
3
+ s.version = '1.0.8'
4
4
  s.platform = RUBY_PLATFORM.to_s == 'java' ? 'java' : Gem::Platform::RUBY
5
5
  s.authors = ['Lee Henson', 'Guy Boertje']
6
6
  s.email = ['lee.m.henson@gmail.com', 'guyboertje@gmail.com']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbitmqadmin-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: