Skip to content

Commit

Permalink
Move executables to exe folder (#1366)
Browse files Browse the repository at this point in the history
Conventionally `bin` folder is home to scripts that are meant to be run by developers working on the project, whereas the `exe` folder is used for executables that are meant to be exported by the gem.

The guidance from the Bundler team around this has been live since 2015: https://bundler.io/blog/2015/03/20/moving-bins-to-exe.html

This PR simplifies the gemspec and updates the `bin` folder to `exe` in the gemspec and removes some of the unnecessarily cleanup that was introduced previously.
  • Loading branch information
paracycle committed Apr 5, 2024
1 parent 3573373 commit 45a6500
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
File renamed without changes.
9 changes: 4 additions & 5 deletions stripe.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ Gem::Specification.new do |s|
/\A\.rubocop/,
/\A\.travis.yml/,
/\A\.vscode/,
%r{\A(bin/tapioca)},
/\Abin/,
/\Asorbet/,
/\Atest/
)
s.files = `git ls-files`.split("\n").reject { |f| ignored.match(f) }
s.executables = `git ls-files -- bin/*`.split("\n")
.map { |f| File.basename(f) }
.reject { |f| f == "tapioca" }
s.files = `git ls-files`.split("\n").grep_v(ignored)
s.bindir = "exe"
s.executables = `git ls-files -- exe/*`.split("\n").map { |f| File.basename(f) }
s.require_paths = ["lib"]
end

0 comments on commit 45a6500

Please sign in to comment.