File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1
1
.bundle
2
+ Gemfile.local
3
+ Gemfile.local.lock
2
4
# Rubymine project directory
3
5
.idea
4
6
# Sublime Text project directory (not created by ST by default)
Original file line number Diff line number Diff line change 2
2
# Use bundler to load dependencies
3
3
#
4
4
5
- ENV [ 'BUNDLE_GEMFILE' ] ||= ::File . expand_path ( ::File . join ( ::File . dirname ( __FILE__ ) , ".." , "Gemfile" ) )
5
+ GEMFILE_EXTENSIONS = [
6
+ '.local' ,
7
+ ''
8
+ ]
9
+
10
+ unless ENV [ 'BUNDLE_GEMFILE' ]
11
+ require 'pathname'
12
+
13
+ msfenv_real_pathname = Pathname . new ( __FILE__ ) . realpath
14
+ root = msfenv_real_pathname . parent . parent
15
+
16
+ GEMFILE_EXTENSIONS . each do |extension |
17
+ extension_pathname = root . join ( "Gemfile#{ extension } " )
18
+
19
+ if extension_pathname . readable?
20
+ ENV [ 'BUNDLE_GEMFILE' ] = extension_pathname . to_path
21
+ break
22
+ end
23
+ end
24
+ end
25
+
6
26
begin
7
27
require 'bundler/setup'
8
28
rescue ::LoadError
You can’t perform that action at this time.
0 commit comments