terradactyl-terraform 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/lib/terradactyl/terraform/commands/destroy.rb +12 -0
- data/lib/terradactyl/terraform/commands/init.rb +12 -0
- data/lib/terradactyl/terraform/planfile.rb +10 -0
- data/lib/terradactyl/terraform/version.rb +1 -1
- data/lib/terradactyl/terraform/version_manager/defaults.rb +4 -10
- data/lib/terradactyl/terraform/version_manager/package.rb +0 -4
- data/lib/terradactyl/terraform/version_manager.rb +5 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 359a4fc58eb55407c6d9972a45e97d25f6bc9fc0d884fd432b8a8e7df61d0b5a
|
4
|
+
data.tar.gz: c65d73ea3bd5d97d944efe82677debe5a4dd97cb98027988be0611a0da82d806
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35b47d2381c30ae1aa9abd566ed1dff47d96d9f9ed8769afba89d687c6d5ca6200836d8e5d3936a77a5f08affc01aa5da6188be8aafdae7c0a91e59176c15818
|
7
|
+
data.tar.gz: fa6819c875544284247edfe7b9fbebec688a426d9324caeba72fa9ad121de67723f760779ab722d0d8f7cf58d76769b87d78e70e488169a9b27c11df9b5e682f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 1.2.0 (2022-05-18)
|
4
|
+
|
5
|
+
NEW FEATURES:
|
6
|
+
|
7
|
+
* add support for Terraform version `~> 1.2.0`
|
8
|
+
* Update lib/terradactyl/terraform/commands/destroy.rb (add Rev1_02)
|
9
|
+
* Update lib/terradactyl/terraform/commands/init.rb (add Rev1_02)
|
10
|
+
* Update spec/fixtures/stacks (add rev1_02)
|
11
|
+
* Update spec/helpers.rb (add rev1_02)
|
12
|
+
|
13
|
+
## 1.1.2 (2022-01-03)
|
14
|
+
|
15
|
+
BUG FIXES:
|
16
|
+
|
17
|
+
* fix calculation of latest version
|
18
|
+
* fix failing tests
|
19
|
+
|
20
|
+
## 1.1.0 (2021-12-09)
|
21
|
+
|
22
|
+
NEW FEATURES:
|
23
|
+
|
24
|
+
* add support for Terraform version `~> 1.1.0`
|
25
|
+
* Update lib/terradactyl/terraform/commands/destroy.rb (add Rev1_01)
|
26
|
+
* Update lib/terradactyl/terraform/commands/init.rb (add Rev1_01)
|
27
|
+
* Update spec/fixtures/stacks (add rev1_01)
|
28
|
+
* Update spec/helpers.rb (add rev1_01 and lock rev1_00 to 1.0.11)
|
29
|
+
|
3
30
|
## 1.0.0 (2021-06-09)
|
4
31
|
|
5
32
|
NEW FEATURES:
|
@@ -56,6 +56,18 @@ module Terradactyl
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
+
module Rev1_01
|
60
|
+
module Destroy
|
61
|
+
include Terradactyl::Terraform::Rev015::Destroy
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
module Rev1_02
|
66
|
+
module Destroy
|
67
|
+
include Terradactyl::Terraform::Rev015::Destroy
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
59
71
|
module Commands
|
60
72
|
class Destroy < Base
|
61
73
|
end
|
@@ -53,6 +53,18 @@ module Terradactyl
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
module Rev1_01
|
57
|
+
module Init
|
58
|
+
include Terradactyl::Terraform::Rev015::Init
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
module Rev1_02
|
63
|
+
module Init
|
64
|
+
include Terradactyl::Terraform::Rev015::Init
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
56
68
|
module Commands
|
57
69
|
class Init < Base
|
58
70
|
end
|
@@ -103,6 +103,16 @@ module Terradactyl
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
+
module Rev1_01
|
107
|
+
class PlanFileParser < Rev012::PlanFileParser
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
module Rev1_02
|
112
|
+
class PlanFileParser < Rev012::PlanFileParser
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
106
116
|
module Rev011
|
107
117
|
class PlanFileParser < Rev012::PlanFileParser
|
108
118
|
def checksum
|
@@ -4,16 +4,15 @@ module Terradactyl
|
|
4
4
|
module Terraform
|
5
5
|
module VersionManager
|
6
6
|
class Defaults
|
7
|
-
DEFAULT_INSTALL_DIR
|
8
|
-
|
9
|
-
|
10
|
-
DEFAULT_VERSION = nil
|
7
|
+
DEFAULT_INSTALL_DIR = Gem.bindir
|
8
|
+
DEFAULT_RELEASES_URL = 'https://releases.hashicorp.com/terraform'
|
9
|
+
DEFAULT_VERSION = nil
|
11
10
|
|
12
11
|
def self.load
|
13
12
|
new
|
14
13
|
end
|
15
14
|
|
16
|
-
attr_reader :version, :install_dir, :
|
15
|
+
attr_reader :version, :install_dir, :releases_url
|
17
16
|
|
18
17
|
def initialize
|
19
18
|
load_defaults
|
@@ -31,10 +30,6 @@ module Terradactyl
|
|
31
30
|
@install_dir = validate_path(option) || DEFAULT_INSTALL_DIR
|
32
31
|
end
|
33
32
|
|
34
|
-
def downloads_url=(option)
|
35
|
-
@downloads_url = validate_url(option) || DEFAULT_DOWNLOADS_URL
|
36
|
-
end
|
37
|
-
|
38
33
|
def releases_url=(option)
|
39
34
|
@releases_url = validate_url(option) || DEFAULT_RELEASES_URL
|
40
35
|
end
|
@@ -66,7 +61,6 @@ module Terradactyl
|
|
66
61
|
|
67
62
|
def load_defaults
|
68
63
|
@install_dir = DEFAULT_INSTALL_DIR
|
69
|
-
@downloads_url = DEFAULT_DOWNLOADS_URL
|
70
64
|
@releases_url = DEFAULT_RELEASES_URL
|
71
65
|
@version = DEFAULT_VERSION
|
72
66
|
end
|
@@ -31,8 +31,7 @@ module Terradactyl
|
|
31
31
|
class << self
|
32
32
|
extend Forwardable
|
33
33
|
|
34
|
-
def_delegators :@options, :version, :version=, :install_dir,
|
35
|
-
:install_dir=, :downloads_url, :downloads_url=,
|
34
|
+
def_delegators :@options, :version, :version=, :install_dir, :install_dir=,
|
36
35
|
:releases_url, :releases_url=, :reset!
|
37
36
|
|
38
37
|
def_delegators :@inventory, :[], :binaries, :any?
|
@@ -153,6 +152,9 @@ module Terradactyl
|
|
153
152
|
fh = Downloader.fetch(releases_url)
|
154
153
|
re = /terraform_(?<version>\d+\.\d+\.\d+(-\w+)?)/
|
155
154
|
fh.read.scan(re).flatten.sort_by { |v| Gem::Version.new(v) }
|
155
|
+
ensure
|
156
|
+
fh.close
|
157
|
+
fh.unlink
|
156
158
|
end
|
157
159
|
|
158
160
|
def pessimistic_max(version)
|
@@ -163,12 +165,7 @@ module Terradactyl
|
|
163
165
|
end
|
164
166
|
|
165
167
|
def calculate_latest
|
166
|
-
|
167
|
-
re = %r{#{releases_url}\/(?<version>\d+\.\d+\.\d+)}
|
168
|
-
fh.read.match(re)['version']
|
169
|
-
ensure
|
170
|
-
fh.close
|
171
|
-
fh.unlink
|
168
|
+
remote_versions.reject { |e| e =~ /\d+\.\d+\.\d+-/ }.last
|
172
169
|
end
|
173
170
|
end
|
174
171
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terradactyl-terraform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Warsing
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|