diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-09-08 23:33:52 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-09-08 23:33:52 -0700 |
commit | fbbf000d9b8259713aa2366122ac1ea10c76ae92 (patch) | |
tree | fbe875d063cfd352d54742f7d530dcbf6309f4f0 | |
parent | 9818855311012a9be130396566a56c094b8a9e97 (diff) | |
download | mixlib-cli-fbbf000d9b8259713aa2366122ac1ea10c76ae92.tar.gz |
Replaces uses of __FILE__ with __dir__
This makes these bits easier to read
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | mixlib-cli.gemspec | 2 | ||||
-rw-r--r-- | spec/mixlib/cli_spec.rb | 2 | ||||
-rw-r--r-- | spec/spec_helper.rb | 2 |
4 files changed, 4 insertions, 4 deletions
@@ -10,8 +10,8 @@ end group :test do gem "chefstyle" - gem "rspec", "~> 3.0" gem "rake" + gem "rspec", "~> 3.0" end group :debug do diff --git a/mixlib-cli.gemspec b/mixlib-cli.gemspec index d36d660..cbfa973 100644 --- a/mixlib-cli.gemspec +++ b/mixlib-cli.gemspec @@ -1,4 +1,4 @@ -$:.unshift(File.dirname(__FILE__) + "/lib") +$:.unshift(__dir__ + "/lib") require "mixlib/cli/version" Gem::Specification.new do |s| diff --git a/spec/mixlib/cli_spec.rb b/spec/mixlib/cli_spec.rb index ec9435c..0aea3dd 100644 --- a/spec/mixlib/cli_spec.rb +++ b/spec/mixlib/cli_spec.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper")) +require File.expand_path(File.join(__dir__, "..", "spec_helper")) describe Mixlib::CLI do after(:each) do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ffbde8a..b9a13ac 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,5 @@ $TESTING = true -$:.push File.join(File.dirname(__FILE__), "..", "lib") +$:.push File.join(__dir__, "..", "lib") require "mixlib/cli" |