Skip to content

Commit

Permalink
Resolve warning: URI.escape is obsolete. Use Addressable::URI.escape …
Browse files Browse the repository at this point in the history
…for backwards compatability

Signed-off-by: Gavin Reynolds <gavin@chef.io>
  • Loading branch information
gsreynolds committed Sep 23, 2020
1 parent 1daaa98 commit caaabb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jenkins_api_client.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ Gem::Specification.new do |s|
s.add_dependency 'mixlib-shellout', '>= 1.1.0'
s.add_dependency 'socksify', '>= 1.7.0'
s.add_dependency 'json', '>= 1.0'
s.add_dependency 'addressable', '~> 2.7'
end

3 changes: 2 additions & 1 deletion lib/jenkins_api_client/urihelper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'uri'
require 'addressable/uri'

module JenkinsApi
module UriHelper
Expand All @@ -11,7 +12,7 @@ def form_encode(string)
# Encode a string for use in the hiearchical part of an URL
#
def path_encode(path)
URI.escape(path.encode(Encoding::UTF_8))
Addressable::URI.escape(path.encode(Encoding::UTF_8))
end
end
end

0 comments on commit caaabb2

Please sign in to comment.