Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .overcommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ PreCommit:
RuboCop:
enabled: true
command: ['bundle', 'exec', 'rubocop']
include:
- '**/*.gemspec'
- '**/*.rb'
- '**/Gemfile'
- template-dir/hooks/overcommit-hook

TravisLint:
enabled: true
Expand Down
2 changes: 2 additions & 0 deletions template-dir/hooks/overcommit-hook
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ end

# Check if Overcommit should invoke a Bundler context for loading gems
require 'yaml'
# rubocop:disable Style/RescueModifier
if gemfile = YAML.load_file('.overcommit.yml')['gemfile'] rescue nil
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler/setup'
end
# rubocop:enable Style/RescueModifier

begin
require 'overcommit'
Expand Down