terraspace 2.0.2 → 2.0.3

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: 1a0597eb436b3d646b4163c32659fefccc2c8a023a1d155e6427ea2c809a9325
4
- data.tar.gz: 40219e371fc4c9e8bb9f9b6e8c8e4806b3a1c5490a27d3e566467a966f8cf98e
3
+ metadata.gz: 2fec1ba076567ee419169922ed9dd183f13bd998983776f603bf36b051d7a6a7
4
+ data.tar.gz: a2c710787cedca1d62b788c761a9cb3bb40f43511d04ccf51fdfe44a0cdff391
5
5
  SHA512:
6
- metadata.gz: 466a494240d4b8c15f0ed6c8fb3a33973b5fbdf590c8ca1b18ce34718b84f0c14ce7487f2813d9a6202b5da9d500c93f408e669642b19c4c86f1e20e90d1d32a
7
- data.tar.gz: 798bb6923e162bb18586de66f3ce9f5ac1e0182297a790569d6e40cd8104160b5ad9164bf81cc0e44d13bc140826f3ee30cb7701bb05c916e4ca365ab2d2d0c4
6
+ metadata.gz: 3318d458250b2e33892740f9fd1fa47d363b2bcffb53a8c8dc8ac081e282bb3cd13be18b230841aa9c125d3fe5e832b53cf2294a51010c123ec96c831666d76d
7
+ data.tar.gz: 4acc67e5c612e584d96c2fd752a1b967c5fe9ce34069ec3149b5f1f6329dff56075f26a220106d20e22155d37279d50cb2e02db10bec873c7803fcadddc1e890
@@ -0,0 +1 @@
1
+ github: boltops-tools
data/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@
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.0.3] - 2022-07-04
7
+ - [#237](https://github.com/boltops-tools/terraspace/pull/237) remove duplicate paths in layering
8
+ - [#244](https://github.com/boltops-tools/terraspace/pull/244) rename _cache2 to .cache2
9
+ - [#245](https://github.com/boltops-tools/terraspace/pull/245) set utf8 in case system is not configured with LANG=en_US.UTF-8
10
+
6
11
  ## [2.0.2] - 2022-06-21
7
12
  - [#242](https://github.com/boltops-tools/terraspace/pull/242) :PROJECT variable: TS_PROJECT as well as config.cloud.project
8
13
 
@@ -2,7 +2,7 @@ module Terraspace::CLI::Concerns
2
2
  module PlanPath
3
3
  # Use when --out option not used
4
4
  def plan_path
5
- ".terraspace-cache/_cache2/plan/plan.binary"
5
+ ".terraspace-cache/.cache2/plan/plan.binary"
6
6
  end
7
7
  end
8
8
  end
@@ -2,7 +2,7 @@ class Terraspace::CLI::Logs
2
2
  module Concern
3
3
  # Filters for lines that belong to the last ran process pid
4
4
  def readlines(path)
5
- lines = IO.readlines(path)
5
+ lines = IO.readlines(path).map { |l| l.force_encoding('UTF-8') }
6
6
  found = lines.reverse.find do |line|
7
7
  pid(line) # search in reverse order for lines with interesting info
8
8
  end
@@ -62,7 +62,7 @@ module Terraspace::Cloud
62
62
  # terraform plan can be a kind of apply or destroy
63
63
  # terraform apply can be a kind of apply or destroy
64
64
  kind = self.class.name.to_s.split('::').last.underscore # IE: apply or destroy
65
- dir = "#{@mod.cache_dir}/.terraspace-cache/_cache2/#{kind}"
65
+ dir = "#{@mod.cache_dir}/.terraspace-cache/.cache2/#{kind}"
66
66
  FileUtils.rm_rf(dir)
67
67
  FileUtils.mkdir_p(dir)
68
68
  end
@@ -11,7 +11,7 @@ class Terraspace::Cloud::Folder
11
11
  end
12
12
 
13
13
  def artifacts_path
14
- "#{@mod.cache_dir}/.terraspace-cache/_cache2/artifacts/#{@type}"
14
+ "#{@mod.cache_dir}/.terraspace-cache/.cache2/artifacts/#{@type}"
15
15
  end
16
16
  end
17
17
  end
@@ -12,7 +12,7 @@ class Terraspace::Cloud::Folder
12
12
  FileUtils.rm_rf(artifacts_path)
13
13
  FileUtils.mkdir_p(File.dirname(artifacts_path))
14
14
 
15
- expr = "#{@mod.cache_dir}/.terraspace-cache/_cache2/#{@type}/*"
15
+ expr = "#{@mod.cache_dir}/.terraspace-cache/.cache2/#{@type}/*"
16
16
  Dir.glob(expr).each do |src|
17
17
  dest = "#{artifacts_path}/#{File.basename(src)}"
18
18
  FileUtils.mkdir_p(File.dirname(dest))
@@ -23,7 +23,7 @@ module Terraspace::Cloud
23
23
  clean_cache2_stage
24
24
  # .terraspace-cache/dev/stacks/demo
25
25
  Dir.chdir(@mod.cache_dir) do
26
- cache2_path = ".terraspace-cache/_cache2/#{@kind}"
26
+ cache2_path = ".terraspace-cache/.cache2/#{@kind}"
27
27
  FileUtils.mkdir_p(cache2_path)
28
28
 
29
29
  IO.write("#{cache2_path}/#{@kind}.log", Terraspace::Logger.logs)
@@ -41,7 +41,7 @@ class Terraspace::Compiler::Strategy::Tfvar
41
41
  def paths
42
42
  project_paths = full_paths(project_tfvars_dir)
43
43
  stack_paths = full_paths(stack_tfvars_dir)
44
- paths = project_paths + stack_paths
44
+ paths = (project_paths + stack_paths).uniq
45
45
  show_layers(paths)
46
46
  paths.select do |path|
47
47
  File.exist?(path)
@@ -45,7 +45,8 @@ module Terraspace
45
45
  end
46
46
 
47
47
  def logs
48
- @@buffer.join('')
48
+ # force_encoding https://jch.github.io/posts/2013-03-05-ruby-incompatible-encoding.html
49
+ @@buffer.map { |s| s.force_encoding('UTF-8') }.join('')
49
50
  end
50
51
 
51
52
  # for test framework
@@ -22,7 +22,7 @@ module Terraspace::Terraform::Ihooks::After
22
22
  def cloud_create_plan
23
23
  return unless Terraspace.cloud?
24
24
 
25
- unless @mod.out_option.include?("_cache2")
25
+ unless @mod.out_option.include?(".cache2/")
26
26
  # copy absolute path directly
27
27
  src = @mod.out_option.starts_with?('/') ? @mod.out_option : "#{@mod.cache_dir}/#{@mod.out_option}"
28
28
  dest = "#{@mod.cache_dir}/#{plan_path}"
@@ -1,3 +1,3 @@
1
1
  module Terraspace
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
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.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-21 00:00:00.000000000 Z
11
+ date: 2022-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -388,6 +388,7 @@ files:
388
388
  - ".cody/unit/bin/build.sh"
389
389
  - ".cody/unit/buildspec.yml"
390
390
  - ".cody/unit/project.rb"
391
+ - ".github/FUNDING.yml"
391
392
  - ".github/ISSUE_TEMPLATE.md"
392
393
  - ".github/ISSUE_TEMPLATE/bug_report.md"
393
394
  - ".github/ISSUE_TEMPLATE/documentation.md"