File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ def preload
116
116
raise e unless initialized?
117
117
ensure
118
118
watcher . add loaded_application_features
119
- watcher . add Spring . gemfile , " #{ Spring . gemfile } .lock"
119
+ watcher . add Spring . gemfile , Spring . gemfile_lock
120
120
121
121
if defined? ( Rails ) && Rails . application
122
122
watcher . add Rails . application . paths [ "config/initializers" ]
Original file line number Diff line number Diff line change @@ -8,12 +8,21 @@ def gemfile
8
8
require "bundler"
9
9
10
10
if /\s 1.9.[0-9]/ === Bundler . ruby_scope . gsub ( /[\/ \s ]+/ , '' )
11
- ENV [ "BUNDLE_GEMFILE" ] || "Gemfile"
11
+ Pathname . new ( ENV [ "BUNDLE_GEMFILE" ] || "Gemfile" ) . expand_path
12
12
else
13
13
Bundler . default_gemfile
14
14
end
15
15
end
16
16
17
+ def gemfile_lock
18
+ case gemfile . to_s
19
+ when /\b gems\. rb\z /
20
+ gemfile . sub_ext ( '.locked' )
21
+ else
22
+ gemfile . sub_ext ( '.lock' )
23
+ end
24
+ end
25
+
17
26
def after_fork_callbacks
18
27
@after_fork_callbacks ||= [ ]
19
28
end
You can’t perform that action at this time.
0 commit comments