Class: Dependabot::Python::FileUpdater::PipfileFileUpdater

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/python/file_updater/pipfile_file_updater.rb

Constant Summary collapse

DEPENDENCY_TYPES =
%w(packages dev-packages).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dependencies:, dependency_files:, credentials:, repo_contents_path:) ⇒ PipfileFileUpdater

Returns a new instance of PipfileFileUpdater.



29
30
31
32
33
34
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 29

def initialize(dependencies:, dependency_files:, credentials:, repo_contents_path:)
  @dependencies = dependencies
  @dependency_files = dependency_files
  @credentials = credentials
  @repo_contents_path = repo_contents_path
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials.



26
27
28
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 26

def credentials
  @credentials
end

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



24
25
26
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 24

def dependencies
  @dependencies
end

#dependency_filesObject (readonly)

Returns the value of attribute dependency_files.



25
26
27
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 25

def dependency_files
  @dependency_files
end

#repo_contents_pathObject (readonly)

Returns the value of attribute repo_contents_path.



27
28
29
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 27

def repo_contents_path
  @repo_contents_path
end

Instance Method Details

#updated_dependency_filesObject



36
37
38
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 36

def updated_dependency_files
  @updated_dependency_files ||= fetch_updated_dependency_files
end