dependabot-terraform 0.209.0 → 0.212.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: e4acaced812749f46e164de106d0b2b4f48ecb6c3b7232b6e83806720cba45db
4
- data.tar.gz: 97d7b94631a5de932d7ac025984cb4021428066b7c43bee48a3976c7fb664a5d
3
+ metadata.gz: 5c5297a1d328dc52c83ba5a78841009b5cb39925f98dc6b6ae382f561cea0ed5
4
+ data.tar.gz: 74db7a25d15ca90c1304cb2acf265a9d8d6d3281c74e8ed9074cba7bea400c58
5
5
  SHA512:
6
- metadata.gz: 34e05db83302162b013b295370ea4de611842426c601ba0a880be487c606519952f52f72ad6a790406a6544d9f11bd4b5c98f72332f5226f4ee95b10d754f4d1
7
- data.tar.gz: f947b0002c4164810566b356ce7afb433a6eb089b799827da64bbbe9d8cd4d7f98795ea4318cdc54fa9b4b5883c2e6ac33460a158839c2e5d25f220e3c2659d4
6
+ metadata.gz: 80d983b46329b668eaa81022961329820768056a7fdbc175e614eb1e57c50d60fb56328b848bf02da7b324f61db847f8a30d5fa676f0e65e7213c58251d26145
7
+ data.tar.gz: cd3ea4534ab64ba1bd528a8cbc4a69c79e749ca6e359d2a56583168d4f4b5e42496c602a18b65b7b3c06c668747130fb5c89127473d4ddb32815b1b6c2620d20
@@ -129,8 +129,8 @@ module Dependabot
129
129
  def deprecated_provider_error(file)
130
130
  raise Dependabot::DependencyFileNotParseable.new(
131
131
  file.path,
132
- "This terraform provider syntax is now deprecated.\n"\
133
- "See https://www.terraform.io/docs/language/providers/requirements.html "\
132
+ "This terraform provider syntax is now deprecated.\n" \
133
+ "See https://www.terraform.io/docs/language/providers/requirements.html " \
134
134
  "for the new Terraform v0.13+ provider syntax."
135
135
  )
136
136
  end
@@ -262,7 +262,7 @@ module Dependabot
262
262
  return :path if source_string.start_with?(".")
263
263
  return :github if source_string.start_with?("github.com/")
264
264
  return :bitbucket if source_string.start_with?("bitbucket.org/")
265
- return :git if source_string.start_with?("git::") || source_string.start_with?("git@")
265
+ return :git if source_string.start_with?("git::", "git@")
266
266
  return :mercurial if source_string.start_with?("hg::")
267
267
  return :s3 if source_string.start_with?("s3::")
268
268
 
@@ -65,7 +65,7 @@ module Dependabot
65
65
  when "registry", "provider"
66
66
  update_registry_declaration(new_req, old_req, content)
67
67
  else
68
- raise "Don't know how to update a #{new_req[:source][:type]} "\
68
+ raise "Don't know how to update a #{new_req[:source][:type]} " \
69
69
  "declaration!"
70
70
  end
71
71
  end
@@ -313,7 +313,7 @@ module Dependabot
313
313
  end
314
314
 
315
315
  def registry_host_for(dependency)
316
- source = dependency.requirements.map { |r| r[:source] }.compact.first
316
+ source = dependency.requirements.filter_map { |r| r[:source] }.first
317
317
  source[:registry_hostname] || source["registry_hostname"] || "registry.terraform.io"
318
318
  end
319
319
 
@@ -31,14 +31,14 @@ module Dependabot
31
31
  end
32
32
 
33
33
  def find_source_from_git_url
34
- info = dependency.requirements.map { |r| r[:source] }.compact.first
34
+ info = dependency.requirements.filter_map { |r| r[:source] }.first
35
35
 
36
36
  url = info[:url] || info.fetch("url")
37
37
  Source.from_url(url)
38
38
  end
39
39
 
40
40
  def find_source_from_registry_details
41
- info = dependency.requirements.map { |r| r[:source] }.compact.first
41
+ info = dependency.requirements.filter_map { |r| r[:source] }.first
42
42
  hostname = info[:registry_hostname] || info["registry_hostname"]
43
43
 
44
44
  RegistryClient.
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "dependabot/dependency"
4
4
  require "dependabot/errors"
5
+ require "dependabot/registry_client"
5
6
  require "dependabot/source"
6
7
  require "dependabot/terraform/version"
7
8
 
@@ -33,11 +34,7 @@ module Dependabot
33
34
  url = raw_source.split(%r{(?<!:)//}).first + "?terraform-get=1"
34
35
  host = URI.parse(raw_source).host
35
36
 
36
- response = Excon.get(
37
- url,
38
- idempotent: true,
39
- **SharedHelpers.excon_defaults
40
- )
37
+ response = Dependabot::RegistryClient.get(url: url)
41
38
  raise PrivateSourceAuthenticationFailure, host if response.status == 401
42
39
 
43
40
  return response.headers["X-Terraform-Get"] if response.headers["X-Terraform-Get"]
@@ -107,9 +104,7 @@ module Dependabot
107
104
 
108
105
  source_url = response.headers.fetch("X-Terraform-Get")
109
106
  source_url = URI.join(download_url, source_url) if
110
- source_url.start_with?("/") ||
111
- source_url.start_with?("./") ||
112
- source_url.start_with?("../")
107
+ source_url.start_with?("/", "./", "../")
113
108
  source_url = RegistryClient.get_proxied_source(source_url) if source_url
114
109
  when "provider", "providers"
115
110
  response = http_get(URI.join(base_url, "#{dependency.name}/#{dependency.version}"))
@@ -169,7 +164,10 @@ module Dependabot
169
164
  end
170
165
 
171
166
  def http_get(url)
172
- Excon.get(url.to_s, idempotent: true, **SharedHelpers.excon_defaults(headers: headers_for(hostname)))
167
+ Dependabot::RegistryClient.get(
168
+ url: url.to_s,
169
+ headers: headers_for(hostname)
170
+ )
173
171
  end
174
172
 
175
173
  def http_get!(url)
@@ -130,7 +130,7 @@ module Dependabot
130
130
 
131
131
  def at_same_precision(new_version, old_version)
132
132
  release_precision =
133
- old_version.to_s.split(".").select { |i| i.match?(/^\d+$/) }.count
133
+ old_version.to_s.split(".").count { |i| i.match?(/^\d+$/) }
134
134
  prerelease_precision =
135
135
  old_version.to_s.split(".").count - release_precision
136
136
 
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.209.0
4
+ version: 0.212.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-17 00:00:00.000000000 Z
11
+ date: 2022-09-06 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.209.0
19
+ version: 0.212.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.209.0
26
+ version: 0.212.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debase
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: parallel_tests
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 3.12.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 3.12.0
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rake
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +142,28 @@ dependencies:
128
142
  requirements:
129
143
  - - "~>"
130
144
  - !ruby/object:Gem::Version
131
- version: 1.33.0
145
+ version: 1.36.0
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 1.36.0
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubocop-performance
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 1.14.2
132
160
  type: :development
133
161
  prerelease: false
134
162
  version_requirements: !ruby/object:Gem::Requirement
135
163
  requirements:
136
164
  - - "~>"
137
165
  - !ruby/object:Gem::Version
138
- version: 1.33.0
166
+ version: 1.14.2
139
167
  - !ruby/object:Gem::Dependency
140
168
  name: ruby-debug-ide
141
169
  requirement: !ruby/object:Gem::Requirement