davetron5000 / optparse-plus

Start your command line scripts off right in Ruby
http://davetron5000.github.com/optparse-plus
Apache License 2.0
521 stars 54 forks source link

Bundler still mad about `todo` #135

Closed jorge0136 closed 3 years ago

jorge0136 commented 3 years ago

This seems to be more or less a reincarnation of this prior issue. This time around bundle chokes on two configurations. When rendered in the gemspec they look like this --

  spec.metadata["source_code_uri"] = "to-do: Put your gem's public repo URL here."
  spec.metadata["changelog_uri"] = "to-do: Put your gem's CHANGELOG.md URL here."

Reproduction steps for creating an offending gemspec can be found at step 13 of this issue.

The error triggered when attempting to bundle install

The gemspec at /clean_root/bash-taming-magic/bash-taming-magic.gemspec is not valid. Please fix this gemspec.
The validation error was 'metadata['source_code_uri'] has invalid link: "to-do: Put your gem's public repo URL here."'

It appears that bundle is looking for more than the disallowed TODO and FIXME, it's looking to validate these two URIs. I can think of a few possible solutions:

  1. When generating the gemspec, comment out these lines by convention. Users would need to uncomment these lines when they wanted to publish the gem.
  2. Expose a new flag to the bootstrap CLI to allow users to indicate their intent to publish their CLI tool as a gem. I haven't yet come up with a flag name that encapsulates that idea. There are probably a few slightly different possible interfaces there.
  3. I don't think this makes much sense but these lines could be removed from the gemspec.
davetron5000 commented 3 years ago

Closing in favor of #137 that captures the poor state of the scaffold

FWIW, I think commenting this stuff out is probably the right call. I hate that bundler does this.