From cdde3994b2e423ca35baba2c5f57cd2d98a86f37 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sat, 21 Apr 2018 10:35:28 +1200 Subject: [PATCH] Revert "Auto corrected by following Style/ExpandPathArguments" This reverts commit a5b84403bb9f94f322a7fb89f80d93e1068fbff6. --- Rakefile | 2 +- config/application.rb | 2 +- config/boot.rb | 2 +- config/environment.rb | 2 +- script/rails | 4 ++-- spec/rails_helper.rb | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index 25bd8aea0..7e5e8eed3 100755 --- a/Rakefile +++ b/Rakefile @@ -3,6 +3,6 @@ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require 'rake/dsl_definition' -require File.expand_path('config/application', __dir__) +require File.expand_path('../config/application', __FILE__) Growstuff::Application.load_tasks diff --git a/config/application.rb b/config/application.rb index 9b11cc2a8..ae8d6e95f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,4 +1,4 @@ -require File.expand_path('boot', __dir__) +require File.expand_path('../boot', __FILE__) require 'rails/all' require 'openssl' diff --git a/config/boot.rb b/config/boot.rb index 24efefdb2..f2830ae31 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,6 +1,6 @@ require 'rubygems' # Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) diff --git a/config/environment.rb b/config/environment.rb index b72677751..b175f6a30 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ # Load the rails application -require File.expand_path('application', __dir__) +require File.expand_path('../application', __FILE__) # Initialize the rails application Growstuff::Application.initialize! diff --git a/script/rails b/script/rails index 754b05caa..9092f9f3c 100755 --- a/script/rails +++ b/script/rails @@ -2,6 +2,6 @@ # This command will automatically be run when you run "rails" # with Rails 3 gems installed from the root of your application. -APP_PATH = File.expand_path('../config/application', __dir__) -require File.expand_path('../config/boot', __dir__) +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) require 'rails/commands' diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 862b0316d..e28dd6e24 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -17,7 +17,7 @@ SimpleCov.start :rails do end require 'spec_helper' -require File.expand_path('../config/environment', __dir__) +require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' # Add additional requires below this line. Rails is not loaded until this point! Rails.application.eager_load!