Debian Codegraph @

lib/bundler/plugin/source_list.rb

raw
1 # frozen_string_literal: true
2
3 module Bundler
4 # SourceList object to be used while parsing the Gemfile, setting the
5 # approptiate options to be used with Source classes for plugin installation
6 module Plugin
7 class SourceList < Bundler::SourceList
8 def add_git_source(options = {})
9 add_source_to_list Plugin::Installer::Git.new(options), git_sources
10 end
11
12 def add_path_source(options = {})
13 add_source_to_list Plugin::Installer::Path.new(options), path_sources
14 end
15
16 def add_rubygems_source(options = {})
17 add_source_to_list Plugin::Installer::Rubygems.new(options), @rubygems_sources
18 end
19
20 def all_sources
21 path_sources + git_sources + rubygems_sources + [metadata_source]
22 end
23
24 private
25
26 def rubygems_aggregate_class
27 Plugin::Installer::Rubygems
28 end
29 end
30 end
31 end