aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/app_loader.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 19:15:47 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 19:15:47 +0200
commit69ab3eb57e8387b0dd9d672b5e8d9185395baa03 (patch)
treea49845496e36ba7659a863e6550fcccbb9317d7d /railties/lib/rails/app_loader.rb
parentf8477f13bfe554064bd25a57e5289b4ebaabb504 (diff)
downloadrails-69ab3eb57e8387b0dd9d672b5e8d9185395baa03.tar.gz
rails-69ab3eb57e8387b0dd9d672b5e8d9185395baa03.tar.bz2
rails-69ab3eb57e8387b0dd9d672b5e8d9185395baa03.zip
applies new string literal convention in railties/lib
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
Diffstat (limited to 'railties/lib/rails/app_loader.rb')
-rw-r--r--railties/lib/rails/app_loader.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/railties/lib/rails/app_loader.rb b/railties/lib/rails/app_loader.rb
index af004d85bf..107e47de55 100644
--- a/railties/lib/rails/app_loader.rb
+++ b/railties/lib/rails/app_loader.rb
@@ -1,12 +1,12 @@
-require 'pathname'
-require 'rails/version'
+require "pathname"
+require "rails/version"
module Rails
module AppLoader # :nodoc:
extend self
RUBY = Gem.ruby
- EXECUTABLES = ['bin/rails', 'script/rails']
+ EXECUTABLES = ["bin/rails", "script/rails"]
BUNDLER_WARNING = <<EOS
Looks like your app's ./bin/rails is a stub that was generated by Bundler.
@@ -39,11 +39,11 @@ EOS
if contents =~ /(APP|ENGINE)_PATH/
exec RUBY, exe, *ARGV
break # non reachable, hack to be able to stub exec in the test suite
- elsif exe.end_with?('bin/rails') && contents.include?('This file was generated by Bundler')
+ elsif exe.end_with?("bin/rails") && contents.include?("This file was generated by Bundler")
$stderr.puts(BUNDLER_WARNING)
- Object.const_set(:APP_PATH, File.expand_path('config/application', Dir.pwd))
- require File.expand_path('../boot', APP_PATH)
- require 'rails/commands'
+ Object.const_set(:APP_PATH, File.expand_path("config/application", Dir.pwd))
+ require File.expand_path("../boot", APP_PATH)
+ require "rails/commands"
break
end
end
@@ -53,7 +53,7 @@ EOS
Dir.chdir(original_cwd) and return if Pathname.new(Dir.pwd).root?
# Otherwise keep moving upwards in search of an executable.
- Dir.chdir('..')
+ Dir.chdir("..")
end
end