kurgan 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kurgan/test.rb +14 -7
- data/lib/kurgan/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4c25066d624e85ed8377dd6ccb37b62a1513d409f9ee55a65f97455dfadda24
|
4
|
+
data.tar.gz: 531d4eeb80d2db9bf0ef59e84e2a85da5349de755f53b99856b4ba9520bf73fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b93ae4e492a89817afe591a0044fbe8ab2fbb72802720bb421f270fa9bfcb4c0605b91a6a9dd70a5e26d5f31740274af66c4fdce4741bb6c179116128de228e
|
7
|
+
data.tar.gz: ccb69d74207da7e95212e2e19b47265c4069ce3bfca938781ef9b430ea5f290bf5f75e10fe81eaa8f7f5856fd2d1ade34aa6a629f6b49050ff37dc8ff8a783e2
|
data/lib/kurgan/test.rb
CHANGED
@@ -25,15 +25,22 @@ module Kurgan
|
|
25
25
|
case options[:type]
|
26
26
|
when 'config'
|
27
27
|
template('templates/test.yaml.tt', "#{options[:directory]}/#{test_name}.test.yaml")
|
28
|
-
say "created config test case #{options[:directory]}/#{test_name}.test.yaml", :green
|
29
28
|
when 'spec'
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
if test_name == '*'
|
30
|
+
test_yamls = Dir["tests/*.test.yaml"]
|
31
|
+
tests = test_yamls.map {|test_yaml| test_yaml[/tests\/(.*).test.yaml/, 1]}
|
32
|
+
else
|
33
|
+
tests = [test_name]
|
34
|
+
end
|
35
|
+
|
36
|
+
tests.each do |name|
|
37
|
+
output_file = "#{Dir.pwd}/out/tests/#{name}/#{@component_name}.compiled.yaml"
|
38
|
+
if !File.file?(output_file)
|
39
|
+
warn "compile cloudformation test output file #{output_file} not found.\nRun `cfhighlander cftest -t #{options[:directory]}/#{name}.test.yaml`"
|
40
|
+
end
|
41
|
+
compiled_test = YAML.load_file("#{Dir.pwd}/out/tests/#{name}/#{@component_name}.compiled.yaml")
|
42
|
+
template('templates/test.spec.tt', "spec/#{name}_spec.rb", compiled_test)
|
33
43
|
end
|
34
|
-
compiled_test = YAML.load_file("#{Dir.pwd}/out/tests/#{test_name}/#{@component_name}.compiled.yaml")
|
35
|
-
template('templates/test.spec.tt', "spec/#{test_name}_spec.rb", compiled_test)
|
36
|
-
say "created spec test spec/#{test_name}_spec.rb", :green
|
37
44
|
else
|
38
45
|
error "#{options[:type]} is not a supported test type yet", :red
|
39
46
|
end
|
data/lib/kurgan/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kurgan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guslington
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|