From a5b84403bb9f94f322a7fb89f80d93e1068fbff6 Mon Sep 17 00:00:00 2001 From: Awesome Code Date: Fri, 20 Apr 2018 22:19:28 +0000 Subject: [PATCH] Auto corrected by following Style/ExpandPathArguments --- 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 7e5e8eed3..25bd8aea0 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', __FILE__) +require File.expand_path('config/application', __dir__) Growstuff::Application.load_tasks diff --git a/config/application.rb b/config/application.rb index ae8d6e95f..9b11cc2a8 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,4 +1,4 @@ -require File.expand_path('../boot', __FILE__) +require File.expand_path('boot', __dir__) require 'rails/all' require 'openssl' diff --git a/config/boot.rb b/config/boot.rb index f2830ae31..24efefdb2 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', __FILE__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) diff --git a/config/environment.rb b/config/environment.rb index b175f6a30..b72677751 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ # Load the rails application -require File.expand_path('../application', __FILE__) +require File.expand_path('application', __dir__) # Initialize the rails application Growstuff::Application.initialize! diff --git a/script/rails b/script/rails index 9092f9f3c..754b05caa 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', __FILE__) -require File.expand_path('../../config/boot', __FILE__) +APP_PATH = File.expand_path('../config/application', __dir__) +require File.expand_path('../config/boot', __dir__) require 'rails/commands' diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index e28dd6e24..862b0316d 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", __FILE__) +require File.expand_path('../config/environment', __dir__) require 'rspec/rails' # Add additional requires below this line. Rails is not loaded until this point! Rails.application.eager_load!