add Gem::Specification#bindir to the template of gemspec so that user can change their executables dir easily #2384

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

okitan commented Mar 11, 2013

I sometimes change executables dir from bin to exe.
I opened gemspec and edited "spec.executables", but after releasing my gem I found executables installed did not work.

That is because installed executables loads file under bindir, but bindir is still bin.

I should also edit not only spec.executables but also "spec.bindir".

When default gemspec have the Gem::Specification#bindir and Gem::Specification#executables uses it, No mistake like me will happen.

Regards,
okitan

Contributor

coop commented Mar 11, 2013

Another nice addition to this would be to allow passing --bindir=exec to bundle gem.

Owner

indirect commented Mar 12, 2013

Thanks for the patch! I think that instead of adding every possible Gem::Specification option to the gemspec template, we should add a comment with a link to the documentation for Gem::Specification instead. That way we don't need to generate empty or default values for all the options. What do you think?

okitan commented Mar 13, 2013

Well, I don't think it is a good idea of adding every possible option to the template in that it requires update when Gem::Specification have a change. We have to avoid unnecessary adding to the template, but I think bindir is helpful for users.

Owner

indirect commented Aug 4, 2013

I would like to avoid adding any more items directly to the template. I will merge a patch pointing to the documentation, but the current gemspec is as complicated as the default is going to get. Thanks for your submission!

indirect closed this Aug 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment