summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Niknam <mhmd.niknam@gmail.com>2021-07-24 17:25:08 +1000
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-07-27 09:25:57 +0900
commitb500e8fab445d5a4ad91fd71e622aff88d0c7dd6 (patch)
treeb69a770bae4ef0f4ded23716e6dd21f77e9ca78e /lib
parent91a3f06e98682078493a9501bdbd1302673ad96b (diff)
[rubygems/rubygems] Implement Bundler::SourceList#implicit_global_source?
This method is created to tell whether any global source exist in the object or not and it will be used by `Bundler:Dsl` to print a warning if no global source has been defined in the Gemfile. https://github.com/rubygems/rubygems/commit/422fec4438
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/source_list.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb
index 113d49ba72..c7dfa3d797 100644
--- a/lib/bundler/source_list.rb
+++ b/lib/bundler/source_list.rb
@@ -37,6 +37,10 @@ module Bundler
global_rubygems_source.multiple_remotes?
end
+ def implicit_global_source?
+ global_rubygems_source.no_remotes?
+ end
+
def add_path_source(options = {})
if options["gemspec"]
add_source_to_list Source::Gemspec.new(options), path_sources