dependabot-docker 0.245.0 → 0.246.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e61c3b2e56f46e7c5f485f82de3aa732aa43acc26a101e5777cb0d225e51918
4
- data.tar.gz: acbd873e9991535a7f767059e71600f4258e8622a7c6895bd94e969a6885d7ed
3
+ metadata.gz: 00e870369360f07efa9b9cc9c6d028b163d2c42892f39e4ab307a5b9671e0262
4
+ data.tar.gz: bc79c8c1a1f9faffd6a0b9d54e914572afd2162f510c03de76a3b73d1be54747
5
5
  SHA512:
6
- metadata.gz: 1a24c6f7cbeb5866d100b79782e85b61d8dfa6f4ddcec6989159061c7adf3ba869ba7dc4075ed6be720353a5cf2ef2f39038e95ea74e03a9ac3a05de828c3cc9
7
- data.tar.gz: 32993a7f315727817fb7dbd9b7daea17cdbc7f347437382c5e16b2f6cdb8d7147cfcf826bcbbb1564ea676ec01c95d2ac14b32a7cc6b5e89564496a07d8339a7
6
+ metadata.gz: b8d4531b231f7f005f2063e1787795bbb673ffca7da8b3352c3cdc927d30c77594e7b962893645c252cdddc20c55990b974611a12c8422953881af4acfe1a108
7
+ data.tar.gz: c1e0231044521335cde4f10fc06b5a0b15d99f6d4e74b3b96fbfdeacf2f25297ef4bc1f074cb3a4c7c44ee2cd7b8d82ca4378bef66661d9abbca4928c9b25165
@@ -1,4 +1,4 @@
1
- # typed: false
1
+ # typed: true
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "sorbet-runtime"
@@ -33,8 +33,7 @@ module Dependabot
33
33
  return fetched_files if fetched_files.any?
34
34
 
35
35
  if incorrectly_encoded_dockerfiles.none? && incorrectly_encoded_yamlfiles.none?
36
- raise(
37
- Dependabot::DependencyFileNotFound,
36
+ raise Dependabot::DependencyFileNotFound.new(
38
37
  File.join(directory, "Dockerfile"),
39
38
  "No Dockerfiles nor Kubernetes YAML found in #{directory}"
40
39
  )
@@ -1,4 +1,4 @@
1
- # typed: false
1
+ # typed: true
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "docker_registry2"
@@ -46,14 +46,14 @@ module Dependabot
46
46
  dockerfile.content.each_line do |line|
47
47
  next unless FROM_LINE.match?(line)
48
48
 
49
- parsed_from_line = FROM_LINE.match(line).named_captures
49
+ parsed_from_line = T.must(FROM_LINE.match(line)).named_captures
50
50
  parsed_from_line["registry"] = nil if parsed_from_line["registry"] == "docker.io"
51
51
 
52
52
  version = version_from(parsed_from_line)
53
53
  next unless version
54
54
 
55
55
  dependency_set << Dependency.new(
56
- name: parsed_from_line.fetch("image"),
56
+ name: T.must(parsed_from_line.fetch("image")),
57
57
  version: version,
58
58
  package_manager: "docker",
59
59
  requirements: [
@@ -274,7 +274,9 @@ module Dependabot
274
274
  end
275
275
 
276
276
  def registry_hostname
277
- return dependency.requirements.first[:source][:registry] if dependency.requirements.first[:source][:registry]
277
+ if dependency.requirements.first&.dig(:source, :registry)
278
+ return T.must(dependency.requirements.first).dig(:source, :registry)
279
+ end
278
280
 
279
281
  credentials_finder.base_registry
280
282
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.245.0
4
+ version: 0.246.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-22 00:00:00.000000000 Z
11
+ date: 2024-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dependabot-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.245.0
19
+ version: 0.246.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.245.0
26
+ version: 0.246.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -244,7 +244,7 @@ licenses:
244
244
  - Nonstandard
245
245
  metadata:
246
246
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
247
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.245.0
247
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.246.0
248
248
  post_install_message:
249
249
  rdoc_options: []
250
250
  require_paths: