Module: Lhj::JenkinsApi::UriHelper
- Included in:
- Client::Job
- Defined in:
- lib/lhj/jenkins/urihelper.rb
Instance Method Summary collapse
-
#form_encode(string) ⇒ Object
Encode a string for using in the query part of an URL.
-
#path_encode(path) ⇒ Object
Encode a string for use in the hiearchical part of an URL.
Instance Method Details
#form_encode(string) ⇒ Object
Encode a string for using in the query part of an URL
9 10 11 |
# File 'lib/lhj/jenkins/urihelper.rb', line 9 def form_encode(string) URI.encode_www_form_component string.encode(Encoding::UTF_8) end |
#path_encode(path) ⇒ Object
Encode a string for use in the hiearchical part of an URL
15 16 17 |
# File 'lib/lhj/jenkins/urihelper.rb', line 15 def path_encode(path) Addressable::URI.escape(path.encode(Encoding::UTF_8)) end |