terraspace 0.6.17 → 0.6.18

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: 9681902927e9231899ed1d67ff66a4b50ac46bb2411fa271431f4cbf80cd87c7
4
- data.tar.gz: c67623a069d74c5b722a37e852888949fcfd0302acb0a9db88805f7141927426
3
+ metadata.gz: 56e9189f05ef673a6396db763930b35127404e8af22ad2eeaf946ed0fc0d8555
4
+ data.tar.gz: 1b147be3d3e63f5c150c9b7c2b92241d2e627964216af53da2be8cfa10776bbc
5
5
  SHA512:
6
- metadata.gz: d3e4dc815c6a64cec67b2c87ab10f3be92f0ab661f11b757aefa5140c9a105e7769b48e50aa81f3b67118bd3076c2d7840a4c0f9c91f880272731b298c068d47
7
- data.tar.gz: 12f5a76c19760c1fe049f38fe55148000d5305b7f3e407b27bd5ee779a7eb10ac8ea4fd2dfcb7474b5fbfecb93339171c6b117d706d2e45e2825aac41d0f4e1f
6
+ metadata.gz: c76b456a1750b9bbbc9dc0e8b6c7ec79030d2edefd57bee80e43799c958fa608ac953b299f51f7422caccca1bc1047c2243a518fb03982b78354900f64168f64
7
+ data.tar.gz: bc80c886871337ca4c04029a0881453bdf0630acfda8996ca47fc18d12981224ff33ef816c9a79a189a5990682a2c93ae983f4ed42849099ea43c7b81453dbc1
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
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
+ ## [0.6.18] - 2021-10-28
7
+ - [#147](https://github.com/boltops-tools/terraspace/pull/147) improve error message output
8
+ - [#148](https://github.com/boltops-tools/terraspace/pull/148) Improve shim wrapper generator
9
+
6
10
  ## [0.6.17] - 2021-10-02
7
11
  - [#142](https://github.com/boltops-tools/terraspace/pull/142) improve builder skip check: check if its a dir
8
12
 
data/SECURITY.md ADDED
@@ -0,0 +1,3 @@
1
+ # Security Policy
2
+
3
+ Refer to: https://terraspace.cloud/docs/policies/security/
@@ -18,7 +18,6 @@ class Terraspace::CLI::New
18
18
  end
19
19
 
20
20
  def create
21
- return unless File.exist?(".git")
22
21
  dest = @path
23
22
  template "terraspace", dest
24
23
  chmod dest, 0755
@@ -44,6 +43,8 @@ class Terraspace::CLI::New
44
43
 
45
44
  export PATH=#{dir}:/$PATH
46
45
 
46
+ Also note, the shim wrapper contains starter code. Though it should generally work for most systems,
47
+ it might require adjustments depending on your system.
47
48
  EOL
48
49
  end
49
50
 
@@ -2,7 +2,7 @@ class Terraspace::Shell
2
2
  class Error
3
3
  attr_accessor :lines
4
4
  def initialize
5
- @lines = '' # holds aggregation of all error lines
5
+ @lines = [] # holds aggregation of all error lines
6
6
  end
7
7
 
8
8
  def known?
@@ -11,11 +11,11 @@ class Terraspace::Shell
11
11
 
12
12
  def instance
13
13
  if reinit_required?
14
- Terraspace::InitRequiredError.new(@lines)
14
+ Terraspace::InitRequiredError.new(message)
15
15
  elsif bucket_not_found?
16
- Terraspace::BucketNotFoundError.new(@lines)
16
+ Terraspace::BucketNotFoundError.new(message)
17
17
  elsif shared_cache_error?
18
- Terraspace::SharedCacheError.new(@lines)
18
+ Terraspace::SharedCacheError.new(message)
19
19
  end
20
20
  end
21
21
 
@@ -34,7 +34,8 @@ class Terraspace::Shell
34
34
  end
35
35
 
36
36
  def message
37
- @lines.gsub("\n", ' ').squeeze(' ') # remove double whitespaces and newlines
37
+ # For error messages, terraform lines from buffer do not contain newlines. So join with newline
38
+ @lines.join("\n")
38
39
  end
39
40
 
40
41
  def shared_cache_error?
@@ -9,10 +9,11 @@ class Terraspace::Terraform::Runner
9
9
  end
10
10
 
11
11
  def retry?
12
- if @retries <= 3 && !@stop_retrying
12
+ max_retries = ENV['TS_MAX_RETRIES'] ? ENV['TS_MAX_RETRIES'].to_i : 3
13
+ if @retries <= max_retries && !@stop_retrying
13
14
  true # will retry
14
15
  else
15
- logger.info "ERROR: #{@exception.message}"
16
+ logger.info "ERROR after max retries #{max_retries}: #{@exception.message}"
16
17
  false # will not retry
17
18
  end
18
19
  end
@@ -1,3 +1,3 @@
1
1
  module Terraspace
2
- VERSION = "0.6.17"
2
+ VERSION = "0.6.18"
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: 0.6.17
4
+ version: 0.6.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-02 00:00:00.000000000 Z
11
+ date: 2021-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -384,6 +384,7 @@ files:
384
384
  - LICENSE.txt
385
385
  - README.md
386
386
  - Rakefile
387
+ - SECURITY.md
387
388
  - exe/terraspace
388
389
  - lib/templates/base/arg/terraform.rb.tt
389
390
  - lib/templates/base/git_hook/hook.sh