-
Notifications
You must be signed in to change notification settings - Fork 289
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
Fixes #36482 - Use string keys for accessing 'arch' and 'minor' in re… #10616
Conversation
Issues: #36482 |
Katello::Content.substitute_content_path(arch: repo[:arch], | ||
releasever: repo[:minor], | ||
Katello::Content.substitute_content_path(arch: repo['arch'], | ||
releasever: repo['minor'], | ||
content_path: content_path) |
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.
Can we do something like:
repo_hash = HashWithIndifferentAccess.new(repo) and then we won't have to worry about symbol or string key access?
Thoughts?
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.
I initially wanted this approach, but decided against it because I wasn't sure about performance characteristics in case results
or repo
is particularly large.
If you think it's fine, I'll happily make the change.
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.
I like @wbclark 's approach better. That is more because contents of the repo results themselves are not returned. We are instead returning a list of string paths
Only thing I 'd suggest adding is a Unit test.
8e6da99
to
f1f7f58
Compare
Let's give this a shot... |
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.
ACK pending rubocop
f1f7f58
to
5c11c02
Compare
…po hash