Class: Dependabot::UpdateCheckers::Go::Dep::FilePreparer

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/update_checkers/go/dep/file_preparer.rb

Overview

This class takes a set of dependency files and prepares them for use in UpdateCheckers::Go::Dep.

Instance Method Summary collapse

Constructor Details

#initialize(dependency_files:, dependency:, remove_git_source: false, unlock_requirement: true, replacement_git_pin: nil, latest_allowable_version: nil) ⇒ FilePreparer

Returns a new instance of FilePreparer.



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/dependabot/update_checkers/go/dep/file_preparer.rb', line 15

def initialize(dependency_files:, dependency:,
               remove_git_source: false,
               unlock_requirement: true,
               replacement_git_pin: nil,
               latest_allowable_version: nil)
  @dependency_files         = dependency_files
  @dependency               = dependency
  @unlock_requirement       = unlock_requirement
  @remove_git_source        = remove_git_source
  @replacement_git_pin      = replacement_git_pin
  @latest_allowable_version = latest_allowable_version
end

Instance Method Details

#prepared_dependency_filesObject



28
29
30
31
32
33
34
35
# File 'lib/dependabot/update_checkers/go/dep/file_preparer.rb', line 28

def prepared_dependency_files
  files = []

  files << manifest_for_update_check
  files << lockfile if lockfile

  files
end