Sha256: 07ce80913f2f5bd3d6746ffc506e422e599a129f815c8642e08dc8a0e922f00e
Contents?: true
Size: 351 Bytes
Versions: 12
Compression:
Stored size: 351 Bytes
Contents
# frozen_string_literal: true require 'cgi' module Seahorse # @api private module Util class << self def uri_escape(string) CGI.escape(string.to_s.encode('UTF-8')).gsub('+', '%20').gsub('%7E', '~') end def uri_path_escape(path) path.gsub(/[^\/]+/) { |part| uri_escape(part) } end end end end
Version data entries
12 entries across 12 versions & 1 rubygems