-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add default config command #67
base: main
Are you sure you want to change the base?
Conversation
test/fixtures/config
Outdated
@@ -0,0 +1,4 @@ | |||
jobs: | |||
: 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.
Oops... (while jobs
isn't a valid config setting anyway,) this isn't supposed to look like that.
I think this:
Line 20 in 6edbbe0
group, key = key.split(".", 2) |
needs to be followed by something like:
group, key = nil, group if key.nil?
On the other hand, maybe we should change the file format (or group/key format?) to something different. The current behaviour looks not-great when key
is a DNS name, as #73's example shows for packages.shopify.io
. But that's a thought for another day.
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.
With bundle config local.GEM_NAME /path/to/local/git/repository
and bundle config jobs 5
we get the output:
.bundle % cat config
---
BUNDLE_GEM__TEST: "minitest"
BUNDLE_JOBS: "7"
BUNDLE_LOCAL__GEM_NAME: "/path/to/local/git/repository"
To be honest bundlers output is not great either - WDYT? I'm going to give this a little more thought.
end | ||
key, value = line.split(':') | ||
next unless key | ||
result[key.downcase] = value&.strip |
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.
@matthewd I downcased to keep all settings consistent, also strip
the value too. Without the null check &
some tests fail, I think it's because somewhere we are using the default -- bundler version for the config where we run all our tests, is that how it's supposed to work?
Adding a default config command so we can use gel like so;
gel config
Which will output all the default config settings, e.g.
jobs=3
gem.test=minitest
gem.mit=true