percy / percy-capybara

Visual testing for Capybara with Percy.
https://docs.percy.io/docs/capybara
MIT License
45 stars 23 forks source link

🐛 Use `require_relative` for ::VERSION #164

Closed Robdel12 closed 3 years ago

Robdel12 commented 3 years ago

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.