summaryrefslogtreecommitdiff
path: root/lib/bundler/source/rubygems.rb
diff options
context:
space:
mode:
authorDaniel Niknam <mhmd.niknam@gmail.com>2021-07-24 17:21:42 +1000
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-07-27 09:25:56 +0900
commit91a3f06e98682078493a9501bdbd1302673ad96b (patch)
treedebfef4692a76998c00a2c033be2f92b6ac42bdd /lib/bundler/source/rubygems.rb
parent095b5bbcc168f324588d42d4ef233b446ed9f860 (diff)
downloadruby-91a3f06e98682078493a9501bdbd1302673ad96b.tar.gz
[rubygems/rubygems] Implement Bundler::Source::Rubygems#no_remotes?
This method is created to tell whether any remote exist in the object or not and it will be used by `Bundler:SourceList` to tell if a global source has been defined implicitly or not. https://github.com/rubygems/rubygems/commit/47e3ff0e47
Diffstat (limited to 'lib/bundler/source/rubygems.rb')
-rw-r--r--lib/bundler/source/rubygems.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 43b193cf1c..858a69a48b 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -71,6 +71,10 @@ module Bundler
@remotes.size > 1
end
+ def no_remotes?
+ @remotes.size == 0
+ end
+
def can_lock?(spec)
return super unless multiple_remotes?
include?(spec.source)