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 ADDED
@@ -0,0 +1,7 @@
1
+ Follow the instructions found here to get started.
2
+
3
+ http://www.rabbitmq.com/management-cli.html
4
+
5
+ Once rabbitmqadmin is on the path you can use this gem in rake, capistrano or regular ruby.
6
+
7
+ Added parameters to connect to any host/port
@@ -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
@@ -1,3 +1,3 @@
1
1
  module RabbitMqAdminCli
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.4"
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.2'
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.2
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 1.0.4
6
6
  platform: java
7
- authors:
8
- - Lee Henson
9
- - Guy Boertje
10
- autorequire:
7
+ authors:
8
+ - Lee Henson
9
+ - Guy Boertje
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
-
14
- date: 2011-10-02 00:00:00 +01:00
15
- default_executable:
16
- dependencies:
17
- - !ruby/object:Gem::Dependency
18
- name: json-jruby
19
- prerelease: false
20
- requirement: &id001 !ruby/object:Gem::Requirement
21
- none: false
22
- requirements:
23
- - - ">="
24
- - !ruby/object:Gem::Version
25
- version: "0"
26
- type: :runtime
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
- - lee.m.henson@gmail.com
31
- - guyboertje@gmail.com
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
- files:
39
- - Gemfile
40
- - Rakefile
41
- - lib/rabbitmqadmin-cli.rb
42
- - lib/rabbitmqadmin-cli/version.rb
43
- - rabbitmqadmin-cli.gemspec
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
- require_paths:
52
- - lib
53
- required_ruby_version: !ruby/object:Gem::Requirement
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
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- version: "0"
59
- required_rubygems_version: !ruby/object:Gem::Requirement
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
+ ...