Class: Dependabot::GoModules::FileUpdater::GoModUpdater
- Inherits:
-
Object
- Object
- Dependabot::GoModules::FileUpdater::GoModUpdater
- Defined in:
- lib/dependabot/go_modules/file_updater/go_mod_updater.rb
Constant Summary collapse
- ENVIRONMENT =
Turn off the module proxy for now, as it’s causing issues with private git dependencies
{ "GOPRIVATE" => "*" }.freeze
- RESOLVABILITY_ERROR_REGEXES =
[ /go: .*: git fetch .*: exit status 128/.freeze, /verifying .*: checksum mismatch/.freeze, /build .*: cannot find module providing package/.freeze ].freeze
- MODULE_PATH_MISMATCH_REGEXES =
[ /go: ([^@\s]+)(?:@[^\s]+)?: .* has non-.* module path "(.*)" at/, /go: ([^@\s]+)(?:@[^\s]+)?: .* unexpected module path "(.*)"/, /go: ([^@\s]+)(?:@[^\s]+)?: .* declares its path as: ([\S]*)/m ].freeze
Instance Method Summary collapse
-
#initialize(dependencies:, credentials:, repo_contents_path:, directory:, options:) ⇒ GoModUpdater
constructor
A new instance of GoModUpdater.
- #updated_go_mod_content ⇒ Object
- #updated_go_sum_content ⇒ Object
Constructor Details
#initialize(dependencies:, credentials:, repo_contents_path:, directory:, options:) ⇒ GoModUpdater
Returns a new instance of GoModUpdater.
28 29 30 31 32 33 34 35 36 |
# File 'lib/dependabot/go_modules/file_updater/go_mod_updater.rb', line 28 def initialize(dependencies:, credentials:, repo_contents_path:, directory:, options:) @dependencies = dependencies @credentials = credentials @repo_contents_path = repo_contents_path @directory = directory @tidy = .fetch(:tidy, false) @vendor = .fetch(:vendor, false) end |
Instance Method Details
#updated_go_mod_content ⇒ Object
38 39 40 |
# File 'lib/dependabot/go_modules/file_updater/go_mod_updater.rb', line 38 def updated_go_mod_content updated_files[:go_mod] end |
#updated_go_sum_content ⇒ Object
42 43 44 |
# File 'lib/dependabot/go_modules/file_updater/go_mod_updater.rb', line 42 def updated_go_sum_content updated_files[:go_sum] end |