Skip to content

Commit

Permalink
Merge pull request redhat-openstack#254 from misterdorm/pluginparsing
Browse files Browse the repository at this point in the history
Use -m flag on rabbitmq-plugins command for managing rabbitmq_plugin res...
  • Loading branch information
cmurphy committed Dec 5, 2014
2 parents 3ff4dd1 + d262edb commit f7b1f33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
defaultfor :feature => :posix

def self.instances
rabbitmqplugins('list', '-E').split(/\n/).map do |line|
if line.split(/\s+/)[1] =~ /^(\S+)$/
rabbitmqplugins('list', '-E', '-m').split(/\n/).map do |line|
if line =~ /^(\S+)$/
new(:name => $1)
else
raise Puppet::Error, "Cannot parse invalid plugins line: #{line}"
Expand All @@ -39,8 +39,8 @@ def destroy
end

def exists?
rabbitmqplugins('list', '-E').split(/\n/).detect do |line|
line.split(/\s+/)[1].match(/^#{resource[:name]}$/)
rabbitmqplugins('list', '-E', '-m').split(/\n/).detect do |line|
line.match(/^#{resource[:name]}$/)
end
end

Expand Down

0 comments on commit f7b1f33

Please sign in to comment.