Skip to content

Commit

Permalink
Ignore bundle binstubs
Browse files Browse the repository at this point in the history
Those who want to avoid typing `bundle exec` before each command that is
provided by a dependent gem, e.g. `yard`, `rspec`, `rubocop` itself,
Bundler provides a convenient way of creating binstubs in `bin`
directory. Commands can be run like `bin/yard`, `bin/rspec` etc then.

This can further simplify the usage by employing
[`direnv`](https://github.com/direnv/direnv) that has a nice option in
its `.envrc` file:

    PATH_add bin

After that (and approving `.envrc` changes with `direnv allow`) it's
possible to run `yard`, `rspec` and `rubocop` with no prefixes. I stick
to this in every repository I contribute to even if I have to deal with
unstaged changes in my `bin`.

Bundle doesn't generate those buildstubs accroding to best practices, so
we're better ignore them from internal investigations. Those are
machine-generated files for the machines.
  • Loading branch information
pirj authored and bbatsov committed Jun 7, 2020
1 parent acdab2e commit 11dce97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ TAGS

# For rubinius:
#*.rbc

# For bundle binstubs
bin/*
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ AllCops:
- 'spec/fixtures/**/*'
- 'tmp/**/*'
- '.git/**/*'
- 'bin/*'
TargetRubyVersion: 2.4

Naming/PredicateName:
Expand Down

0 comments on commit 11dce97

Please sign in to comment.