dependabot-terraform 0.261.0 → 0.262.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/terraform/requirement.rb +8 -5
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ea08236fee91bf12b0bc41890482867997309270a6d9937d920b4dc68375cf3
|
4
|
+
data.tar.gz: d22991704cdebacb84f4656e260b9221482a44e31ccf82adc92e1fc6018f22b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 376f6c74737e23f912bc1ca543be2643846c0d16af0c052bf78acc2bcc7b9a9109bc225026a0720f169547660c0b93073f4007b12d458cdcb9708a989cdc3c82
|
7
|
+
data.tar.gz: 458f182d1510639922d76b7350b99e301d0b219eb2d710dc5c247aec1b828f5ffb11d060f227c666da1c872dd7b10e3db3d332f0f284c6e2bb0939f489ed7019
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# typed:
|
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(
|
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.
|
4
|
+
version: 0.262.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-06-
|
11
|
+
date: 2024-06-20 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.
|
19
|
+
version: 0.262.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.
|
26
|
+
version: 0.262.0
|
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.
|
263
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.262.0
|
264
264
|
post_install_message:
|
265
265
|
rdoc_options: []
|
266
266
|
require_paths:
|