dependabot-terraform 0.288.0 → 0.290.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: 5769b72f69c0be19312724091b49ac73466fec9a5333551fcee4c4554e311f19
4
- data.tar.gz: 92cd03b03999da3104584939822d80b7f19d93f593a285d9b3930f162c4ca17c
3
+ metadata.gz: 5e0f4662f3b380550700c34ce1d5ebfd4331c9699fc41a229347a7de60d9d8a3
4
+ data.tar.gz: 7362762bc283251c531f4177cca60d87505c119543fc8547734e79e2058a1f2f
5
5
  SHA512:
6
- metadata.gz: 85ebed049df1d1d0582b5acf860dfadb8653f7165173d0fed7d968d046b9da6ea3c6d47bbc14ef804fe296c31f97d9939de97edf9041c2911c3dd7bec445212f
7
- data.tar.gz: ac4fc9c2d967f31ab749b43aa71e6ec44570225d17ff0b84c51f785e197a6812ce4ef6318a0720a20dd64472422c9764f82f46c21c67c5b531c5302ea1a014d9
6
+ metadata.gz: 2a94c3c69ef265f951b9dc6d560908d26fda210804775ce424231cbaeecd02d44f8e32589a2be29f5a9413df67e2349f93fd126cd75c3a1f2fa839f6a8bb1ad6
7
+ data.tar.gz: 4e457715a0a53a014abce4dfa589718a22809aa49cf7f2934fe3dd63def947786fcbb577e4f86bd897e948561d0aec66b2c086f522904e6c23c2d2e25eda024b
@@ -15,6 +15,7 @@ require "dependabot/shared_helpers"
15
15
  require "dependabot/errors"
16
16
  require "dependabot/terraform/file_selector"
17
17
  require "dependabot/terraform/registry_client"
18
+ require "dependabot/terraform/package_manager"
18
19
 
19
20
  module Dependabot
20
21
  module Terraform
@@ -41,6 +42,16 @@ module Dependabot
41
42
  dependency_set.dependencies.sort_by(&:name)
42
43
  end
43
44
 
45
+ sig { returns(Ecosystem) }
46
+ def ecosystem
47
+ @ecosystem ||= T.let(begin
48
+ Ecosystem.new(
49
+ name: ECOSYSTEM,
50
+ package_manager: package_manager
51
+ )
52
+ end, T.nilable(Dependabot::Ecosystem))
53
+ end
54
+
44
55
  private
45
56
 
46
57
  sig { params(dependency_set: Dependabot::FileParsers::Base::DependencySet).void }
@@ -421,6 +432,25 @@ module Dependabot
421
432
  T.nilable(T::Hash[String, T.untyped])
422
433
  )
423
434
  end
435
+
436
+ sig { returns(Ecosystem::VersionManager) }
437
+ def package_manager
438
+ @package_manager ||= T.let(
439
+ PackageManager.new(T.must(terraform_version)),
440
+ T.nilable(Dependabot::Terraform::PackageManager)
441
+ )
442
+ end
443
+
444
+ sig { returns(T.nilable(String)) }
445
+ def terraform_version
446
+ @terraform_version ||= T.let(
447
+ begin
448
+ version = SharedHelpers.run_shell_command("terraform --version")
449
+ version.match(Dependabot::Ecosystem::VersionManager::DEFAULT_VERSION_PATTERN)&.captures&.first
450
+ end,
451
+ T.nilable(String)
452
+ )
453
+ end
424
454
  end
425
455
  end
426
456
  end
@@ -0,0 +1,41 @@
1
+ # typed: strong
2
+ # frozen_string_literal: true
3
+
4
+ require "sorbet-runtime"
5
+ require "dependabot/ecosystem"
6
+ require "dependabot/terraform/version"
7
+
8
+ module Dependabot
9
+ module Terraform
10
+ ECOSYSTEM = "terraform"
11
+ PACKAGE_MANAGER = "terraform"
12
+ SUPPORTED_TERRAFORM_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
13
+
14
+ # When a version is going to be unsupported, it will be added here
15
+ DEPRECATED_TERRAFORM_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
16
+
17
+ class PackageManager < Dependabot::Ecosystem::VersionManager
18
+ extend T::Sig
19
+
20
+ sig { params(raw_version: String).void }
21
+ def initialize(raw_version)
22
+ super(
23
+ PACKAGE_MANAGER,
24
+ Version.new(raw_version),
25
+ DEPRECATED_TERRAFORM_VERSIONS,
26
+ SUPPORTED_TERRAFORM_VERSIONS
27
+ )
28
+ end
29
+
30
+ sig { returns(T::Boolean) }
31
+ def deprecated?
32
+ false
33
+ end
34
+
35
+ sig { returns(T::Boolean) }
36
+ def unsupported?
37
+ false
38
+ end
39
+ end
40
+ end
41
+ end
@@ -3,6 +3,7 @@
3
3
 
4
4
  require "sorbet-runtime"
5
5
 
6
+ require "dependabot/utils"
6
7
  require "dependabot/version"
7
8
 
8
9
  # Terraform pre-release versions use 1.0.1-rc1 syntax, which Gem::Version
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.288.0
4
+ version: 0.290.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-21 00:00:00.000000000 Z
11
+ date: 2024-12-12 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.288.0
19
+ version: 0.290.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.288.0
26
+ version: 0.290.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -250,6 +250,7 @@ files:
250
250
  - lib/dependabot/terraform/file_selector.rb
251
251
  - lib/dependabot/terraform/file_updater.rb
252
252
  - lib/dependabot/terraform/metadata_finder.rb
253
+ - lib/dependabot/terraform/package_manager.rb
253
254
  - lib/dependabot/terraform/registry_client.rb
254
255
  - lib/dependabot/terraform/requirement.rb
255
256
  - lib/dependabot/terraform/requirements_updater.rb
@@ -260,8 +261,8 @@ licenses:
260
261
  - MIT
261
262
  metadata:
262
263
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
263
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.288.0
264
- post_install_message:
264
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.290.0
265
+ post_install_message:
265
266
  rdoc_options: []
266
267
  require_paths:
267
268
  - lib
@@ -277,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
278
  version: 3.1.0
278
279
  requirements: []
279
280
  rubygems_version: 3.5.9
280
- signing_key:
281
+ signing_key:
281
282
  specification_version: 4
282
283
  summary: Provides Dependabot support for Terraform
283
284
  test_files: []