kurgan 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 488e05edbe120ded7cbfb9dbaa7b751fc4cc168192d4ac63e31d107481073587
4
- data.tar.gz: c57b6526b9b8e69b73c7089619337d6e2cc4575d9f72a8a65a36850b02b32881
3
+ metadata.gz: a4c25066d624e85ed8377dd6ccb37b62a1513d409f9ee55a65f97455dfadda24
4
+ data.tar.gz: 531d4eeb80d2db9bf0ef59e84e2a85da5349de755f53b99856b4ba9520bf73fa
5
5
  SHA512:
6
- metadata.gz: df9a706171fd7bd1d722cb43f9e8bac729514fb2fec973d47a03d342e453e39817f31aa9271029dca782948f4f6129e9f4c9a38b4c3e31ab149a31d44cccf1b3
7
- data.tar.gz: 05d00def80a4cd83c51feab7b94602b27e29cb2c4de1526577d5016391ae2afd2fe465d63c02f56d034a124072caaec3a8dc9da89f18b0a5cac3c07f4492ee94
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
- output_file = "#{Dir.pwd}/out/tests/#{test_name}/#{@component_name}.compiled.yaml"
31
- if !File.file?(output_file)
32
- error "compile cloudformation test output file #{output_file} not found.\nRun `cfhighlander cftest -t #{options[:directory]}/#{test_name}.test.yaml`"
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
@@ -1,3 +1,3 @@
1
1
  module Kurgan
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
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.0
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: 2021-08-12 00:00:00.000000000 Z
11
+ date: 2022-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor