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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 781eb6e61ab0938ebf9b48f361a01e79acc62a9dde8dd156bdd1fc330de3f85b
4
- data.tar.gz: 414597476d74bcbac7da78ebf93e7e912d54568ed63b205c98ca4ac59145fd0e
3
+ metadata.gz: 359a4fc58eb55407c6d9972a45e97d25f6bc9fc0d884fd432b8a8e7df61d0b5a
4
+ data.tar.gz: c65d73ea3bd5d97d944efe82677debe5a4dd97cb98027988be0611a0da82d806
5
5
  SHA512:
6
- metadata.gz: 6af4090cea4a2bb2628a50a456963980fae1e968d4f8a616d71ee652a64a62e75ed03ed2ace27aa3075224e41872ce851772b6529910414041b8eba6cb9dfcb8
7
- data.tar.gz: 5378985cd4cf8cef9d63645b7764baa8bdd484e6f17f8dfe3c76dd64cabaecc70ace8397a20340ba76064a9efd53226729b942e9a9b903dec35fecfb61e47a14
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Terradactyl
4
4
  module Terraform
5
- VERSION = '1.0.0'
5
+ VERSION = '1.2.0'
6
6
  end
7
7
  end
@@ -4,16 +4,15 @@ module Terradactyl
4
4
  module Terraform
5
5
  module VersionManager
6
6
  class Defaults
7
- DEFAULT_INSTALL_DIR = Gem.bindir
8
- DEFAULT_DOWNLOADS_URL = 'https://www.terraform.io/downloads.html'
9
- DEFAULT_RELEASES_URL = 'https://releases.hashicorp.com/terraform'
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, :downloads_url, :releases_url
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
@@ -36,10 +36,6 @@ module Terradactyl
36
36
  end
37
37
  end
38
38
 
39
- def downloads_url
40
- VersionManager.downloads_url
41
- end
42
-
43
39
  def releases_url
44
40
  VersionManager.releases_url
45
41
  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
- fh = Downloader.fetch(downloads_url)
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.0.0
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: 2021-06-09 00:00:00.000000000 Z
11
+ date: 2022-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip