diff options
author | Xavier Noria <fxn@hashref.com> | 2016-03-06 09:55:11 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-03-06 09:55:11 +0100 |
commit | 7d6a8320ee6acc8a54c091eea8607eb8f8ed1423 (patch) | |
tree | f581614ceae191f7c506532702c8c299b0972a37 /railties | |
parent | 5a06beda7e44185ef2a1bbbee58d682ad77a1bd7 (diff) | |
download | rails-7d6a8320ee6acc8a54c091eea8607eb8f8ed1423.tar.gz rails-7d6a8320ee6acc8a54c091eea8607eb8f8ed1423.tar.bz2 rails-7d6a8320ee6acc8a54c091eea8607eb8f8ed1423.zip |
use __dir__ for relative paths in config/boot.rb
Stuff I see in passing while I am doing a walkthrough.
See rationale in 5b8738c.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/boot.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/plugin/templates/rails/boot.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/boot.rb b/railties/lib/rails/generators/rails/app/templates/config/boot.rb index 6b750f00b1..30f5120df6 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/boot.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/boot.rb @@ -1,3 +1,3 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/railties/lib/rails/generators/rails/plugin/templates/rails/boot.rb b/railties/lib/rails/generators/rails/plugin/templates/rails/boot.rb index 6266cfc509..c9aef85d40 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/rails/boot.rb +++ b/railties/lib/rails/generators/rails/plugin/templates/rails/boot.rb @@ -1,5 +1,5 @@ # Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__) require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) -$LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__) +$LOAD_PATH.unshift File.expand_path('../../../lib', __dir__) |