Skip to content
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

Merged
merged 1 commit into from
Oct 12, 2017

Conversation

juliancheal
Copy link
Member

As Amazon is now a single worker with multiple queues, queue_names
can be arrays.

@juliancheal juliancheal force-pushed the arrayify_titleize branch 2 times, most recently from 1817553 to c4ab0ca Compare October 11, 2017 16:39
@juliancheal
Copy link
Member Author

@miq-bot add_label bug

@juliancheal
Copy link
Member Author

@miq-bot assign @agrare

@juliancheal
Copy link
Member Author

I couldn't find an exact spec/ to match RefreshWorker. Any idea where I should add a test for this?

@juliancheal
Copy link
Member Author

@juliancheal
Copy link
Member Author

@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
Copy link
Member

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").

Copy link
Member Author

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.

Copy link
Member Author

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

Copy link
Member Author

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! 😂

@agrare
Copy link
Member

agrare commented Oct 12, 2017

👍 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
@miq-bot
Copy link
Member

miq-bot commented Oct 12, 2017

Checked commit juliancheal@415d229 with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

@agrare agrare added this to the Sprint 71 Ending Oct 16, 2017 milestone Oct 12, 2017
@agrare agrare merged commit 415d229 into ManageIQ:master Oct 12, 2017
agrare added a commit that referenced this pull request Oct 12, 2017
Changed Friendly_name to accept Arrays of queue_names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants