Skip to content

Commit

Permalink
fix(rubocop): Use __dir__ for Style/ExpandPathArguments [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
KapilSachdev authored and mcmire committed Nov 3, 2020
1 parent a4b6137 commit 4d7cedc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions custom_plan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def boot

require 'bundler/setup'

$LOAD_PATH << File.expand_path('../lib', __FILE__)
$LOAD_PATH << File.expand_path('../spec', __FILE__)
$LOAD_PATH << File.expand_path('lib', __dir__)
$LOAD_PATH << File.expand_path('spec', __dir__)

# Fix Zeus for Pry 0.13.0+
Pry::Pager.class_eval do
Expand Down
2 changes: 1 addition & 1 deletion script/supported_ruby_versions
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

require 'yaml'

travis_config_path = File.expand_path('../../.travis.yml', __FILE__)
travis_config_path = File.expand_path('../.travis.yml', __dir__)
travis_config = YAML.load_file(travis_config_path)
puts travis_config.fetch('rvm').join(' ')
2 changes: 1 addition & 1 deletion spec/acceptance_spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

require 'spec_helper'

Dir[ File.join(File.expand_path('../support/acceptance/**/*.rb', __FILE__)) ].sort.each do |file|
Dir[ File.join(File.expand_path('support/acceptance/**/*.rb', __dir__)) ].sort.each do |file|
require file
end

Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT_ROOT = File.expand_path('../..', __FILE__)
PROJECT_ROOT = File.expand_path('..', __dir__)
$LOAD_PATH << File.join(PROJECT_ROOT, 'lib')

require 'pry'
Expand Down
2 changes: 1 addition & 1 deletion spec/unit_spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

$VERBOSE = true

Dir[ File.join(File.expand_path('../support/unit/**/*.rb', __FILE__)) ].sort.each do |file|
Dir[ File.join(File.expand_path('support/unit/**/*.rb', __dir__)) ].sort.each do |file|
require file
end

Expand Down

0 comments on commit 4d7cedc

Please sign in to comment.