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

rename Savon::Response#hash #985

Merged
merged 3 commits into from
Oct 19, 2022
Merged

rename Savon::Response#hash #985

merged 3 commits into from
Oct 19, 2022

Conversation

pcai
Copy link
Member

@pcai pcai commented Oct 17, 2022

What kind of change is this?

make sure we don't unintentionally clobber Object#hash in Savon::Response class

Did you add tests for your changes?

existing tests updated to reflect the new name

Summary of changes

  • renamed to Savon::Response#response_hash
    • bad name because to_hash was already taken, and means something totally different (its an alias for Savon::Response#body). i could've done to_h but that feels confusing
    • suggestions welcome. full_hash?
  • See Do not override hash method on Savon::Response #950 for motivation
  • this would be a breaking change so it would need a commensurate version bump (can we bundle any other breaking changes to minimize thrash?)

lib/savon/response.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

💯 Super!

@pcai
Copy link
Member Author

pcai commented Oct 19, 2022

I renamed it to full_hash as my brain hates the redundancy of Savon::Response#response_hash

so it will be Savon::Response#full_hash

@pcai pcai merged commit b5faba8 into master Oct 19, 2022
@pcai pcai deleted the rename_response_hash branch October 19, 2022 04:11
motske pushed a commit to motske/savon that referenced this pull request Sep 5, 2024
* rename Savon::Response#hash to Savon::Response#full_hash
* fix tests so they pass in both rack 2 and rack 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants