-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Namespaces in Rails are not resolved correctly #58
Comments
@zpieslak thanks for the additional report! Can you create a |
@jfelchner Please find the repository here. I put the instructions in README. |
@zpieslak I'm going to knock this and your PR out next weekend. Sorry for the delay! |
@jfelchner OK, looking forward to see the results! I'm currently using own fork, but I would like to use your gem directly. |
Why This Change Is Necessary ======================================================================== When a namespace was being passed in as a Hash (as is the default for our Rails integration), the namespaces weren't being translated to an array of namespaces, which is what the rest of the library expects. This was working correctly for the CLI commands because they rely on the fact that the system will pass through default values, but inside of the server or the console, this was not working correctly. Additionally, if a lambda or proc is passed in as a value, it was not being `call`ed and therefore the value was not resolving. How These Changes Address the Issue ======================================================================== We now convert hashes passed to the ContextResolver into an array of the hash's values as well as call procs and lambdas if they are passed in. Side Effects Caused By This Change ======================================================================== None known. ------------------------------------------------------------------------ Actions: * References #58
@zpieslak this was a MAJOR issue and I'm mad that it took me this long to get this fixed. This will go out in the next release (probably later tonight). Thanks again for reporting this (and the patience). |
Why This Change Is Necessary ======================================================================== When a namespace was being passed in as a Hash (as is the default for our Rails integration), the namespaces weren't being translated to an array of namespaces, which is what the rest of the library expects. This was working correctly for the CLI commands because they rely on the fact that the system will pass through default values, but inside of the server or the console, this was not working correctly. Additionally, if a lambda or proc is passed in as a value, it was not being `call`ed and therefore the value was not resolving. How These Changes Address the Issue ======================================================================== We now convert hashes passed to the ContextResolver into an array of the hash's values as well as call procs and lambdas if they are passed in. Side Effects Caused By This Change ======================================================================== None known. ------------------------------------------------------------------------ Actions: * References #58
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
One more issue that that come out during the integration with Rails app. Currently I have it fixed within the app, but it would be nice to have it done inside the gem.
Current Behavior
When using multiple files, with multiple key-pairs in Rails app, the keys are not loaded properly, which leads to
DecryptionFailure
.Steps to Reproduce
Suppose I have two files with two-key pairs and I'm running
rails c
indevelopment
environment on hostmyhostname
.The result is
DecryptionFailure
and rails console stops. But when I runchamber show
it works fine, and the namespaces are resolved correctly.Expected Behavior or New Behavior
The rails app runs properly when changing file to
Chamber.load(basepath: ::Rails.root.join('config'))
The text was updated successfully, but these errors were encountered: