rabbitmqadmin-cli 1.0.2-java → 1.0.4-java
Sign up to get free protection for your applications and to get access to all the features.
- data/README +7 -0
- data/lib/rabbitmqadmin-cli.rb +7 -5
- data/lib/rabbitmqadmin-cli/version.rb +1 -1
- data/rabbitmqadmin-cli.gemspec +2 -1
- metadata +48 -54
data/README
ADDED
data/lib/rabbitmqadmin-cli.rb
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
require 'json'
|
2
2
|
|
3
3
|
class RabbitMqAdminCli
|
4
|
-
def initialize admin_user = 'guest', admin_password = 'guest'
|
4
|
+
def initialize admin_user = 'guest', admin_password = 'guest', host = 'localhost', port = 55672
|
5
5
|
@admin_user = admin_user
|
6
6
|
@admin_password = admin_password
|
7
|
+
@host = host
|
8
|
+
@port = port
|
7
9
|
@verbose = false
|
8
10
|
end
|
9
11
|
|
10
|
-
attr_accessor :verbose
|
12
|
+
attr_accessor :verbose, :host, :port
|
11
13
|
|
12
14
|
def delete_exchanges
|
13
15
|
list_exchanges.each { |exchange| execute "#{stub vhost} delete exchange name=#{exchange[:name]}" }
|
@@ -34,7 +36,7 @@ class RabbitMqAdminCli
|
|
34
36
|
def stub vhost = nil
|
35
37
|
vhost_arg = vhost.nil? ? '' : "-V #{vhost}"
|
36
38
|
|
37
|
-
"rabbitmqadmin -u #{@admin_user} -p #{@admin_password} -f raw_json #{vhost_arg}"
|
39
|
+
"rabbitmqadmin -H #{@host} -P #{@port} -u #{@admin_user} -p #{@admin_password} -f raw_json #{vhost_arg}"
|
38
40
|
end
|
39
41
|
|
40
42
|
def list_bindings vhost
|
@@ -57,8 +59,8 @@ class RabbitMqAdminCli
|
|
57
59
|
parse execute("#{stub} list vhosts")
|
58
60
|
end
|
59
61
|
|
60
|
-
def purge_queues
|
61
|
-
list_queues.each { |queue| execute "#{stub vhost} purge queue name=#{queue[:name]}" }
|
62
|
+
def purge_queues vhost
|
63
|
+
list_queues(vhost).each { |queue| execute "#{stub vhost} purge queue name=#{queue[:name]}" }
|
62
64
|
end
|
63
65
|
|
64
66
|
def user_exists? user
|
data/rabbitmqadmin-cli.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'rabbitmqadmin-cli'
|
3
|
-
s.version = '1.0.
|
3
|
+
s.version = '1.0.4'
|
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']
|
@@ -11,6 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
# = MANIFEST =
|
12
12
|
s.files = %w[
|
13
13
|
Gemfile
|
14
|
+
README
|
14
15
|
Rakefile
|
15
16
|
lib/rabbitmqadmin-cli.rb
|
16
17
|
lib/rabbitmqadmin-cli/version.rb
|
metadata
CHANGED
@@ -1,73 +1,67 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbitmqadmin-cli
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 1.0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 1.0.4
|
6
6
|
platform: java
|
7
|
-
authors:
|
8
|
-
|
9
|
-
|
10
|
-
autorequire:
|
7
|
+
authors:
|
8
|
+
- Lee Henson
|
9
|
+
- Guy Boertje
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
version_requirements: *id001
|
13
|
+
date: 2011-10-07 00:00:00.000000000 +01:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: json-jruby
|
18
|
+
version_requirements: &2202 !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
none: false
|
24
|
+
requirement: *2202
|
25
|
+
prerelease: false
|
26
|
+
type: :runtime
|
28
27
|
description: Requires rabbitmqadmin to be in your path
|
29
|
-
email:
|
30
|
-
|
31
|
-
|
28
|
+
email:
|
29
|
+
- lee.m.henson@gmail.com
|
30
|
+
- guyboertje@gmail.com
|
32
31
|
executables: []
|
33
|
-
|
34
32
|
extensions: []
|
35
|
-
|
36
33
|
extra_rdoc_files: []
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
34
|
+
files:
|
35
|
+
- Gemfile
|
36
|
+
- README
|
37
|
+
- Rakefile
|
38
|
+
- lib/rabbitmqadmin-cli.rb
|
39
|
+
- lib/rabbitmqadmin-cli/version.rb
|
40
|
+
- rabbitmqadmin-cli.gemspec
|
44
41
|
has_rdoc: true
|
45
42
|
homepage: http://github.com/leemhenson/rabbitmqadmin-cli
|
46
43
|
licenses: []
|
47
|
-
|
48
|
-
post_install_message:
|
44
|
+
post_install_message:
|
49
45
|
rdoc_options: []
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
46
|
+
require_paths:
|
47
|
+
- lib
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ! '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
54
53
|
none: false
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ! '>='
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
60
59
|
none: false
|
61
|
-
requirements:
|
62
|
-
- - ">="
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
version: "0"
|
65
60
|
requirements: []
|
66
|
-
|
67
|
-
rubyforge_project:
|
61
|
+
rubyforge_project:
|
68
62
|
rubygems_version: 1.5.1
|
69
|
-
signing_key:
|
63
|
+
signing_key:
|
70
64
|
specification_version: 3
|
71
65
|
summary: Ruby wrapper for calling out the rabbitmqadmin cli script
|
72
66
|
test_files: []
|
73
|
-
|
67
|
+
...
|