diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-21 10:20:47 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-21 10:20:47 +0000 |
commit | 5335ce0e060c7a2a0b01c57f8f8a64254f2658e1 (patch) | |
tree | c63321cb7c7c5c15454a79d81123c7188be2c51e /lib/rubygems/source.rb | |
parent | 2f023c5dbaadede9ceac3eb9ac0e73f3050e5ada (diff) |
Merge master branch from rubygems/rubygems upstream.
* Enable Style/MethodDefParentheses in Rubocop
https://github.com/rubygems/rubygems/pull/2478
* Enable Style/MultilineIfThen in Rubocop
https://github.com/rubygems/rubygems/pull/2479
* Fix required_ruby_version with prereleases and improve error message
https://github.com/rubygems/rubygems/pull/2344
* Fix bundler rubygems binstub not properly looking for bundler
https://github.com/rubygems/rubygems/pull/2426
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/source.rb')
-rw-r--r-- | lib/rubygems/source.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rubygems/source.rb b/lib/rubygems/source.rb index 5530c2ce32..faed7bd350 100644 --- a/lib/rubygems/source.rb +++ b/lib/rubygems/source.rb @@ -68,7 +68,7 @@ class Gem::Source end end - def == other # :nodoc: + def ==(other) # :nodoc: self.class === other and @uri == other.uri end @@ -88,7 +88,7 @@ class Gem::Source rescue Gem::RemoteFetcher::FetchError Gem::Resolver::IndexSet.new self else - if response.respond_to? :uri then + if response.respond_to? :uri Gem::Resolver::APISet.new response.uri else Gem::Resolver::APISet.new bundler_api_uri @@ -126,7 +126,7 @@ class Gem::Source ## # Fetches a specification for the given +name_tuple+. - def fetch_spec name_tuple + def fetch_spec(name_tuple) fetcher = Gem::RemoteFetcher.fetcher spec_file_name = name_tuple.spec_name @@ -137,7 +137,7 @@ class Gem::Source local_spec = File.join cache_dir, spec_file_name - if File.exist? local_spec then + if File.exist? local_spec spec = Gem.read_binary local_spec spec = Marshal.load(spec) rescue nil return spec if spec @@ -148,7 +148,7 @@ class Gem::Source spec = fetcher.fetch_path source_uri spec = Gem::Util.inflate spec - if update_cache? then + if update_cache? FileUtils.mkdir_p cache_dir File.open local_spec, 'wb' do |io| @@ -206,7 +206,7 @@ class Gem::Source fetcher.download spec, uri.to_s, dir end - def pretty_print q # :nodoc: + def pretty_print(q) # :nodoc: q.group 2, '[Remote:', ']' do q.breakable q.text @uri.to_s |