summaryrefslogtreecommitdiff
path: root/Gemfile
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-07-07 15:31:02 -0700
committerTim Smith <tsmith84@gmail.com>2020-07-07 17:30:49 -0700
commited460911a49716817ded2986e81a5116dfbb795e (patch)
tree05939eafb0047711ff008e89fe84312fbfdc9531 /Gemfile
parent824d9da7173d0dff9bb2786dcf5584e53e9866eb (diff)
downloadchef-ed460911a49716817ded2986e81a5116dfbb795e.tar.gz
expand_path with __dir__ instead of __FILE__
It's easier to read this at a glance and understand what path we're trying to get. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'Gemfile')
-rw-r--r--Gemfile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Gemfile b/Gemfile
index 1eadc20f43..55c48175f1 100644
--- a/Gemfile
+++ b/Gemfile
@@ -9,12 +9,12 @@ gem "chef", path: "."
gem "ohai", git: "https://github.com/chef/ohai.git", branch: "master"
-gem "chef-utils", path: File.expand_path("../chef-utils", __FILE__) if File.exist?(File.expand_path("../chef-utils", __FILE__))
-gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.exist?(File.expand_path("../chef-config", __FILE__))
+gem "chef-utils", path: File.expand_path('chef-utils', __dir__) if File.exist?(File.expand_path('chef-utils', __dir__))
+gem "chef-config", path: File.expand_path('chef-config', __dir__) if File.exist?(File.expand_path('chef-config', __dir__))
-if File.exist?(File.expand_path("../chef-bin", __FILE__))
+if File.exist?(File.expand_path('chef-bin', __dir__))
# bundling in a git checkout
- gem "chef-bin", path: File.expand_path("../chef-bin", __FILE__)
+ gem "chef-bin", path: File.expand_path('chef-bin', __dir__)
else
# bundling in omnibus
gem "chef-bin" # rubocop:disable Bundler/DuplicatedGem