Skip to content

Commit

Permalink
Merge pull request #236 from m1foley/bundler
Browse files Browse the repository at this point in the history
Add instructions for Bundler
  • Loading branch information
jish committed Apr 7, 2016
2 parents 195218a + 21e851b commit 860ce02
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ Use the pre-commit command to generate a stub pre-commit hook

This creates a .git/hooks/pre-commit script which will check your git config and run checks that are enabled.

### Bundler

If you want to use Bundler to specify a version of RuboCop, add the following to `Gemfile`:

```ruby
group :development do
gem "pre-commit", require: false
gem "rubocop", require: false
end
```

And run the following to run `pre-commit` via Bundler:

```
$ git config pre-commit.ruby "bundle exec ruby"
```

### RVM

If you are using rvm you need to install pre-commit into the ```default``` gemset, because it does not use the ```current``` environment
Expand Down

0 comments on commit 860ce02

Please sign in to comment.