-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed Friendly_name to accept Arrays of queue_names #16172
Conversation
1817553
to
c4ab0ca
Compare
@miq-bot add_label bug |
I couldn't find an exact |
@blomquisg @Fryguy what do you think? |
@@ -9,7 +9,7 @@ def friendly_name | |||
@friendly_name ||= begin | |||
ems = ext_management_system | |||
if ems.nil? | |||
queue_name.titleize | |||
queue_name.kind_of?(Array) ? queue_name.collect(&:upcase) : queue_name.titleize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about queue_name.collect(&:titleize).join(", ")
so you'll get: Ems 1, Ems 2, Ems 3
which is similar to what queue_name.titleize
would give you for a single ems ("Ems 1"
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, yeah I wasn't too sure what the output should be. So thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, I just realised I called upcase
not titleize
#fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, I just realised I called upcase not titleize #fail
I think my brain was off, and I just followed Rubocops example! 😂
👍 Looks good, can you squash those commits and add the BZ link to the commit message? |
As Amazon is now a single worker with multiple queues, queue_names can be arrays. Joining array to match format of single queue_name This fixes BZ https://bugzilla.redhat.com/show_bug.cgi?id=1500429
c30a2ea
to
415d229
Compare
Checked commit juliancheal@415d229 with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0 |
Changed Friendly_name to accept Arrays of queue_names
As Amazon is now a single worker with multiple queues, queue_names
can be arrays.