revert transform_keys change#272
Closed
JamesChevalier wants to merge 1 commit intoruby-oauth:mainfrom
JamesChevalier:patch-1
Closed
revert transform_keys change#272JamesChevalier wants to merge 1 commit intoruby-oauth:mainfrom JamesChevalier:patch-1
JamesChevalier wants to merge 1 commit intoruby-oauth:mainfrom
JamesChevalier:patch-1
Conversation
Author
|
Closing in favor of #273 Update: Re-opening because 273 inadvertently added a dependency on ActiveSupport |
Member
|
In the OAuth2 gem we actually decided to solve this by using the Note: faraday had the same idea! |
Author
|
maintainers went with #276 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #271 by reverting the
transform_keyschangeomniauth ultimately defines
optionsas aHashie::Mashnot aHash:https://github.com/omniauth/omniauth/blob/master/lib/omniauth/strategy.rb#L547
https://github.com/omniauth/omniauth/blob/master/lib/omniauth/key_store.rb#L5
While
Hashie::Mashdoes implementtransform_keys, it does not behave the same way as theHashimplementation does:🤔 An alternative could be to rewrite the existing line to:
Never mind this idea 😬
Ah! Another option is to add `.with_indifferent_access` when `@@default_options` is created: https://github.com/oauth-xx/oauth-ruby/blob/62d3f3e52daa565a04e508df915456a21a7faf37/lib/oauth/consumer.rb#L33-L73I don't expect the removal of Hashie from omniauth to be possible, based on how purposeful they were in switching to it:
https://github.com/omniauth/omniauth/wiki/OmniAuth-1.0#changes-to-the-auth-hash