dependabot-maven 0.261.0 → 0.261.1

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: 973b81f3c154c6ea20606d75712191f44794b1478d65a0d6027aa1f2a4306683
4
- data.tar.gz: 5c96139bca52f77cfeb503dfe93647bf8102f739f45546985e7d0d665a2dc65f
3
+ metadata.gz: e4646895d6fee91d244a1d27e5bcd752bfc427451d32b502f6d7a1bfc65530c7
4
+ data.tar.gz: 1465dbc7b67d60376d42f7591f866855d777d81b3b5b2d389cb6666c6c7e5ec6
5
5
  SHA512:
6
- metadata.gz: ff8362d39560cbfeb5a125c9ca5e66b144ff2d9b57634772cbfae1ac0f605f482be2cd47fb832173fed70dcc042228b9d4293ac7847570f0b727a79634129333
7
- data.tar.gz: c5b2020b805980394694390844f894bbf04dd863966c86588b621dc7f86f9b57bc03d0a0f4ac4d48a6963c356bf71a3d8647cfa906a8a8fbc6f2113f0a361299
6
+ metadata.gz: 7ef11a4dc5e1e4ae0aef2f9b6813e75642b2de6e04eb0f86f2ce4ea62a0009689cb84b70205b16ecfd1622cda31ad2f677f3af1f8a50453a39ec5aac1644a494
7
+ data.tar.gz: 9e00fc5f18c25924d5bed4bed3e14e3bfd3a3e17adf9fa334646db983fe2efd3b47df6b2d7fc839ed62ef6e1bae387f2cd1c13766b9942a1e1ed18e44c28e0b1
@@ -1,14 +1,20 @@
1
- # typed: true
1
+ # typed: strict
2
2
  # frozen_string_literal: true
3
3
 
4
+ require "sorbet-runtime"
5
+
4
6
  module Dependabot
5
7
  module Maven
6
8
  module Utils
7
9
  class AuthHeadersFinder
10
+ extend T::Sig
11
+
12
+ sig { params(credentials: T::Array[Dependabot::Credential]).void }
8
13
  def initialize(credentials)
9
14
  @credentials = credentials
10
15
  end
11
16
 
17
+ sig { params(maven_repo_url: String).returns(T::Hash[String, String]) }
12
18
  def auth_headers(maven_repo_url)
13
19
  cred =
14
20
  credentials.select { |c| c["type"] == "maven_repository" }
@@ -28,10 +34,12 @@ module Dependabot
28
34
 
29
35
  private
30
36
 
37
+ sig { returns(T::Array[Dependabot::Credential]) }
31
38
  attr_reader :credentials
32
39
 
40
+ sig { params(maven_repo_url: T.any(URI::Generic, String)).returns(T::Hash[T.untyped, T.untyped]) }
33
41
  def gitlab_auth_headers(maven_repo_url)
34
- return {} unless gitlab_maven_repo?(URI(maven_repo_url).path)
42
+ return {} unless gitlab_maven_repo?(T.must(URI(maven_repo_url).path))
35
43
 
36
44
  cred =
37
45
  credentials.select { |c| c["type"] == "git_source" }
@@ -47,6 +55,7 @@ module Dependabot
47
55
  { "Private-Token" => cred.fetch("password") }
48
56
  end
49
57
 
58
+ sig { params(maven_repo_path: String).returns(T::Boolean) }
50
59
  def gitlab_maven_repo?(maven_repo_path)
51
60
  gitlab_maven_repo_reg = %r{^/api/v4.*/packages/maven/?$}
52
61
  maven_repo_path.match?(gitlab_maven_repo_reg)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-maven
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.261.0
4
+ version: 0.261.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-13 00:00:00.000000000 Z
11
+ date: 2024-06-17 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.261.0
19
+ version: 0.261.1
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.261.0
26
+ version: 0.261.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -264,7 +264,7 @@ licenses:
264
264
  - MIT
265
265
  metadata:
266
266
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
267
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.261.0
267
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.261.1
268
268
  post_install_message:
269
269
  rdoc_options: []
270
270
  require_paths: