Skip to content
Merged
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
10 changes: 2 additions & 8 deletions template-dir/hooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
require 'yaml'
# rubocop:disable Style/RescueModifier
gemfile =
begin
YAML.load_file('.overcommit.yml', aliases: true)['gemfile']
rescue ArgumentError
YAML.load_file('.overcommit.yml')['gemfile']
end rescue nil
config = File.read('.overcommit.yml') =~ /gemfile: ['"]?(.*)['"]?/
gemfile = Regexp.last_match(1)

if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
Expand Down
10 changes: 2 additions & 8 deletions template-dir/hooks/overcommit-hook
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
require 'yaml'
# rubocop:disable Style/RescueModifier
gemfile =
begin
YAML.load_file('.overcommit.yml', aliases: true)['gemfile']
rescue ArgumentError
YAML.load_file('.overcommit.yml')['gemfile']
end rescue nil
config = File.read('.overcommit.yml') =~ /gemfile: ['"]?(.*)['"]?/
gemfile = Regexp.last_match(1)

if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
Expand Down
10 changes: 2 additions & 8 deletions template-dir/hooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
require 'yaml'
# rubocop:disable Style/RescueModifier
gemfile =
begin
YAML.load_file('.overcommit.yml', aliases: true)['gemfile']
rescue ArgumentError
YAML.load_file('.overcommit.yml')['gemfile']
end rescue nil
config = File.read('.overcommit.yml') =~ /gemfile: ['"]?(.*)['"]?/
gemfile = Regexp.last_match(1)

if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
Expand Down
10 changes: 2 additions & 8 deletions template-dir/hooks/post-commit
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
require 'yaml'
# rubocop:disable Style/RescueModifier
gemfile =
begin
YAML.load_file('.overcommit.yml', aliases: true)['gemfile']
rescue ArgumentError
YAML.load_file('.overcommit.yml')['gemfile']
end rescue nil
config = File.read('.overcommit.yml') =~ /gemfile: ['"]?(.*)['"]?/
gemfile = Regexp.last_match(1)

if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
Expand Down
10 changes: 2 additions & 8 deletions template-dir/hooks/post-merge
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
require 'yaml'
# rubocop:disable Style/RescueModifier
gemfile =
begin
YAML.load_file('.overcommit.yml', aliases: true)['gemfile']
rescue ArgumentError
YAML.load_file('.overcommit.yml')['gemfile']
end rescue nil
config = File.read('.overcommit.yml') =~ /gemfile: ['"]?(.*)['"]?/
gemfile = Regexp.last_match(1)

if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
Expand Down
10 changes: 2 additions & 8 deletions template-dir/hooks/post-rewrite
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
require 'yaml'
# rubocop:disable Style/RescueModifier
gemfile =
begin
YAML.load_file('.overcommit.yml', aliases: true)['gemfile']
rescue ArgumentError
YAML.load_file('.overcommit.yml')['gemfile']
end rescue nil
config = File.read('.overcommit.yml') =~ /gemfile: ['"]?(.*)['"]?/
gemfile = Regexp.last_match(1)

if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
Expand Down
10 changes: 2 additions & 8 deletions template-dir/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
require 'yaml'
# rubocop:disable Style/RescueModifier
gemfile =
begin
YAML.load_file('.overcommit.yml', aliases: true)['gemfile']
rescue ArgumentError
YAML.load_file('.overcommit.yml')['gemfile']
end rescue nil
config = File.read('.overcommit.yml') =~ /gemfile: ['"]?(.*)['"]?/
gemfile = Regexp.last_match(1)

if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
Expand Down
10 changes: 2 additions & 8 deletions template-dir/hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
require 'yaml'
# rubocop:disable Style/RescueModifier
gemfile =
begin
YAML.load_file('.overcommit.yml', aliases: true)['gemfile']
rescue ArgumentError
YAML.load_file('.overcommit.yml')['gemfile']
end rescue nil
config = File.read('.overcommit.yml') =~ /gemfile: ['"]?(.*)['"]?/
gemfile = Regexp.last_match(1)

if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
Expand Down
10 changes: 2 additions & 8 deletions template-dir/hooks/pre-rebase
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
require 'yaml'
# rubocop:disable Style/RescueModifier
gemfile =
begin
YAML.load_file('.overcommit.yml', aliases: true)['gemfile']
rescue ArgumentError
YAML.load_file('.overcommit.yml')['gemfile']
end rescue nil
config = File.read('.overcommit.yml') =~ /gemfile: ['"]?(.*)['"]?/
gemfile = Regexp.last_match(1)

if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
Expand Down
10 changes: 2 additions & 8 deletions template-dir/hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
require 'yaml'
# rubocop:disable Style/RescueModifier
gemfile =
begin
YAML.load_file('.overcommit.yml', aliases: true)['gemfile']
rescue ArgumentError
YAML.load_file('.overcommit.yml')['gemfile']
end rescue nil
config = File.read('.overcommit.yml') =~ /gemfile: ['"]?(.*)['"]?/
gemfile = Regexp.last_match(1)

if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
Expand Down
Loading