Skip to content

Commit

Permalink
Switch to Regexp.last_match
Browse files Browse the repository at this point in the history
  • Loading branch information
xjunior committed Jan 24, 2025
1 parent 84e44ed commit 4401942
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion template-dir/hooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end
config = File.read('.overcommit.yml')

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = $1
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
require 'bundler'

begin
Expand Down
2 changes: 1 addition & 1 deletion template-dir/hooks/overcommit-hook
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end
config = File.read('.overcommit.yml')

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = $1
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
require 'bundler'

begin
Expand Down
2 changes: 1 addition & 1 deletion template-dir/hooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end
config = File.read('.overcommit.yml')

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = $1
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
require 'bundler'

begin
Expand Down
2 changes: 1 addition & 1 deletion template-dir/hooks/post-commit
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end
config = File.read('.overcommit.yml')

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = $1
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
require 'bundler'

begin
Expand Down
2 changes: 1 addition & 1 deletion template-dir/hooks/post-merge
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end
config = File.read('.overcommit.yml')

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = $1
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
require 'bundler'

begin
Expand Down
2 changes: 1 addition & 1 deletion template-dir/hooks/post-rewrite
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end
config = File.read('.overcommit.yml')

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = $1
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
require 'bundler'

begin
Expand Down
2 changes: 1 addition & 1 deletion template-dir/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end
config = File.read('.overcommit.yml')

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = $1
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
require 'bundler'

begin
Expand Down
2 changes: 1 addition & 1 deletion template-dir/hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end
config = File.read('.overcommit.yml')

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = $1
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
require 'bundler'

begin
Expand Down
2 changes: 1 addition & 1 deletion template-dir/hooks/pre-rebase
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end
config = File.read('.overcommit.yml')

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = $1
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
require 'bundler'

begin
Expand Down
2 changes: 1 addition & 1 deletion template-dir/hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end
config = File.read('.overcommit.yml')

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = $1
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
require 'bundler'

begin
Expand Down

0 comments on commit 4401942

Please sign in to comment.