dependabot-terraform 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: b5bf4ee2034d691008382f6d6ce217a3d0b010ae6359310aaab7cd8b348dd3b1
4
- data.tar.gz: 0f930b2c435202ab7d301b28fa7e0f0f17ea07b3348e1937aacf820ee88fe6d6
3
+ metadata.gz: f43110753b0a724a429bc09a65a8a86f311147c5611dfd03fdc6a4c51f900a88
4
+ data.tar.gz: d1b548612657b50cefcdf4fefed24a1f1ede3cec7c1f98679d8879ee894d9953
5
5
  SHA512:
6
- metadata.gz: 948fd636cdbf07154bf5692e99aaa67865f88a9707aacd727fa1593cc5f37c1f05bffab1f161a62d5ee3ed11122333dd7a839785de4dac93921aecb4c0342cd6
7
- data.tar.gz: 68a81f0c15a466e3ba2357daab254ebc2f6be558c0571c6db4a2037b17b4b7d5f8d5c58879635b9cc2949404db12a0e230a7eac6f62dc072d61b7ff1895e899b
6
+ metadata.gz: 2e4958e34241b4bf263f090518cb3d510e7a9b4945842b9710e6d7b2bcab9947f9b475a017007c14b4d15b65f3d496086cd6f3e83b940cdc8735780963903b09
7
+ data.tar.gz: 0420b3d5b33b2ceec10a5c752a2b49c40660d409a6a1e20f019964f8155e7272eadbe431109b69bc1f3b8cd6b6e2ccddd11794a8f0cf1740dc9eed439e6638a8
@@ -1,4 +1,4 @@
1
- # typed: true
1
+ # typed: strict
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "sorbet-runtime"
@@ -11,13 +11,15 @@ require "dependabot/terraform/version"
11
11
  module Dependabot
12
12
  module Terraform
13
13
  class Requirement < Dependabot::Requirement
14
+ extend T::Sig
14
15
  # Override regex PATTERN from Gem::Requirement to add support for the
15
16
  # optional 'v' prefix to release tag names, which Terraform supports.
16
17
  # https://www.terraform.io/docs/registry/modules/publish.html#requirements
17
- OPERATORS = OPS.keys.map { |key| Regexp.quote(key) }.join("|").freeze
18
- PATTERN_RAW = "\\s*(#{OPERATORS})?\\s*v?(#{Gem::Version::VERSION_PATTERN})\\s*".freeze
18
+ OPERATORS = T.let(OPS.keys.map { |key| Regexp.quote(key) }.join("|").freeze, String)
19
+ PATTERN_RAW = T.let("\\s*(#{OPERATORS})?\\s*v?(#{Gem::Version::VERSION_PATTERN})\\s*".freeze, String)
19
20
  PATTERN = /\A#{PATTERN_RAW}\z/
20
21
 
22
+ sig { params(obj: T.any(String, Gem::Version)).returns(T::Array[T.any(String, Version)]) }
21
23
  def self.parse(obj)
22
24
  return ["=", Version.new(obj.to_s)] if obj.is_a?(Gem::Version)
23
25
 
@@ -28,7 +30,7 @@ module Dependabot
28
30
 
29
31
  return DefaultRequirement if matches[1] == ">=" && matches[2] == "0"
30
32
 
31
- [matches[1] || "=", Terraform::Version.new(T.must(matches[2]))]
33
+ [matches[1] || "=", Terraform::Version.new(matches[2])]
32
34
  end
33
35
 
34
36
  # For consistency with other languages, we define a requirements array.
@@ -36,11 +38,12 @@ module Dependabot
36
38
  # always contains a single element.
37
39
  sig { override.params(requirement_string: T.nilable(String)).returns(T::Array[Requirement]) }
38
40
  def self.requirements_array(requirement_string)
39
- [new(requirement_string)]
41
+ [new(requirement_string.to_s)]
40
42
  end
41
43
 
42
44
  # Patches Gem::Requirement to make it accept requirement strings like
43
45
  # "~> 4.2.5, >= 4.2.5.1" without first needing to split them.
46
+ sig { params(requirements: T.any(String, T::Array[String])).void }
44
47
  def initialize(*requirements)
45
48
  requirements = requirements.flatten.flat_map do |req_string|
46
49
  req_string.split(",").map(&:strip)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-terraform
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
@@ -260,7 +260,7 @@ licenses:
260
260
  - MIT
261
261
  metadata:
262
262
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
263
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.261.0
263
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.261.1
264
264
  post_install_message:
265
265
  rdoc_options: []
266
266
  require_paths: