kennonkwok/rabbitmq — pull request #140 by shunwen (2014-09-15 05:55:45+00:00)
Title: Fixed user_has_tag? issue when name and tag are the same

When passing a user with name "management" and tag "management", the tag won't be created because in `user_has_tag?` method the tag is considered to be existed. I think it'd be easier only run `rabbitmqctl -q list_user management` as command, and parse the result with ruby regex function like:

cmd.run_command
user_list = cmd.stdout # => "management\t[management test]"
tags = user_list.match(/^#{name}\s+\[(.+*)\]/)[1].split # => ["management", "test"]