simmer 1.0.0.pre.alpha.1 → 1.0.0.pre.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/simmer.rb +2 -2
- data/lib/simmer/configuration.rb +6 -6
- data/lib/simmer/externals/aws_file_system.rb +2 -0
- data/lib/simmer/externals/spoon_client.rb +1 -1
- data/lib/simmer/externals/spoon_client/result.rb +1 -1
- data/lib/simmer/runner/result.rb +1 -1
- data/lib/simmer/session/reporter.rb +23 -9
- data/lib/simmer/suite.rb +2 -2
- data/lib/simmer/util/yaml_reader.rb +1 -0
- data/lib/simmer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1166684a6f6ae1ba9ca0e87aab0405fd6a83fa4c8bf5206950827b2d857577ff
|
4
|
+
data.tar.gz: 50214a9c1aa9dfb26bc5663f43a7cb2c36b62fbf31a7a1b52e66067ba84b5bdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2675ec1ade5ebd6465c43040fa561125492a9abb6d58561ad69be852f8b6daa3056d90193fca079c187607f65dbf78983304e1e755ccb9fda0a3ca6a36279edd
|
7
|
+
data.tar.gz: cf2100c542aaf4157417c2e08bbeb7b362bc0505f3ceb2cbc0e47f3e184e9d36826b20347eadb3f6437ac2474672c1faccdefff8b6691e0dc6437a1ae53b5f41
|
data/.gitignore
CHANGED
data/lib/simmer.rb
CHANGED
@@ -36,14 +36,14 @@ require_relative 'simmer/suite'
|
|
36
36
|
module Simmer
|
37
37
|
DEFAULT_CONFIG_PATH = File.join('config', 'simmer.yaml')
|
38
38
|
DEFAULT_RESULTS_DIR = 'results'
|
39
|
-
|
39
|
+
DEFAULT_SIMMER_DIR = 'simmer'
|
40
40
|
class << self
|
41
41
|
def run(path)
|
42
42
|
Suite.new(
|
43
43
|
out: $stdout,
|
44
44
|
config_path: DEFAULT_CONFIG_PATH,
|
45
45
|
results_dir: DEFAULT_RESULTS_DIR,
|
46
|
-
|
46
|
+
simmer_dir: DEFAULT_SIMMER_DIR
|
47
47
|
).run(path)
|
48
48
|
end
|
49
49
|
end
|
data/lib/simmer/configuration.rb
CHANGED
@@ -34,13 +34,13 @@ module Simmer
|
|
34
34
|
config_path:,
|
35
35
|
resolver: Objectable.resolver,
|
36
36
|
results_dir:,
|
37
|
-
|
37
|
+
simmer_dir:,
|
38
38
|
yaml_reader: Util::YamlReader.new
|
39
39
|
)
|
40
40
|
@config = yaml_reader.read(config_path)
|
41
41
|
@resolver = resolver
|
42
42
|
@results_dir = results_dir
|
43
|
-
@
|
43
|
+
@simmer_dir = simmer_dir
|
44
44
|
@yaml_reader = yaml_reader
|
45
45
|
|
46
46
|
freeze
|
@@ -59,15 +59,15 @@ module Simmer
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def tests_dir
|
62
|
-
File.join(
|
62
|
+
File.join(simmer_dir, TESTS)
|
63
63
|
end
|
64
64
|
|
65
65
|
def fixtures_dir
|
66
|
-
File.join(
|
66
|
+
File.join(simmer_dir, FIXTURES)
|
67
67
|
end
|
68
68
|
|
69
69
|
def files_dir
|
70
|
-
File.join(
|
70
|
+
File.join(simmer_dir, FILES)
|
71
71
|
end
|
72
72
|
|
73
73
|
def fixture_set
|
@@ -80,7 +80,7 @@ module Simmer
|
|
80
80
|
|
81
81
|
attr_reader :resolver,
|
82
82
|
:results_dir,
|
83
|
-
:
|
83
|
+
:simmer_dir,
|
84
84
|
:yaml_reader
|
85
85
|
|
86
86
|
def get(key)
|
@@ -43,7 +43,7 @@ module Simmer
|
|
43
43
|
begin
|
44
44
|
time_in_seconds = Benchmark.measure do
|
45
45
|
execution_result = execute!(specification, config)
|
46
|
-
end.real
|
46
|
+
end.real
|
47
47
|
rescue Pdi::Spoon::PanError, Pdi::Spoon::KitchenError => e
|
48
48
|
return Result.new(
|
49
49
|
message: "PDI execution returned an error: #{e.class.name} (#{e.execution.code})",
|
data/lib/simmer/runner/result.rb
CHANGED
@@ -23,17 +23,13 @@ module Simmer
|
|
23
23
|
freeze
|
24
24
|
end
|
25
25
|
|
26
|
-
def write!(
|
27
|
-
|
26
|
+
def write!(dir)
|
27
|
+
dir = setup_directory(dir)
|
28
28
|
|
29
|
-
|
30
|
-
pdi_out = File.join(path, PDI_OUT_FILE)
|
31
|
-
pdi_err = File.join(path, PDI_ERR_FILE)
|
29
|
+
IO.write(data_path(dir), session_result.to_h.to_yaml)
|
32
30
|
|
33
|
-
|
34
|
-
|
35
|
-
pdi_out_file = File.open(pdi_out, 'w')
|
36
|
-
pdi_err_file = File.open(pdi_err, 'w')
|
31
|
+
pdi_out_file = File.open(pdi_out_path(dir), 'w')
|
32
|
+
pdi_err_file = File.open(pdi_err_path(dir), 'w')
|
37
33
|
|
38
34
|
write_part(session_result.runner_results, pdi_out_file, pdi_err_file)
|
39
35
|
|
@@ -55,6 +51,24 @@ module Simmer
|
|
55
51
|
|
56
52
|
attr_reader :session_result
|
57
53
|
|
54
|
+
def data_path(dir)
|
55
|
+
File.join(dir, DATA_FILE)
|
56
|
+
end
|
57
|
+
|
58
|
+
def pdi_out_path(dir)
|
59
|
+
File.join(dir, PDI_OUT_FILE)
|
60
|
+
end
|
61
|
+
|
62
|
+
def pdi_err_path(dir)
|
63
|
+
File.join(dir, PDI_ERR_FILE)
|
64
|
+
end
|
65
|
+
|
66
|
+
def setup_directory(dir)
|
67
|
+
File.expand_path(dir).tap do |expanded_dir|
|
68
|
+
FileUtils.mkdir_p(expanded_dir)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
58
72
|
def write_part(runner_results, pdi_out_file, pdi_err_file)
|
59
73
|
runner_results.each do |runner_result|
|
60
74
|
name = runner_result.name
|
data/lib/simmer/suite.rb
CHANGED
@@ -19,11 +19,11 @@ module Simmer
|
|
19
19
|
class Suite
|
20
20
|
attr_reader :configuration, :session
|
21
21
|
|
22
|
-
def initialize(
|
22
|
+
def initialize(config_path:, out:, results_dir:, simmer_dir:)
|
23
23
|
@configuration = Configuration.new(
|
24
24
|
config_path: config_path,
|
25
25
|
results_dir: results_dir,
|
26
|
-
|
26
|
+
simmer_dir: simmer_dir
|
27
27
|
)
|
28
28
|
|
29
29
|
runner = Runner.new(
|
data/lib/simmer/version.rb
CHANGED