Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use __dir__ instead of getting the dir of __FILE__ #10401

Merged
merged 3 commits into from Sep 10, 2020
Merged

Use __dir__ instead of getting the dir of __FILE__ #10401

merged 3 commits into from Sep 10, 2020

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Sep 9, 2020

This is a bit easier to read

Signed-off-by: Tim Smith tsmith@chef.io

@tas50 tas50 requested review from a team as code owners September 9, 2020 06:57
@phiggins
Copy link
Contributor

phiggins commented Sep 9, 2020

Looks like this is also running into this issue: https://bugs.ruby-lang.org/issues/13126

@tas50
Copy link
Contributor Author

tas50 commented Sep 9, 2020

Time to update that chefstyle rule!

This is a bit easier to read

Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
@lamont-granquist
Copy link
Contributor

lamont-granquist commented Sep 9, 2020

for some reason "the dir of __FILE__" sounds like a royal title in my brain for some reason.

tasks/rspec.rb Outdated
Comment on lines 23 to 24
CHEF_ROOT = File.join(__dir__, "..")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CHEF_ROOT = File.join(__dir__, "..")

This isn't referenced anywhere.

Co-authored-by: pete higgins <pete@peterhiggins.org>
@tas50 tas50 merged commit ee5a3d5 into master Sep 10, 2020
@tas50 tas50 deleted the file branch September 10, 2020 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants