-
Notifications
You must be signed in to change notification settings - Fork 582
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
(CONT-200) Fix require relative paths #1275
Conversation
lib/puppet_x/stdlib.rb
Outdated
@@ -1,4 +1,4 @@ | |||
require 'puppet_x' | |||
require_relative '../puppet_x' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there maybe a rubocop rule we can use to enforce this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not seen one.. it would be cool if there was though. Even something to warn and say "maybe you should use require_relative here" would be nice.
Prior to this commit using stdlib/to_toml function in a separate environment outside of production will result in the following error if the latest version doesn't also live in production: ``` Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Internal Server Error: org.jruby.exceptions.LoadError: (LoadError) no such file to load -- puppet_x/stdlib ``` This commit fixes the issue by updating code to use the correct paths for require_relative.
c29327c
to
3312a18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failing tests are not in relation to this change.
Prior to this PR using stdlib/to_toml function in a separate environment outside of production will result in the following error if the latest version doesn't also live in production:
This PR fixes the issue by updating code to use the correct paths for require_relative.