Closed slowbro closed 3 years ago
Agreed that's not great. I like your suggestion of teletype
printing a message! This would work well enough for the immediate release v0.11.0
. Then in the next release when the Bundler generator gets replaced, I would use tty-prompt
to ask questions and use the answers to generate already populated gemspec
file. At the moment it would be a lot of hassle to do this as I don't control Bundler executable and would rely on injecting this information with some regex matching which could be fairly brittle. Plus I don't fully agree with some of the defaults generated in the file anyway. I wrote an article about my lessons learnt writing gem specifications.
Describe the problem
A brief description of the issue/feature.
Steps to reproduce the problem
Actual behaviour
When using any
teletype
command, you get a series of exceptions related to metadata:Other errors I ran into while stepping through the errors:
Expected behaviour
I'd expect either a pretty message ("First, modify test-app.gemspec!"), or for the "TODO:" lines to be commented out. The issue was solved by commenting out the 'uri' metadata(s), and modifying the summary/description... but it wasn't immediately obvious (especially since I missed the 'validation error' and went straight to 'wait, what's wrong with rubygems-bundler/noexec?').
I think it could be fixed globally by changing the default spec like this:
Alternatively, if the validations are coming from
tty
itself, maybe just printing a 'update your gemspec first!' message would be enough. Unsure what would be the best approach.Describe your environment