Class: Dependabot::GoModules::FileUpdater
- Inherits:
-
FileUpdaters::Base
- Object
- FileUpdaters::Base
- Dependabot::GoModules::FileUpdater
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/go_modules/file_updater.rb,
lib/dependabot/go_modules/file_updater/go_mod_updater.rb
Defined Under Namespace
Classes: GoModUpdater
Instance Method Summary collapse
-
#initialize(dependencies:, dependency_files:, credentials:, repo_contents_path: nil, options: {}) ⇒ FileUpdater
constructor
A new instance of FileUpdater.
- #updated_dependency_files ⇒ Object
Constructor Details
#initialize(dependencies:, dependency_files:, credentials:, repo_contents_path: nil, options: {}) ⇒ FileUpdater
Returns a new instance of FileUpdater.
33 34 35 36 37 |
# File 'lib/dependabot/go_modules/file_updater.rb', line 33 def initialize(dependencies:, dependency_files:, credentials:, repo_contents_path: nil, options: {}) super raise ArgumentError, "repo_contents_path is required" if repo_contents_path.nil? end |
Instance Method Details
#updated_dependency_files ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/dependabot/go_modules/file_updater.rb', line 40 def updated_dependency_files updated_files = if workspace? updated_workspace_files else updated_single_module_files end raise "No files changed!" if updated_files.none? updated_files end |