Skip to content

Commit 48d99b4

Browse files
committed
Switch expand_path on file to expand_path on dir
Remove a .. here Signed-off-by: Tim Smith <[email protected]>
1 parent 3eae1cd commit 48d99b4

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

bin/omnibus

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# https://twitter.com/mitchellh/status/283014103189053442
55
Signal.trap("INT") { exit 1 }
66

7-
$:.push File.expand_path("../../lib", __FILE__)
7+
$:.push File.expand_path("../lib", __dir__)
88
$stdout.sync = true
99

1010
require "omnibus/cli"

lib/omnibus.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def project(name)
208208
# @return [Pathname]
209209
#
210210
def source_root
211-
@source_root ||= Pathname.new(File.expand_path("../..", __FILE__))
211+
@source_root ||= Pathname.new(File.expand_path("..", __dir__))
212212
end
213213

214214
#

lib/omnibus/generator.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Generator < Thor::Group
7373
class << self
7474
# Set the source root for Thor
7575
def source_root
76-
File.expand_path("../generator_files", __FILE__)
76+
File.expand_path("generator_files", __dir__)
7777
end
7878
end
7979

omnibus.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
lib = File.expand_path("../lib", __FILE__)
1+
lib = File.expand_path("lib", __dir__)
22
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
33
require "omnibus/version"
44

spec/support/path_helpers.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ def fixture_path(*pieces)
66
end
77

88
def tmp_path
9-
File.expand_path("../../tmp", __FILE__)
9+
File.expand_path("../tmp", __dir__)
1010
end
1111

1212
private
1313

1414
def fixtures_path
15-
File.expand_path("../../fixtures", __FILE__)
15+
File.expand_path("../fixtures", __dir__)
1616
end
1717
end
1818
end

0 commit comments

Comments
 (0)