Module: Dependabot::FileFetchers

Defined in:
lib/dependabot/file_fetchers.rb,
lib/dependabot/file_fetchers/base.rb,
lib/dependabot/file_fetchers/ruby/bundler.rb,
lib/dependabot/file_fetchers/ruby/bundler/gemspec_finder.rb,
lib/dependabot/file_fetchers/ruby/bundler/path_gemspec_finder.rb,
lib/dependabot/file_fetchers/ruby/bundler/child_gemfile_finder.rb,
lib/dependabot/file_fetchers/ruby/bundler/require_relative_finder.rb

Defined Under Namespace

Modules: Ruby Classes: Base

Class Method Summary collapse

Class Method Details

.for_package_manager(package_manager) ⇒ Object



11
12
13
14
15
16
# File 'lib/dependabot/file_fetchers.rb', line 11

def self.for_package_manager(package_manager)
  file_fetcher = @file_fetchers[package_manager]
  return file_fetcher if file_fetcher

  raise "Unsupported package_manager #{package_manager}"
end

.register(package_manager, file_fetcher) ⇒ Object



18
19
20
# File 'lib/dependabot/file_fetchers.rb', line 18

def self.register(package_manager, file_fetcher)
  @file_fetchers[package_manager] = file_fetcher
end