Module: JenkinsApi::UriHelper
- Defined in:
- lib/jenkins/builder/app.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
35 36 37 |
# File 'lib/jenkins/builder/app.rb', line 35 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
41 42 43 |
# File 'lib/jenkins/builder/app.rb', line 41 def path_encode(path) CGI.escape(path.encode(Encoding::UTF_8)) end |