diddy 0.10.0 → 0.10.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.
- data/diddy.gemspec +1 -1
- data/lib/diddy/run_result.rb +2 -0
- data/lib/diddy/run_result_printer.rb +43 -0
- metadata +2 -2
data/diddy.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "diddy"
|
7
|
-
gem.version = '0.10.
|
7
|
+
gem.version = '0.10.1'
|
8
8
|
gem.authors = ["Diederick Lawson", "Marcel de Graaf"]
|
9
9
|
gem.email = ["diederick@altovista.nl", "mail@marceldegraaf.net"]
|
10
10
|
gem.description = %q{Diddy script runner}
|
data/lib/diddy/run_result.rb
CHANGED
@@ -6,6 +6,49 @@ module Diddy
|
|
6
6
|
self.run_result = run_result
|
7
7
|
end
|
8
8
|
|
9
|
+
#
|
10
|
+
# Converts the result to a string
|
11
|
+
#
|
12
|
+
def to_s
|
13
|
+
text = ""
|
14
|
+
|
15
|
+
run_result.scripts.each do |script|
|
16
|
+
text << "# #{script.description}\n"
|
17
|
+
|
18
|
+
script.scenarios.each do |scenario|
|
19
|
+
if scenario.result
|
20
|
+
text << "## #{scenario.description}\n\n"
|
21
|
+
else
|
22
|
+
text << "## [X] #{scenario.description}\n\n"
|
23
|
+
end
|
24
|
+
|
25
|
+
scenario.steps.each do |step|
|
26
|
+
if step.result
|
27
|
+
text << " * #{step.description}\n"
|
28
|
+
else
|
29
|
+
text << " * [X] #{step.description}\n"
|
30
|
+
end
|
31
|
+
|
32
|
+
if step.exception
|
33
|
+
text << "#{step.exception.message}: \n\n#{step.exception.backtrace.join("\n")}\n\n"
|
34
|
+
end
|
35
|
+
|
36
|
+
if step.sub_steps.any?
|
37
|
+
step.sub_steps.each do |sub_step|
|
38
|
+
if sub_step.result
|
39
|
+
text << " * #{sub_step.description}\n"
|
40
|
+
else
|
41
|
+
text << " * [X] #{sub_step.description}\n"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
text
|
50
|
+
end
|
51
|
+
|
9
52
|
#
|
10
53
|
# Converts the result to HTML
|
11
54
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-10-
|
13
|
+
date: 2013-10-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: term/ansicolor
|