Class: Dependabot::Python::FileUpdater
- Inherits:
-
FileUpdaters::Base
- Object
- FileUpdaters::Base
- Dependabot::Python::FileUpdater
show all
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/python/file_updater.rb,
lib/dependabot/python/file_updater/pipfile_preparer.rb,
lib/dependabot/python/file_updater/pyproject_preparer.rb,
lib/dependabot/python/file_updater/poetry_file_updater.rb,
lib/dependabot/python/file_updater/pipfile_file_updater.rb,
lib/dependabot/python/file_updater/requirement_replacer.rb,
lib/dependabot/python/file_updater/setup_file_sanitizer.rb,
lib/dependabot/python/file_updater/pip_compile_file_updater.rb,
lib/dependabot/python/file_updater/pipfile_manifest_updater.rb,
lib/dependabot/python/file_updater/requirement_file_updater.rb
Defined Under Namespace
Classes: PipCompileFileUpdater, PipfileFileUpdater, PipfileManifestUpdater, PipfilePreparer, PoetryFileUpdater, PyprojectPreparer, RequirementFileUpdater, RequirementReplacer, SetupFileSanitizer
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.updated_files_regex ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/dependabot/python/file_updater.rb', line 21
def self.updated_files_regex
[
/^.*Pipfile$/, /^.*Pipfile\.lock$/, /^.*\.txt$/, /^.*\.in$/, /^.*setup\.py$/, /^.*setup\.cfg$/, /^.*pyproject\.toml$/, /^.*pyproject\.lock$/, /^.*poetry\.lock$/ ]
end
|
Instance Method Details
#updated_dependency_files ⇒ Object
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/dependabot/python/file_updater.rb', line 36
def updated_dependency_files
updated_files =
case resolver_type
when :pipfile then updated_pipfile_based_files
when :poetry then updated_poetry_based_files
when :pip_compile then updated_pip_compile_based_files
when :requirements then updated_requirement_based_files
else raise "Unexpected resolver type: #{resolver_type}"
end
if updated_files.none? ||
updated_files.sort_by(&:name) == dependency_files.sort_by(&:name)
raise "No files have changed!"
end
updated_files
end
|