terraspace 0.2.1 → 0.2.2

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: 1a1cb3e8dfc7d02eae24d3e81a7e0a10033c9aa5890c41e77b35c29d84cc65c6
4
- data.tar.gz: 31d1dce8f2c88b8d5548ba1e93ae7038d60b672b9a7e950cea5422ff504a5203
3
+ metadata.gz: bb1f738f3830420427da3a1ac7ba6b2bcf946da8cce8348d28ba67f7eb692cf3
4
+ data.tar.gz: c88c1ce153617f68acc92d89b8fc1d82e193fa2271d701b658737069511a0c2c
5
5
  SHA512:
6
- metadata.gz: fb5bad6aca8391331b16131d20289d847ecd7c19ad5d4e22e9bda785937367c02b94ecab70132b2e157a88a6761012a3049a01ed1defb4aaf91f7dfb0e7a9b25
7
- data.tar.gz: 41dbfa2e0323cf7cfdc7cb3dd26278a109fbc4f1c8133ef7f3cf92aa9d146825ff777fbb0e5755284a12d6df77f94f13bbaff525849d1b642306dc452bda1cdb
6
+ metadata.gz: '097c4a70ac24ecfdf0e6a87b844688adf82bc6f41699a903877af054136a00bf9614ace775cb2c431dbbafc92b981218ece247e691b4db079191b080133032eb'
7
+ data.tar.gz: fb0e6162ebb0f48f3e46f441163d94cf93e0186a6a32917071f9cbf5b1f27cec679ac582c39f35a9e61000373ba1bbd074797d7fdf941a2887b6d36463dc2e5d
@@ -3,6 +3,9 @@
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.2.2]
7
+ * #36 cloud.relative_root setting
8
+
6
9
  ## [0.2.1]
7
10
  * #35 fix summary bug when ran multiple times with different envs
8
11
 
@@ -17,8 +17,9 @@ module Terraspace
17
17
  config.cloud = ActiveSupport::OrderedOptions.new
18
18
  config.cloud.overwrite = true
19
19
  config.cloud.overwrite_sensitive = true
20
+ config.cloud.relative_root = nil
20
21
  config.build = ActiveSupport::OrderedOptions.new
21
- config.build.cache_root = nil # defaults to .terraspace-cache
22
+ config.build.cache_root = nil # defaults to /full/path/to/.terraspace-cache
22
23
  config.build.cache_dir = ":CACHE_ROOT/:REGION/:ENV/:BUILD_DIR"
23
24
  config
24
25
  end
@@ -12,7 +12,6 @@ module Terraspace::Terraform
12
12
 
13
13
  # Docs: https://www.terraform.io/docs/cloud/api/workspaces.html
14
14
  def set_working_dir
15
- working_directory = @mod.cache_dir.sub("#{Terraspace.root}/", '')
16
15
  return if working_directory == workspace['attributes']['working-directory']
17
16
 
18
17
  payload = {
@@ -26,6 +25,12 @@ module Terraspace::Terraform
26
25
  http.patch("organizations/#{@organization}/workspaces/#{@workspace_name}", payload)
27
26
  end
28
27
 
28
+ def working_directory
29
+ cache_dir = @mod.cache_dir.sub("#{Terraspace.root}/", '')
30
+ relative_root = Terraspace.config.cloud.relative_root # prepended to TFC Working Directory
31
+ relative_root ? "#{relative_root}/#{cache_dir}" : cache_dir
32
+ end
33
+
29
34
  def set_env_vars
30
35
  Vars.new(@mod, workspace).run
31
36
  end
@@ -1,3 +1,3 @@
1
1
  module Terraspace
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-21 00:00:00.000000000 Z
11
+ date: 2020-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport