Class: Dependabot::FileUpdaters::Go::Dep
- Defined in:
- lib/dependabot/file_updaters/go/dep.rb,
lib/dependabot/file_updaters/go/dep/lockfile_updater.rb,
lib/dependabot/file_updaters/go/dep/manifest_updater.rb
Defined Under Namespace
Classes: LockfileUpdater, ManifestUpdater
Instance Attribute Summary
Attributes inherited from Base
#credentials, #dependencies, #dependency_files
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Dependabot::FileUpdaters::Base
Class Method Details
.updated_files_regex ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/dependabot/file_updaters/go/dep.rb', line 13 def self.updated_files_regex [ /^Gopkg\.toml$/, /^Gopkg\.lock$/, /^go\.mod$/, /^go\.sum$/ ] end |
Instance Method Details
#updated_dependency_files ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/dependabot/file_updaters/go/dep.rb', line 22 def updated_dependency_files updated_files = [] if manifest && file_changed?(manifest) updated_files << updated_file( file: manifest, content: updated_manifest_content ) end if lockfile updated_files << updated_file(file: lockfile, content: updated_lockfile_content) end raise "No files changed!" if updated_files.none? updated_files end |