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

Add options to URI::GID to store simple metadata as query parameters. #44

Merged
merged 1 commit into from
Oct 8, 2014

Conversation

kaspth
Copy link
Contributor

@kaspth kaspth commented Sep 26, 2014

Fixes #39.

Ready for review 😁

h[URI.unescape(k)] = URI.unescape(v)
end.with_indifferent_access
end

Copy link
Member

Choose a reason for hiding this comment

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

Can rely on decode_www_form for this:

Hash[URI.decode_www_form(@query)].with_indifferent_access

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh! I've also replaced the #to_query call with URI.encode_www_form(parts[:params]), so it's easier to spot encoding and decoding 😁

@kaspth
Copy link
Contributor Author

kaspth commented Sep 27, 2014

@jeremy All your concern are addressed by me.

kaspth added a commit that referenced this pull request Oct 8, 2014
Add options to URI::GID to store simple metadata as query parameters.
@kaspth kaspth merged commit c8c13d9 into master Oct 8, 2014
@kaspth kaspth deleted the gid-query-params branch October 8, 2014 14:53
@jeremy jeremy mentioned this pull request Oct 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for custom params
5 participants