Module: JenkinsApi::UriHelper
- Included in:
- Client::Job, Client::Node, Client::Root, Client::User, Client::View
- Defined in:
- lib/improved_jenkins_client/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
8 9 10 |
# File 'lib/improved_jenkins_client/urihelper.rb', line 8 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
14 15 16 |
# File 'lib/improved_jenkins_client/urihelper.rb', line 14 def path_encode(path) Addressable::URI.escape(path.encode(Encoding::UTF_8)) end |