<broker> improve Gemfile loading + bug 993250 #3294
<broker> improve Gemfile loading + bug 993250 #3294
Conversation
|
Example output: |
|
[test] |
|
Origin Test Results: SUCCESS (https://originci-openshift.rhcloud.com/job/test_pull_requests/1658/) |
|
Online Test Results: Running (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests/3820/) |
| plugins = Dir[(ENV['OPENSHIFT_CONF_DIR'] || "/etc/openshift") + '/plugins.d/*.conf']. | ||
| map {|file| File.basename(file, ".conf") } | ||
| # in development, load if there is a -dev.conf file, even if no prod.conf | ||
| group :development do; plugins.map! {|name| name.sub(/-dev$/, '')}; end |
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.
don't use do; ; end, always break those out:
group :development do
plugins.map!{ ... }
end
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.
Why?
I would have used { } instead of do / end, but ruby didn't seem to like that (guess I could put the symbol in parens...)
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.
Our coding style is only use curly braces on the same line, do/end on new lines. However, the standard style for gemfile is for group blocks to always be using the new line indentation. It improves readability and there's no reason to shortcut it
https://bugzilla.redhat.com/show_bug.cgi?id=993250 Bundler load failures are wrapped and re-interpreted for OpenShift instead of telling the user to "bundle install" OPENSHIFT_CONF_DIR overrides /etc/openshift base for broker config files Gemfile loads plugins even if just the -dev.conf file is present Plugins are loaded in sorted order, in case it matters
|
[merge] |
|
Evaluated for origin up to 0771a6d |
|
Evaluated for online up to 0771a6d |
|
Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/merge_pull_requests/3430/) (Image: devenv_3648) |
Merged by openshift-bot
https://bugzilla.redhat.com/show_bug.cgi?id=993250
Bundler load failures are wrapped and re-interpreted for OpenShift
instead of telling the user to "bundle install"
OPENSHIFT_CONF_DIR overrides /etc/openshift base for broker config files
Gemfile loads plugins even if just the -dev.conf file is present
Plugins are loaded in sorted order, in case it matters