File tree Expand file tree Collapse file tree 10 files changed +40
-30
lines changed Expand file tree Collapse file tree 10 files changed +40
-30
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
2727end
2828
2929# Check if Overcommit should invoke a Bundler context for loading gems
30- config = File . read ( '.overcommit.yml' )
30+ config = File . read ( '.overcommit.yml' ) =~ /gemfile: "?(.*)"?/
31+ gemfile = Regexp . last_match ( 1 )
3132
32- if config =~ / gemfile: "?(.*)"?/
33- ENV [ 'BUNDLE_GEMFILE' ] = Regexp . last_match ( 1 )
33+ if gemfile
34+ ENV [ 'BUNDLE_GEMFILE' ] = gemfile
3435 require 'bundler'
3536
3637 begin
Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
2727end
2828
2929# Check if Overcommit should invoke a Bundler context for loading gems
30- config = File . read ( '.overcommit.yml' )
30+ config = File . read ( '.overcommit.yml' ) =~ /gemfile: "?(.*)"?/
31+ gemfile = Regexp . last_match ( 1 )
3132
32- if config =~ / gemfile: "?(.*)"?/
33- ENV [ 'BUNDLE_GEMFILE' ] = Regexp . last_match ( 1 )
33+ if gemfile
34+ ENV [ 'BUNDLE_GEMFILE' ] = gemfile
3435 require 'bundler'
3536
3637 begin
Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
2727end
2828
2929# Check if Overcommit should invoke a Bundler context for loading gems
30- config = File . read ( '.overcommit.yml' )
30+ config = File . read ( '.overcommit.yml' ) =~ /gemfile: "?(.*)"?/
31+ gemfile = Regexp . last_match ( 1 )
3132
32- if config =~ / gemfile: "?(.*)"?/
33- ENV [ 'BUNDLE_GEMFILE' ] = Regexp . last_match ( 1 )
33+ if gemfile
34+ ENV [ 'BUNDLE_GEMFILE' ] = gemfile
3435 require 'bundler'
3536
3637 begin
Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
2727end
2828
2929# Check if Overcommit should invoke a Bundler context for loading gems
30- config = File . read ( '.overcommit.yml' )
30+ config = File . read ( '.overcommit.yml' ) =~ /gemfile: "?(.*)"?/
31+ gemfile = Regexp . last_match ( 1 )
3132
32- if config =~ / gemfile: "?(.*)"?/
33- ENV [ 'BUNDLE_GEMFILE' ] = Regexp . last_match ( 1 )
33+ if gemfile
34+ ENV [ 'BUNDLE_GEMFILE' ] = gemfile
3435 require 'bundler'
3536
3637 begin
Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
2727end
2828
2929# Check if Overcommit should invoke a Bundler context for loading gems
30- config = File . read ( '.overcommit.yml' )
30+ config = File . read ( '.overcommit.yml' ) =~ /gemfile: "?(.*)"?/
31+ gemfile = Regexp . last_match ( 1 )
3132
32- if config =~ / gemfile: "?(.*)"?/
33- ENV [ 'BUNDLE_GEMFILE' ] = Regexp . last_match ( 1 )
33+ if gemfile
34+ ENV [ 'BUNDLE_GEMFILE' ] = gemfile
3435 require 'bundler'
3536
3637 begin
Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
2727end
2828
2929# Check if Overcommit should invoke a Bundler context for loading gems
30- config = File . read ( '.overcommit.yml' )
30+ config = File . read ( '.overcommit.yml' ) =~ /gemfile: "?(.*)"?/
31+ gemfile = Regexp . last_match ( 1 )
3132
32- if config =~ / gemfile: "?(.*)"?/
33- ENV [ 'BUNDLE_GEMFILE' ] = Regexp . last_match ( 1 )
33+ if gemfile
34+ ENV [ 'BUNDLE_GEMFILE' ] = gemfile
3435 require 'bundler'
3536
3637 begin
Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
2727end
2828
2929# Check if Overcommit should invoke a Bundler context for loading gems
30- config = File . read ( '.overcommit.yml' )
30+ config = File . read ( '.overcommit.yml' ) =~ /gemfile: "?(.*)"?/
31+ gemfile = Regexp . last_match ( 1 )
3132
32- if config =~ / gemfile: "?(.*)"?/
33- ENV [ 'BUNDLE_GEMFILE' ] = Regexp . last_match ( 1 )
33+ if gemfile
34+ ENV [ 'BUNDLE_GEMFILE' ] = gemfile
3435 require 'bundler'
3536
3637 begin
Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
2727end
2828
2929# Check if Overcommit should invoke a Bundler context for loading gems
30- config = File . read ( '.overcommit.yml' )
30+ config = File . read ( '.overcommit.yml' ) =~ /gemfile: "?(.*)"?/
31+ gemfile = Regexp . last_match ( 1 )
3132
32- if config =~ / gemfile: "?(.*)"?/
33- ENV [ 'BUNDLE_GEMFILE' ] = Regexp . last_match ( 1 )
33+ if gemfile
34+ ENV [ 'BUNDLE_GEMFILE' ] = gemfile
3435 require 'bundler'
3536
3637 begin
Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
2727end
2828
2929# Check if Overcommit should invoke a Bundler context for loading gems
30- config = File . read ( '.overcommit.yml' )
30+ config = File . read ( '.overcommit.yml' ) =~ /gemfile: "?(.*)"?/
31+ gemfile = Regexp . last_match ( 1 )
3132
32- if config =~ / gemfile: "?(.*)"?/
33- ENV [ 'BUNDLE_GEMFILE' ] = Regexp . last_match ( 1 )
33+ if gemfile
34+ ENV [ 'BUNDLE_GEMFILE' ] = gemfile
3435 require 'bundler'
3536
3637 begin
Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
2727end
2828
2929# Check if Overcommit should invoke a Bundler context for loading gems
30- config = File . read ( '.overcommit.yml' )
30+ config = File . read ( '.overcommit.yml' ) =~ /gemfile: "?(.*)"?/
31+ gemfile = Regexp . last_match ( 1 )
3132
32- if config =~ / gemfile: "?(.*)"?/
33- ENV [ 'BUNDLE_GEMFILE' ] = Regexp . last_match ( 1 )
33+ if gemfile
34+ ENV [ 'BUNDLE_GEMFILE' ] = gemfile
3435 require 'bundler'
3536
3637 begin
You can’t perform that action at this time.
0 commit comments