Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress deprecation warnings in production code #162

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/gemstash/storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def initialize(folder, name)
digest = Digest::MD5.hexdigest(@name)
child_folder = "#{safe_name}-#{digest}"
@folder = File.join(@base_path, *trie_parents, child_folder)
@properties = nil
end

# When +key+ is nil, this will test if this resource exists with any
Expand Down
4 changes: 2 additions & 2 deletions lib/gemstash/upstream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class Upstream
def_delegators :@uri, :scheme, :host, :user, :password, :to_s

def initialize(upstream, user_agent: nil)
@uri = URI(URI.decode(upstream.to_s))
@uri = URI(CGI.unescape(upstream.to_s))
@user_agent = user_agent
raise "URL '#{@uri}' is not valid!" unless @uri.to_s =~ URI.regexp
raise "URL '#{@uri}' is not valid!" unless @uri.to_s =~ URI::DEFAULT_PARSER.make_regexp
end

def url(path = nil, params = nil)
Expand Down