dependabot-docker 0.309.0 → 0.310.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dependabot/docker/tag.rb +13 -1
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5ace65f27d0e36a51171e52901faae1a9789e32c13b0c3706811919dc386d25
4
- data.tar.gz: d5f5343ff0cef86c53ee7b36f4c5b1335f30022d2d8148cfcf64c8d17fee6010
3
+ metadata.gz: 48d5febf4a3d2a6baea6a2aa5be06b4761f6bb8adb7ea8bd494fe1f4952efb93
4
+ data.tar.gz: 74e03cca291a2bf993cd498c623b005a76210959aabd961605fd501093f60106
5
5
  SHA512:
6
- metadata.gz: fc21838afc4fc26997d7aa6ee3d4d74e17632512d81c3adbb784bb847cbefbff6ef0e6db47607fc9e24fa19fcf87b09cad218a384e70e81bb48e38ba112a4d87
7
- data.tar.gz: f4b23db54586036756d46e25fadd8c34aa7826173f3b10882c6177c625977a2788f5aa0d53a91cff89a3b349f58c5c2be5fbd96a7b25e72500a86d2c99a81067
6
+ metadata.gz: ebeb48c76a0b1597f3c814732cef817c33e0b1cca0ede1f9e2d69d3cb8c887347f74c943764b57b030be1c4a61f34b1dd300f0862785dcbef100ba3a44745dc0
7
+ data.tar.gz: 4a13f579a96a53bc7aafb050c4fc301c648e59c0b612f9882752256f4d8c67e814380fccb69198f2589227a196725075fa332794b9e20573f4f6a780c2aa8593
@@ -42,6 +42,17 @@ module Dependabot
42
42
  numeric_version&.match?(/[a-zA-Z]/)
43
43
  end
44
44
 
45
+ sig do
46
+ params(other_format: Symbol, other_prefix: T.nilable(String),
47
+ other_suffix: T.nilable(String)).returns(T::Boolean)
48
+ end
49
+ def comparable_formats(other_format, other_prefix, other_suffix)
50
+ return false unless prefix.nil? && suffix.nil? && other_prefix.nil? && other_suffix.nil?
51
+
52
+ formats = %i(year_month year_month_day)
53
+ (format == :build_num && formats.include?(other_format)) || (formats.include?(format) && other_format == :build_num) # rubocop:disable Layout/LineLength
54
+ end
55
+
45
56
  sig { params(other: Tag).returns(T::Boolean) }
46
57
  def comparable_to?(other)
47
58
  return false unless comparable?
@@ -52,10 +63,11 @@ module Dependabot
52
63
 
53
64
  equal_prefix = prefix == other_prefix
54
65
  equal_format = format == other_format
66
+ comparable_format = comparable_formats(other.format, other.prefix, other.suffix)
55
67
  return equal_prefix && equal_format if other_format == :sha_suffixed
56
68
 
57
69
  equal_suffix = suffix == other_suffix
58
- equal_prefix && equal_format && equal_suffix
70
+ (equal_prefix && equal_format && equal_suffix) || comparable_format
59
71
  end
60
72
 
61
73
  sig { returns(T::Boolean) }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.309.0
4
+ version: 0.310.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-17 00:00:00.000000000 Z
10
+ date: 2025-04-24 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: dependabot-common
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.309.0
18
+ version: 0.310.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.309.0
25
+ version: 0.310.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: debug
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -261,7 +261,7 @@ licenses:
261
261
  - MIT
262
262
  metadata:
263
263
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
264
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.309.0
264
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.310.0
265
265
  rdoc_options: []
266
266
  require_paths:
267
267
  - lib