Skip to content
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

Don't export development scripts #2

Merged
merged 1 commit into from Jul 2, 2019

Conversation

Projects
None yet
2 participants
@orien
Copy link
Contributor

commented Jul 2, 2019

I notice this gem is exporting the console and setup scripts as gem executables. I think this is a bug, these scripts should only be used during development of the library and not included for general use with the packaged gem.

Interestingly these scripts are provided in both the bin directory and the script directory.

I've assumed the script directory is the one for development-only scripts and the bin directory is where we want to export general-purpose executables. So I've deleted bin/setup and bin/console, and aligned the gemspec to point to just the bin directory (it was a mixture of bin and script).

Don't export development scripts
The console and setup scripts should only be used when developing this
library. Let's not export them for general use with the package gem.
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = "bin"
spec.executables = spec.files.grep(%r{^script/}) { |f| File.basename(f) }
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }

This comment has been minimized.

Copy link
@orien

orien Jul 2, 2019

Author Contributor

This combined with line 17 mean that only scripts in the bin directory that have been checked into SCM will be exported as executables.

@skorks

This comment has been minimized.

Copy link
Owner

commented Jul 2, 2019

thanks @orien looks good!

@skorks skorks merged commit ca5df69 into skorks:master Jul 2, 2019

@orien

This comment has been minimized.

Copy link
Contributor Author

commented Jul 2, 2019

Thanks @skorks! So fast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.