Skip to content

Commit

Permalink
Use expand_path with __dir__ instead of __FILE__
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Jun 11, 2018
1 parent 38f6aaa commit fdea594
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,8 @@ Style/FrozenStringLiteralComment:
Style/NumericPredicate:
Enabled: false

Style/TrailingCommaInLiteral:
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: 'comma'

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: 'comma'
2 changes: 1 addition & 1 deletion spec/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def stub_put(path)
end

def fixture_path
File.expand_path('../fixtures', __FILE__)
File.expand_path('fixtures', __dir__)
end

def fixture(file)
Expand Down
2 changes: 1 addition & 1 deletion twitter.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'twitter/version'

Expand Down

0 comments on commit fdea594

Please sign in to comment.