terraspace 2.2.6 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/templates/base/project/Gemfile.tt +3 -7
- data/lib/terraspace/cli/fmt/runner.rb +9 -4
- data/lib/terraspace/cli/fmt.rb +3 -1
- data/lib/terraspace/cli/new/helpers.rb +3 -15
- data/lib/terraspace/compiler/strategy/mod.rb +3 -2
- data/lib/terraspace/seeder/content.rb +3 -1
- data/lib/terraspace/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ee5dc242e1055db24d4105a3b2e8be3b7fb68bb283631843633075d8e949fbbd
|
|
4
|
+
data.tar.gz: f7639d78fbffeebb654f4e5a0eccd5236e1b2f0e2e10b0b9e1e3914a19b6cd75
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 840de5054bc4fb69a5f00031076f9dd65df5c7d7fddbd636b734df53c475490d1121b2d8b71f3f9910d16a7ed6f21cfa2c5d44088aff58bf7aff5195cc4f63a7
|
|
7
|
+
data.tar.gz: 911059ad7bb57d41b0c3ec3f83e3b2bf2f5623a2423ac496c35509cbca3be1e3b7bbf61c38b89b252d74bda846691a6e741967c129978a700d1b15d9a1383a29
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
|
5
5
|
|
|
6
|
+
## [2.2.7] - 2023-06-07
|
|
7
|
+
- [#308](https://github.com/boltops-tools/terraspace/pull/308) feat: add support for exit code in terraspace fmt command
|
|
8
|
+
- [#310](https://github.com/boltops-tools/terraspace/pull/310) improve terraspace seed for map(string) variables
|
|
9
|
+
- [#311](https://github.com/boltops-tools/terraspace/pull/311) erb processing for rb files in modules folder for dsl
|
|
10
|
+
- [#312](https://github.com/boltops-tools/terraspace/pull/312) refactor terraspace new project Gemfile.tt
|
|
11
|
+
- [#313](https://github.com/boltops-tools/terraspace/pull/313) cleanup terraspace fmt exit status return
|
|
12
|
+
|
|
6
13
|
## [2.2.6] - 2023-05-03
|
|
7
14
|
- [#302](https://github.com/boltops-tools/terraspace/pull/302) update new project generator config/app.rb config.build.copy_modules
|
|
8
15
|
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
source "https://rubygems.org"
|
|
2
2
|
|
|
3
|
-
<%=
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"rspec-terraspace",
|
|
7
|
-
plugin_gem_name,
|
|
8
|
-
)
|
|
9
|
-
%>
|
|
3
|
+
gem "terraspace", "~> <%= terraspace_minor_version %>"
|
|
4
|
+
gem "<%= plugin_gem_name %>"
|
|
5
|
+
gem "rspec-terraspace"
|
|
10
6
|
|
|
11
7
|
# Uncomment the ci and vcs provider you wish to use. Should use both ci and vcs gem
|
|
12
8
|
# Docs: https://terraspace.cloud/docs/ci/
|
|
@@ -10,14 +10,17 @@ class Terraspace::CLI::Fmt
|
|
|
10
10
|
|
|
11
11
|
def format!
|
|
12
12
|
logger.info @dir.color(:green)
|
|
13
|
+
|
|
14
|
+
exit_status = nil
|
|
13
15
|
Dir.chdir(@dir) do
|
|
14
16
|
skip_rename
|
|
15
17
|
begin
|
|
16
|
-
terraform_fmt
|
|
18
|
+
exit_status = terraform_fmt
|
|
17
19
|
ensure
|
|
18
20
|
restore_rename
|
|
19
21
|
end
|
|
20
22
|
end
|
|
23
|
+
exit_status
|
|
21
24
|
end
|
|
22
25
|
|
|
23
26
|
def skip_rename
|
|
@@ -35,9 +38,11 @@ class Terraspace::CLI::Fmt
|
|
|
35
38
|
def sh(command)
|
|
36
39
|
logger.debug("=> #{command}")
|
|
37
40
|
success = system(command)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
unless success
|
|
42
|
+
logger.info "WARN: There were some errors running terraform fmt for files in #{@dir}:".color(:yellow)
|
|
43
|
+
logger.info "The errors are shown above"
|
|
44
|
+
end
|
|
45
|
+
$?.exitstatus
|
|
41
46
|
end
|
|
42
47
|
|
|
43
48
|
def restore_rename
|
data/lib/terraspace/cli/fmt.rb
CHANGED
|
@@ -3,21 +3,9 @@ class Terraspace::CLI::New
|
|
|
3
3
|
include Helpers::PluginGem
|
|
4
4
|
|
|
5
5
|
private
|
|
6
|
-
def
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
lines << gem_line(name)
|
|
10
|
-
end
|
|
11
|
-
lines.join("\n")
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def gem_line(name)
|
|
15
|
-
if name == "terraspace"
|
|
16
|
-
major_version = Terraspace::VERSION.split('.').first
|
|
17
|
-
%Q|gem "#{name}", '~> #{major_version}'|
|
|
18
|
-
else
|
|
19
|
-
%Q|gem "#{name}"|
|
|
20
|
-
end
|
|
6
|
+
def terraspace_minor_version
|
|
7
|
+
major, minor, _ = Terraspace::VERSION.split('.')
|
|
8
|
+
[major, minor, '0'].join('.')
|
|
21
9
|
end
|
|
22
10
|
end
|
|
23
11
|
end
|
|
@@ -10,7 +10,7 @@ module Terraspace::Compiler::Strategy
|
|
|
10
10
|
|
|
11
11
|
def strategy_class(path)
|
|
12
12
|
# Significant speed improvement
|
|
13
|
-
return Mod::Pass if copy_modules?
|
|
13
|
+
return Mod::Pass if copy_modules?(path)
|
|
14
14
|
|
|
15
15
|
ext = File.extname(path).sub('.','')
|
|
16
16
|
return Mod::Pass if ext.empty? # infinite loop without this
|
|
@@ -20,7 +20,8 @@ module Terraspace::Compiler::Strategy
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
@@copy_modules_warned = false
|
|
23
|
-
def copy_modules?
|
|
23
|
+
def copy_modules?(path)
|
|
24
|
+
return false if path.include?("/modules/") && path.ends_with?(".rb") # For DSL
|
|
24
25
|
return false unless @options[:type_dir] == "modules"
|
|
25
26
|
|
|
26
27
|
copy_modules = Terraspace.config.build.copy_modules
|
|
@@ -39,7 +39,9 @@ class Terraspace::Seeder
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def escape(type, value)
|
|
42
|
-
if type
|
|
42
|
+
if type == "map(string)"
|
|
43
|
+
"{...} # #{type}"
|
|
44
|
+
elsif type&.include?('(') # complex type
|
|
43
45
|
"[...] # #{type}"
|
|
44
46
|
elsif %w[null any true false].include?(value)
|
|
45
47
|
value # no quotes
|
data/lib/terraspace/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: terraspace
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
4
|
+
version: 2.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tung Nguyen
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-06-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -346,7 +346,7 @@ dependencies:
|
|
|
346
346
|
- - ">="
|
|
347
347
|
- !ruby/object:Gem::Version
|
|
348
348
|
version: '0'
|
|
349
|
-
description:
|
|
349
|
+
description:
|
|
350
350
|
email:
|
|
351
351
|
- tung@boltops.com
|
|
352
352
|
executables:
|
|
@@ -950,7 +950,7 @@ metadata:
|
|
|
950
950
|
homepage_uri: https://terraspace.cloud
|
|
951
951
|
source_code_uri: https://github.com/boltops-tools/terraspace
|
|
952
952
|
changelog_uri: https://github.com/boltops-tools/terraspace/blob/master/CHANGELOG.md
|
|
953
|
-
post_install_message:
|
|
953
|
+
post_install_message:
|
|
954
954
|
rdoc_options: []
|
|
955
955
|
require_paths:
|
|
956
956
|
- lib
|
|
@@ -965,8 +965,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
965
965
|
- !ruby/object:Gem::Version
|
|
966
966
|
version: '0'
|
|
967
967
|
requirements: []
|
|
968
|
-
rubygems_version: 3.
|
|
969
|
-
signing_key:
|
|
968
|
+
rubygems_version: 3.4.10
|
|
969
|
+
signing_key:
|
|
970
970
|
specification_version: 4
|
|
971
971
|
summary: 'Terraspace: The Terraspace Framework'
|
|
972
972
|
test_files:
|