terraspace 0.6.16 → 0.6.17

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: c50b3dfbe37199a7e64fa53fdd2df157d63c045ee0101d25702d52a78b6ff555
4
- data.tar.gz: 9731b4341f086406fb11c9436ef434f52261f6161b6c73f00bbefb5d75869944
3
+ metadata.gz: 9681902927e9231899ed1d67ff66a4b50ac46bb2411fa271431f4cbf80cd87c7
4
+ data.tar.gz: c67623a069d74c5b722a37e852888949fcfd0302acb0a9db88805f7141927426
5
5
  SHA512:
6
- metadata.gz: 041ffd7c3b81c6160d8332c93583013865cd8c70b7825dd6af570e91a1a59e4c65aa39a9b6745c35b76692b43fb2df89e390dd380ecf3dcb8c78f3bf21a338c0
7
- data.tar.gz: bce08f9c7cc634f06d53e9d50255cec2db886c65c2b8e23cbee855fc87080d2ad1a0787ef55c250b93b80e894d1c4d6a72034e5ed33d4ac2beaf1c4a090966f7
6
+ metadata.gz: d3e4dc815c6a64cec67b2c87ab10f3be92f0ab661f11b757aefa5140c9a105e7769b48e50aa81f3b67118bd3076c2d7840a4c0f9c91f880272731b298c068d47
7
+ data.tar.gz: 12f5a76c19760c1fe049f38fe55148000d5305b7f3e407b27bd5ee779a7eb10ac8ea4fd2dfcb7474b5fbfecb93339171c6b117d706d2e45e2825aac41d0f4e1f
data/CHANGELOG.md CHANGED
@@ -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.6.17] - 2021-10-02
7
+ - [#142](https://github.com/boltops-tools/terraspace/pull/142) improve builder skip check: check if its a dir
8
+
6
9
  ## [0.6.16] - 2021-10-01
7
10
  - [#141](https://github.com/boltops-tools/terraspace/pull/141) terraspace output: remove extra newline at the end
8
11
 
@@ -0,0 +1,28 @@
1
+ class Terraspace::Compiler::Builder
2
+ class Skip
3
+ def initialize(mod, src_path)
4
+ @mod, @src_path = mod, src_path
5
+ end
6
+
7
+ def check?
8
+ return true unless File.file?(@src_path)
9
+
10
+ # skip certain folders
11
+ check_dirs?(
12
+ "config/args",
13
+ "config/helpers",
14
+ "config/hooks",
15
+ "test",
16
+ "tfvars",
17
+ )
18
+ end
19
+
20
+ def check_dirs?(*names)
21
+ names.flatten.detect { |name| check_dir?(name) }
22
+ end
23
+
24
+ def check_dir?(name)
25
+ @src_path.include?("#{@mod.root}/#{name}/")
26
+ end
27
+ end
28
+ end
@@ -72,13 +72,7 @@ module Terraspace::Compiler
72
72
  end
73
73
 
74
74
  def skip?(src_path)
75
- return true unless File.file?(src_path)
76
- # certain folders will be skipped
77
- src_path.include?("#{@mod.root}/config/args") ||
78
- src_path.include?("#{@mod.root}/config/helpers") ||
79
- src_path.include?("#{@mod.root}/config/hooks") ||
80
- src_path.include?("#{@mod.root}/test") ||
81
- src_path.include?("#{@mod.root}/tfvars")
75
+ Skip.new(@mod, src_path).check?
82
76
  end
83
77
 
84
78
  def search(expr)
@@ -1,3 +1,3 @@
1
1
  module Terraspace
2
- VERSION = "0.6.16"
2
+ VERSION = "0.6.17"
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.16
4
+ version: 0.6.17
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-01 00:00:00.000000000 Z
11
+ date: 2021-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -578,6 +578,7 @@ files:
578
578
  - lib/terraspace/compiler/backend/parser.rb
579
579
  - lib/terraspace/compiler/basename.rb
580
580
  - lib/terraspace/compiler/builder.rb
581
+ - lib/terraspace/compiler/builder/skip.rb
581
582
  - lib/terraspace/compiler/cleaner.rb
582
583
  - lib/terraspace/compiler/cleaner/backend_change.rb
583
584
  - lib/terraspace/compiler/commands_concern.rb