Add default config command#67
Conversation
| @@ -0,0 +1,4 @@ | |||
| jobs: | |||
| : 1 | |||
There was a problem hiding this comment.
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
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.
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.
@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 configWhich will output all the default config settings, e.g.
jobs=3
gem.test=minitest
gem.mit=true