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 require_relative for ::VERSION #164

Merged
merged 1 commit into from
May 6, 2021
Merged

Conversation

Robdel12
Copy link
Contributor

@Robdel12 Robdel12 commented May 6, 2021

What is this?

According to this blog post the load path stuff we were doing in the gemspec is old hat: https://piotrmurach.com/articles/writing-a-ruby-gem-specification/

This was a popular method to load a version file during the 1.8.7 and 1.9.2 Ruby era. It still remains popular, for example, for loading binary files. However, we can do better now. That’s where the require_relative method comes handy. It will load a file relative to the current location. Exactly what we need. All the three lines can be replaced in one fell swoop with:

When installing the beta into the example app I got an error about loading the VERSION module -- this should fix the issue.

According to this blog post the load path stuff we were doing in the gemspec is
old hat: https://piotrmurach.com/articles/writing-a-ruby-gem-specification/

When installing the beta into the example app I got an error about loading the
VERSION module -- this should fix the issue
@Robdel12 Robdel12 requested a review from wwilsman May 6, 2021 21:20
Copy link
Contributor

@wwilsman wwilsman left a comment

Choose a reason for hiding this comment

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

🎮

@Robdel12 Robdel12 merged commit bbb176b into master May 6, 2021
@Robdel12 Robdel12 deleted the rd/fix-version-require branch May 6, 2021 21:42
@Robdel12 Robdel12 added the 🐛 bug Something isn't working label May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants