0.01
No commit activity in last 3 years
No release in over 3 years
Nothing fancy going on here, this module is just a wrapper around the function CGI::escape and CGI::unescape. Functionality is added to the String class, so just add the module and the extra funcitons will be there for you to use (check out the README file for basic usage). I just wanted an easier and cleaner way to encode/decode uri strings for my ruby projects.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.6.4
>= 0
 Project Readme

uri-handler¶ ↑

Additional string functionality to make uri encoding easier and cleaner to use in your Ruby code.

Nothing fancy going on here, this module is just a wrapper around the function CGI::escape and CGI::unescape. Functionality is added to the String class, so just add the module and the extra funcitons will be there for you to use (check out the basic usage example below). I just wanted an easier and cleaner way to encode/decode uri strings for my ruby projects.

basic usage¶ ↑

Add to Gemfile for rails and other bundle-enabled projects

gem ‘uri-handler’

code sample¶ ↑

require ‘uri-handler’

puts “testing+123 invalid uri character/s”.to_uri # => “testing%2B123+invalid+uri+character%2Fs”

val = “testing+123 invalid uri character/s”

val.to_uri!

puts val => “testing%2B123+invalid+uri+character%2Fs”

puts val.uri_decode # => “testing+123 invalid uri character/s”

val.uri_decode!

puts val # => “testing+123 invalid uri character/s”

puts val.uri_encode # => “testing%2B123+invalid+uri+character%2Fs”

val.uri_encode!

puts val # => “testing%2B123+invalid+uri+character%2Fs”

Copyright © 2012 foomip. See LICENSE.txt for further details.