Class: Dependabot::Docker::UpdateChecker
- Inherits:
-
UpdateCheckers::Base
- Object
- UpdateCheckers::Base
- Dependabot::Docker::UpdateChecker
- Defined in:
- lib/dependabot/docker/update_checker.rb
Instance Method Summary collapse
- #latest_resolvable_version ⇒ Object
- #latest_resolvable_version_with_no_unlock ⇒ Object
- #latest_version ⇒ Object
- #updated_requirements ⇒ Object
Instance Method Details
#latest_resolvable_version ⇒ Object
22 23 24 25 |
# File 'lib/dependabot/docker/update_checker.rb', line 22 def latest_resolvable_version # Resolvability isn't an issue for Docker containers. latest_version end |
#latest_resolvable_version_with_no_unlock ⇒ Object
27 28 29 30 |
# File 'lib/dependabot/docker/update_checker.rb', line 27 def latest_resolvable_version_with_no_unlock # No concept of "unlocking" for Docker containers dependency.version end |
#latest_version ⇒ Object
18 19 20 |
# File 'lib/dependabot/docker/update_checker.rb', line 18 def latest_version latest_version_from(dependency.version) end |
#updated_requirements ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/dependabot/docker/update_checker.rb', line 32 def updated_requirements dependency.requirements.map do |req| updated_source = req.fetch(:source).dup tag = req[:source][:tag] digest = req[:source][:digest] if tag updated_tag = latest_version_from(tag) updated_source[:tag] = updated_tag updated_source[:digest] = digest_of(updated_tag) if digest elsif digest updated_source[:digest] = digest_of("latest") end req.merge(source: updated_source) end end |