Skip to content

Instantly share code, notes, and snippets.

@takp
Last active May 9, 2016 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takp/0daa1266a1ed4e144c3b973208b9f9fb to your computer and use it in GitHub Desktop.
Save takp/0daa1266a1ed4e144c3b973208b9f9fb to your computer and use it in GitHub Desktop.
simple-oauth-header-extract.rb
module SimpleOAuth
class Header
class >> self
...
def escape(value)
uri_parser.escape(value.to_s, /[^a-z0-9\-\.\_\~]/i)
end
alias_method :encode, :escape
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment