bauxite 0.6.18 → 0.6.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -21
- data/README.md +293 -293
- data/Rakefile +128 -128
- data/bin/bauxite +27 -27
- data/doc/Bauxite.html +6 -9
- data/doc/Bauxite/Action.html +298 -315
- data/doc/Bauxite/ActionModule.html +23 -26
- data/doc/Bauxite/Application.html +36 -38
- data/doc/Bauxite/Context.html +303 -303
- data/doc/Bauxite/Errors.html +6 -9
- data/doc/Bauxite/Errors/AssertionError.html +6 -9
- data/doc/Bauxite/Errors/FileNotFoundError.html +6 -9
- data/doc/Bauxite/Errors/FormatError.html +6 -9
- data/doc/Bauxite/Loggers.html +6 -9
- data/doc/Bauxite/Loggers/CompositeLogger.html +29 -32
- data/doc/Bauxite/Loggers/EchoLogger.html +10 -13
- data/doc/Bauxite/Loggers/FileLogger.html +25 -28
- data/doc/Bauxite/Loggers/HtmlLogger.html +99 -102
- data/doc/Bauxite/Loggers/NullLogger.html +16 -19
- data/doc/Bauxite/Loggers/ReportLogger.html +43 -46
- data/doc/Bauxite/Loggers/TerminalLogger.html +76 -79
- data/doc/Bauxite/Loggers/XtermLogger.html +28 -31
- data/doc/Bauxite/Parser.html +87 -89
- data/doc/Bauxite/ParserModule.html +19 -22
- data/doc/Bauxite/Selector.html +99 -105
- data/doc/Bauxite/SelectorModule.html +27 -30
- data/doc/README_md.html +117 -103
- data/doc/created.rid +58 -58
- data/doc/fonts.css +167 -167
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +117 -103
- data/doc/js/darkfish.js +32 -11
- data/doc/js/jquery.js +0 -0
- data/doc/js/navigation.js +0 -0
- data/doc/js/search.js +0 -0
- data/doc/js/search_index.js +1 -1
- data/doc/js/searcher.js +0 -0
- data/doc/rdoc.css +580 -580
- data/doc/table_of_contents.html +69 -72
- data/lib/bauxite.rb +28 -28
- data/lib/bauxite/actions/alias.rb +51 -51
- data/lib/bauxite/actions/assert.rb +49 -49
- data/lib/bauxite/actions/asserth.rb +60 -60
- data/lib/bauxite/actions/assertm.rb +49 -49
- data/lib/bauxite/actions/assertv.rb +40 -40
- data/lib/bauxite/actions/assertw.rb +47 -47
- data/lib/bauxite/actions/break.rb +39 -39
- data/lib/bauxite/actions/capture.rb +61 -61
- data/lib/bauxite/actions/click.rb +36 -36
- data/lib/bauxite/actions/debug.rb +103 -103
- data/lib/bauxite/actions/doif.rb +43 -43
- data/lib/bauxite/actions/dounless.rb +43 -43
- data/lib/bauxite/actions/echo.rb +36 -36
- data/lib/bauxite/actions/exec.rb +46 -46
- data/lib/bauxite/actions/exit.rb +35 -35
- data/lib/bauxite/actions/failif.rb +52 -52
- data/lib/bauxite/actions/js.rb +41 -41
- data/lib/bauxite/actions/load.rb +49 -49
- data/lib/bauxite/actions/open.rb +35 -35
- data/lib/bauxite/actions/params.rb +40 -40
- data/lib/bauxite/actions/replace.rb +37 -37
- data/lib/bauxite/actions/reset.rb +38 -38
- data/lib/bauxite/actions/return.rb +68 -68
- data/lib/bauxite/actions/ruby.rb +58 -58
- data/lib/bauxite/actions/select.rb +48 -48
- data/lib/bauxite/actions/set.rb +39 -39
- data/lib/bauxite/actions/setif.rb +44 -44
- data/lib/bauxite/actions/source.rb +44 -44
- data/lib/bauxite/actions/store.rb +38 -38
- data/lib/bauxite/actions/submit.rb +37 -37
- data/lib/bauxite/actions/test.rb +67 -67
- data/lib/bauxite/actions/tryload.rb +71 -71
- data/lib/bauxite/actions/wait.rb +38 -38
- data/lib/bauxite/actions/write.rb +44 -44
- data/lib/bauxite/application.rb +349 -349
- data/lib/bauxite/core/action.rb +199 -199
- data/lib/bauxite/core/context.rb +791 -791
- data/lib/bauxite/core/errors.rb +41 -41
- data/lib/bauxite/core/logger.rb +169 -169
- data/lib/bauxite/core/parser.rb +85 -85
- data/lib/bauxite/core/selector.rb +152 -152
- data/lib/bauxite/loggers/composite.rb +91 -91
- data/lib/bauxite/loggers/echo.rb +36 -36
- data/lib/bauxite/loggers/file.rb +68 -68
- data/lib/bauxite/loggers/html.rb +154 -154
- data/lib/bauxite/loggers/terminal.rb +134 -134
- data/lib/bauxite/loggers/xterm.rb +101 -101
- data/lib/bauxite/parsers/csv.rb +43 -43
- data/lib/bauxite/parsers/default.rb +42 -42
- data/lib/bauxite/parsers/html.rb +79 -79
- data/lib/bauxite/selectors/attr.rb +39 -39
- data/lib/bauxite/selectors/frame.rb +60 -60
- data/lib/bauxite/selectors/json.rb +88 -88
- data/lib/bauxite/selectors/sid.rb +38 -38
- data/lib/bauxite/selectors/smart.rb +80 -80
- data/lib/bauxite/selectors/window.rb +77 -77
- data/test/alert.bxt +3 -3
- data/test/alert/page.html +4 -4
- data/test/alias.bxt +9 -9
- data/test/asserth.bxt +2 -2
- data/test/assertv.bxt +1 -1
- data/test/assertw.bxt +7 -7
- data/test/broken.bxt.manual +0 -0
- data/test/bug_load_path.bxt.manual +0 -0
- data/test/bug_load_path/broken.bxt.manual +0 -0
- data/test/bug_load_path/test.bxt +0 -0
- data/test/capture.bxt.manual +20 -20
- data/test/capture/my_test.bxt +1 -1
- data/test/capture/page.html +6 -6
- data/test/capture_on_error.bxt.manual +3 -3
- data/test/capture_on_error/my_test.bxt +1 -1
- data/test/capture_on_error/page.html +2 -2
- data/test/debug.bxt.manual +0 -0
- data/test/default_selector.bxt.manual +7 -7
- data/test/default_selector/page.html +10 -10
- data/test/default_selector_var.bxt +1 -1
- data/test/delay.bxt +2 -2
- data/test/delay/page.html +4 -4
- data/test/doif.bxt +6 -6
- data/test/dounless.bxt +6 -6
- data/test/exec.bxt +6 -6
- data/test/exit.bxt +3 -3
- data/test/exit/test.bxt +3 -3
- data/test/extension.bxt.manual +4 -4
- data/test/extension/custom.rb +12 -12
- data/test/extension/page.html +4 -4
- data/test/failif.bxt +7 -7
- data/test/failif/page.html +5 -5
- data/test/format.bxt +17 -17
- data/test/format/page.html +6 -6
- data/test/frame.bxt +6 -6
- data/test/frame/child_frame.html +6 -6
- data/test/frame/grandchild_frame.html +4 -4
- data/test/frame/page.html +4 -4
- data/test/js.bxt +4 -4
- data/test/json.bxt +19 -19
- data/test/json/array.json +3 -3
- data/test/json/object.json +13 -13
- data/test/load.bxt +18 -18
- data/test/load/child.bxt +12 -12
- data/test/parsers.bxt +1 -1
- data/test/parsers.csv +7 -7
- data/test/parsers.html +32 -32
- data/test/parsers/page.html +6 -6
- data/test/return.bxt +1 -1
- data/test/return/f1.bxt +1 -1
- data/test/return/f2.bxt +1 -1
- data/test/return/f3.bxt +1 -1
- data/test/return/f4.bxt +2 -2
- data/test/ruby.bxt +1 -1
- data/test/ruby/custom.rb +5 -5
- data/test/select.bxt +9 -9
- data/test/select/page.html +8 -8
- data/test/selectors.bxt +7 -7
- data/test/selectors/page.html +6 -6
- data/test/set_builtin.bxt +5 -0
- data/test/set_builtin/page.html +5 -0
- data/test/setif.bxt +3 -3
- data/test/smart_selector.bxt +17 -17
- data/test/smart_selector/page.html +17 -17
- data/test/stdin.bxt +0 -0
- data/test/submit.bxt +4 -4
- data/test/submit/page.html +6 -6
- data/test/submit/page2.html +4 -4
- data/test/test.bxt.manual +6 -6
- data/test/test/test1.bxt +2 -2
- data/test/test/test2.bxt +3 -3
- data/test/test/test3.bxt +2 -2
- data/test/test/test4.bxt +1 -1
- data/test/test/test5.bxt +1 -1
- data/test/window.bxt +14 -14
- data/test/window/page.html +5 -5
- data/test/window/popup.html +4 -4
- metadata +5 -3
data/doc/Bauxite/Errors.html
CHANGED
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>module Bauxite::Errors - RDoc Documentation</title>
|
8
8
|
|
9
|
-
<link href="../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
9
|
<script type="text/javascript">
|
13
10
|
var rdoc_rel_prefix = "../";
|
14
11
|
</script>
|
15
12
|
|
16
13
|
<script src="../js/jquery.js"></script>
|
17
|
-
<script src="../js/navigation.js"></script>
|
18
|
-
<script src="../js/search_index.js"></script>
|
19
|
-
<script src="../js/search.js"></script>
|
20
|
-
<script src="../js/searcher.js"></script>
|
21
14
|
<script src="../js/darkfish.js"></script>
|
22
15
|
|
16
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
23
20
|
|
24
21
|
<body id="top" role="document" class="module">
|
25
22
|
<nav role="navigation">
|
@@ -94,7 +91,7 @@
|
|
94
91
|
|
95
92
|
<footer id="validator-badges" role="contentinfo">
|
96
93
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
97
|
-
<p>Generated by <a href="http://
|
98
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
94
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
95
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
99
96
|
</footer>
|
100
97
|
|
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>class Bauxite::Errors::AssertionError - RDoc Documentation</title>
|
8
8
|
|
9
|
-
<link href="../../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
9
|
<script type="text/javascript">
|
13
10
|
var rdoc_rel_prefix = "../../";
|
14
11
|
</script>
|
15
12
|
|
16
13
|
<script src="../../js/jquery.js"></script>
|
17
|
-
<script src="../../js/navigation.js"></script>
|
18
|
-
<script src="../../js/search_index.js"></script>
|
19
|
-
<script src="../../js/search.js"></script>
|
20
|
-
<script src="../../js/searcher.js"></script>
|
21
14
|
<script src="../../js/darkfish.js"></script>
|
22
15
|
|
16
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
23
20
|
|
24
21
|
<body id="top" role="document" class="class">
|
25
22
|
<nav role="navigation">
|
@@ -101,7 +98,7 @@
|
|
101
98
|
|
102
99
|
<footer id="validator-badges" role="contentinfo">
|
103
100
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
104
|
-
<p>Generated by <a href="http://
|
105
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
101
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
102
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
106
103
|
</footer>
|
107
104
|
|
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>class Bauxite::Errors::FileNotFoundError - RDoc Documentation</title>
|
8
8
|
|
9
|
-
<link href="../../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
9
|
<script type="text/javascript">
|
13
10
|
var rdoc_rel_prefix = "../../";
|
14
11
|
</script>
|
15
12
|
|
16
13
|
<script src="../../js/jquery.js"></script>
|
17
|
-
<script src="../../js/navigation.js"></script>
|
18
|
-
<script src="../../js/search_index.js"></script>
|
19
|
-
<script src="../../js/search.js"></script>
|
20
|
-
<script src="../../js/searcher.js"></script>
|
21
14
|
<script src="../../js/darkfish.js"></script>
|
22
15
|
|
16
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
23
20
|
|
24
21
|
<body id="top" role="document" class="class">
|
25
22
|
<nav role="navigation">
|
@@ -101,7 +98,7 @@
|
|
101
98
|
|
102
99
|
<footer id="validator-badges" role="contentinfo">
|
103
100
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
104
|
-
<p>Generated by <a href="http://
|
105
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
101
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
102
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
106
103
|
</footer>
|
107
104
|
|
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>class Bauxite::Errors::FormatError - RDoc Documentation</title>
|
8
8
|
|
9
|
-
<link href="../../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
9
|
<script type="text/javascript">
|
13
10
|
var rdoc_rel_prefix = "../../";
|
14
11
|
</script>
|
15
12
|
|
16
13
|
<script src="../../js/jquery.js"></script>
|
17
|
-
<script src="../../js/navigation.js"></script>
|
18
|
-
<script src="../../js/search_index.js"></script>
|
19
|
-
<script src="../../js/search.js"></script>
|
20
|
-
<script src="../../js/searcher.js"></script>
|
21
14
|
<script src="../../js/darkfish.js"></script>
|
22
15
|
|
16
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
23
20
|
|
24
21
|
<body id="top" role="document" class="class">
|
25
22
|
<nav role="navigation">
|
@@ -101,7 +98,7 @@
|
|
101
98
|
|
102
99
|
<footer id="validator-badges" role="contentinfo">
|
103
100
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
104
|
-
<p>Generated by <a href="http://
|
105
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
101
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
102
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
106
103
|
</footer>
|
107
104
|
|
data/doc/Bauxite/Loggers.html
CHANGED
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>module Bauxite::Loggers - RDoc Documentation</title>
|
8
8
|
|
9
|
-
<link href="../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
9
|
<script type="text/javascript">
|
13
10
|
var rdoc_rel_prefix = "../";
|
14
11
|
</script>
|
15
12
|
|
16
13
|
<script src="../js/jquery.js"></script>
|
17
|
-
<script src="../js/navigation.js"></script>
|
18
|
-
<script src="../js/search_index.js"></script>
|
19
|
-
<script src="../js/search.js"></script>
|
20
|
-
<script src="../js/searcher.js"></script>
|
21
14
|
<script src="../js/darkfish.js"></script>
|
22
15
|
|
16
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
23
20
|
|
24
21
|
<body id="top" role="document" class="module">
|
25
22
|
<nav role="navigation">
|
@@ -97,7 +94,7 @@ module.</p>
|
|
97
94
|
|
98
95
|
<footer id="validator-badges" role="contentinfo">
|
99
96
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
100
|
-
<p>Generated by <a href="http://
|
101
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
97
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
98
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
102
99
|
</footer>
|
103
100
|
|
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>class Bauxite::Loggers::CompositeLogger - RDoc Documentation</title>
|
8
8
|
|
9
|
-
<link href="../../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
9
|
<script type="text/javascript">
|
13
10
|
var rdoc_rel_prefix = "../../";
|
14
11
|
</script>
|
15
12
|
|
16
13
|
<script src="../../js/jquery.js"></script>
|
17
|
-
<script src="../../js/navigation.js"></script>
|
18
|
-
<script src="../../js/search_index.js"></script>
|
19
|
-
<script src="../../js/search.js"></script>
|
20
|
-
<script src="../../js/searcher.js"></script>
|
21
14
|
<script src="../../js/darkfish.js"></script>
|
22
15
|
|
16
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
23
20
|
|
24
21
|
<body id="top" role="document" class="class">
|
25
22
|
<nav role="navigation">
|
@@ -149,19 +146,19 @@
|
|
149
146
|
|
150
147
|
<div class="method-source-code" id="new-source">
|
151
148
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/composite.rb, line 33</span>
|
152
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">loggers</span> = <span class="ruby-keyword">nil</span>)
|
153
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">loggers</span>
|
154
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:loggers</span>]
|
155
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">"Missing required logger option 'loggers'. "</span><span class="ruby-operator">+</span>
|
156
|
-
<span class="ruby-string">"The value of this option is a comma-separated list of valid loggers. "</span><span class="ruby-operator">+</span>
|
157
|
-
<span class="ruby-string">"For example loggers=xterm,file."</span>
|
158
|
-
<span class="ruby-keyword">end</span>
|
159
|
-
<span class="ruby-identifier">loggers</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:loggers</span>].<span class="ruby-identifier">split</span>(<span class="ruby-string">','</span>)
|
160
|
-
<span class="ruby-keyword">end</span>
|
161
|
-
|
162
|
-
<span class="ruby-ivar">@loggers</span> = <span class="ruby-identifier">loggers</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
|
163
|
-
<span class="ruby-constant">Bauxite</span><span class="ruby-operator">::</span><span class="ruby-constant">Context</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_logger</span>(<span class="ruby-identifier">l</span>, <span class="ruby-identifier">options</span>)
|
164
|
-
<span class="ruby-keyword">end</span>
|
149
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">loggers</span> = <span class="ruby-keyword">nil</span>)
|
150
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">loggers</span>
|
151
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:loggers</span>]
|
152
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">"Missing required logger option 'loggers'. "</span><span class="ruby-operator">+</span>
|
153
|
+
<span class="ruby-string">"The value of this option is a comma-separated list of valid loggers. "</span><span class="ruby-operator">+</span>
|
154
|
+
<span class="ruby-string">"For example loggers=xterm,file."</span>
|
155
|
+
<span class="ruby-keyword">end</span>
|
156
|
+
<span class="ruby-identifier">loggers</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:loggers</span>].<span class="ruby-identifier">split</span>(<span class="ruby-string">','</span>)
|
157
|
+
<span class="ruby-keyword">end</span>
|
158
|
+
|
159
|
+
<span class="ruby-ivar">@loggers</span> = <span class="ruby-identifier">loggers</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
|
160
|
+
<span class="ruby-constant">Bauxite</span><span class="ruby-operator">::</span><span class="ruby-constant">Context</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_logger</span>(<span class="ruby-identifier">l</span>, <span class="ruby-identifier">options</span>)
|
161
|
+
<span class="ruby-keyword">end</span>
|
165
162
|
<span class="ruby-keyword">end</span></pre>
|
166
163
|
</div>
|
167
164
|
|
@@ -205,8 +202,8 @@ first logger.</p>
|
|
205
202
|
|
206
203
|
<div class="method-source-code" id="debug_prompt-source">
|
207
204
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/composite.rb, line 62</span>
|
208
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">debug_prompt</span>
|
209
|
-
<span class="ruby-ivar">@loggers</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">debug_prompt</span>
|
205
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">debug_prompt</span>
|
206
|
+
<span class="ruby-ivar">@loggers</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">debug_prompt</span>
|
210
207
|
<span class="ruby-keyword">end</span></pre>
|
211
208
|
</div>
|
212
209
|
|
@@ -238,8 +235,8 @@ first logger.</p>
|
|
238
235
|
|
239
236
|
<div class="method-source-code" id="finalize-source">
|
240
237
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/composite.rb, line 81</span>
|
241
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>)
|
242
|
-
<span class="ruby-ivar">@loggers</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>) }
|
238
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>)
|
239
|
+
<span class="ruby-ivar">@loggers</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>) }
|
243
240
|
<span class="ruby-keyword">end</span></pre>
|
244
241
|
</div>
|
245
242
|
|
@@ -273,8 +270,8 @@ first logger.</p>
|
|
273
270
|
|
274
271
|
<div class="method-source-code" id="log-source">
|
275
272
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/composite.rb, line 75</span>
|
276
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">type</span> = <span class="ruby-value">:info</span>)
|
277
|
-
<span class="ruby-ivar">@loggers</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">type</span>) }
|
273
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">type</span> = <span class="ruby-value">:info</span>)
|
274
|
+
<span class="ruby-ivar">@loggers</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">type</span>) }
|
278
275
|
<span class="ruby-keyword">end</span></pre>
|
279
276
|
</div>
|
280
277
|
|
@@ -310,8 +307,8 @@ first logger.</p>
|
|
310
307
|
|
311
308
|
<div class="method-source-code" id="log_cmd-source">
|
312
309
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/composite.rb, line 54</span>
|
313
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
314
|
-
<span class="ruby-identifier">_log_cmd_block</span>(<span class="ruby-ivar">@loggers</span>, <span class="ruby-identifier">action</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
310
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
311
|
+
<span class="ruby-identifier">_log_cmd_block</span>(<span class="ruby-ivar">@loggers</span>, <span class="ruby-identifier">action</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
315
312
|
<span class="ruby-keyword">end</span></pre>
|
316
313
|
</div>
|
317
314
|
|
@@ -343,8 +340,8 @@ first logger.</p>
|
|
343
340
|
|
344
341
|
<div class="method-source-code" id="progress-source">
|
345
342
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/composite.rb, line 67</span>
|
346
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">progress</span>(<span class="ruby-identifier">value</span>)
|
347
|
-
<span class="ruby-ivar">@loggers</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">progress</span>(<span class="ruby-identifier">value</span>) }
|
343
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">progress</span>(<span class="ruby-identifier">value</span>)
|
344
|
+
<span class="ruby-ivar">@loggers</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">progress</span>(<span class="ruby-identifier">value</span>) }
|
348
345
|
<span class="ruby-keyword">end</span></pre>
|
349
346
|
</div>
|
350
347
|
|
@@ -364,7 +361,7 @@ first logger.</p>
|
|
364
361
|
|
365
362
|
<footer id="validator-badges" role="contentinfo">
|
366
363
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
367
|
-
<p>Generated by <a href="http://
|
368
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
364
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
365
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
369
366
|
</footer>
|
370
367
|
|
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>class Bauxite::Loggers::EchoLogger - RDoc Documentation</title>
|
8
8
|
|
9
|
-
<link href="../../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
9
|
<script type="text/javascript">
|
13
10
|
var rdoc_rel_prefix = "../../";
|
14
11
|
</script>
|
15
12
|
|
16
13
|
<script src="../../js/jquery.js"></script>
|
17
|
-
<script src="../../js/navigation.js"></script>
|
18
|
-
<script src="../../js/search_index.js"></script>
|
19
|
-
<script src="../../js/search.js"></script>
|
20
|
-
<script src="../../js/searcher.js"></script>
|
21
14
|
<script src="../../js/darkfish.js"></script>
|
22
15
|
|
16
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
23
20
|
|
24
21
|
<body id="top" role="document" class="class">
|
25
22
|
<nav role="navigation">
|
@@ -136,10 +133,10 @@ action succeeded, failed or was skipped).</p>
|
|
136
133
|
|
137
134
|
<div class="method-source-code" id="log_cmd-source">
|
138
135
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/echo.rb, line 32</span>
|
139
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>)
|
140
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">text</span>
|
141
|
-
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
142
|
-
<span class="ruby-keyword">yield</span>
|
136
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>)
|
137
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">text</span>
|
138
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
139
|
+
<span class="ruby-keyword">yield</span>
|
143
140
|
<span class="ruby-keyword">end</span></pre>
|
144
141
|
</div>
|
145
142
|
|
@@ -159,7 +156,7 @@ action succeeded, failed or was skipped).</p>
|
|
159
156
|
|
160
157
|
<footer id="validator-badges" role="contentinfo">
|
161
158
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
162
|
-
<p>Generated by <a href="http://
|
163
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
159
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
160
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
164
161
|
</footer>
|
165
162
|
|
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>class Bauxite::Loggers::FileLogger - RDoc Documentation</title>
|
8
8
|
|
9
|
-
<link href="../../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
9
|
<script type="text/javascript">
|
13
10
|
var rdoc_rel_prefix = "../../";
|
14
11
|
</script>
|
15
12
|
|
16
13
|
<script src="../../js/jquery.js"></script>
|
17
|
-
<script src="../../js/navigation.js"></script>
|
18
|
-
<script src="../../js/search_index.js"></script>
|
19
|
-
<script src="../../js/search.js"></script>
|
20
|
-
<script src="../../js/searcher.js"></script>
|
21
14
|
<script src="../../js/darkfish.js"></script>
|
22
15
|
|
16
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
23
20
|
|
24
21
|
<body id="top" role="document" class="class">
|
25
22
|
<nav role="navigation">
|
@@ -154,14 +151,14 @@ file specified in the <code>file</code> logger option.</p>
|
|
154
151
|
|
155
152
|
<div class="method-source-code" id="new-source">
|
156
153
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/file.rb, line 36</span>
|
157
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
158
|
-
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">options</span>)
|
159
|
-
<span class="ruby-ivar">@file</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:file</span>]
|
160
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-ivar">@file</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@file</span> <span class="ruby-operator">!=</span> <span class="ruby-string">''</span>
|
161
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">"FileLogger configuration error: Undefined 'file' option."</span>
|
162
|
-
<span class="ruby-keyword">end</span>
|
163
|
-
<span class="ruby-ivar">@verbose</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:verbose</span>]
|
164
|
-
<span class="ruby-ivar">@lines</span> = []
|
154
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
155
|
+
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">options</span>)
|
156
|
+
<span class="ruby-ivar">@file</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:file</span>]
|
157
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-ivar">@file</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@file</span> <span class="ruby-operator">!=</span> <span class="ruby-string">''</span>
|
158
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">"FileLogger configuration error: Undefined 'file' option."</span>
|
159
|
+
<span class="ruby-keyword">end</span>
|
160
|
+
<span class="ruby-ivar">@verbose</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:verbose</span>]
|
161
|
+
<span class="ruby-ivar">@lines</span> = []
|
165
162
|
<span class="ruby-keyword">end</span></pre>
|
166
163
|
</div>
|
167
164
|
|
@@ -201,8 +198,8 @@ file specified in the <code>file</code> logger option.</p>
|
|
201
198
|
|
202
199
|
<div class="method-source-code" id="finalize-source">
|
203
200
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/file.rb, line 47</span>
|
204
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>)
|
205
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">output_path</span>(<span class="ruby-ivar">@file</span>), <span class="ruby-string">'w'</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-ivar">@lines</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">"\n"</span>)) }
|
201
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>)
|
202
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">output_path</span>(<span class="ruby-ivar">@file</span>), <span class="ruby-string">'w'</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-ivar">@lines</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">"\n"</span>)) }
|
206
203
|
<span class="ruby-keyword">end</span></pre>
|
207
204
|
</div>
|
208
205
|
|
@@ -242,12 +239,12 @@ file specified in the <code>file</code> logger option.</p>
|
|
242
239
|
|
243
240
|
<div class="method-source-code" id="log-source">
|
244
241
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/file.rb, line 62</span>
|
245
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">type</span> = <span class="ruby-value">:info</span>)
|
246
|
-
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@verbose</span>
|
247
|
-
<span class="ruby-ivar">@lines</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span>
|
248
|
-
<span class="ruby-keyword">else</span>
|
249
|
-
<span class="ruby-keyword">super</span>
|
250
|
-
<span class="ruby-keyword">end</span>
|
242
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">type</span> = <span class="ruby-value">:info</span>)
|
243
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@verbose</span>
|
244
|
+
<span class="ruby-ivar">@lines</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span>
|
245
|
+
<span class="ruby-keyword">else</span>
|
246
|
+
<span class="ruby-keyword">super</span>
|
247
|
+
<span class="ruby-keyword">end</span>
|
251
248
|
<span class="ruby-keyword">end</span></pre>
|
252
249
|
</div>
|
253
250
|
|
@@ -279,9 +276,9 @@ file specified in the <code>file</code> logger option.</p>
|
|
279
276
|
|
280
277
|
<div class="method-source-code" id="log_cmd-source">
|
281
278
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/file.rb, line 52</span>
|
282
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>)
|
283
|
-
<span class="ruby-ivar">@lines</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">text</span>
|
284
|
-
<span class="ruby-keyword">yield</span>
|
279
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>)
|
280
|
+
<span class="ruby-ivar">@lines</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">text</span>
|
281
|
+
<span class="ruby-keyword">yield</span>
|
285
282
|
<span class="ruby-keyword">end</span></pre>
|
286
283
|
</div>
|
287
284
|
|
@@ -301,7 +298,7 @@ file specified in the <code>file</code> logger option.</p>
|
|
301
298
|
|
302
299
|
<footer id="validator-badges" role="contentinfo">
|
303
300
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
304
|
-
<p>Generated by <a href="http://
|
305
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
301
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
302
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
306
303
|
</footer>
|
307
304
|
|
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>class Bauxite::Loggers::HtmlLogger - RDoc Documentation</title>
|
8
8
|
|
9
|
-
<link href="../../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
9
|
<script type="text/javascript">
|
13
10
|
var rdoc_rel_prefix = "../../";
|
14
11
|
</script>
|
15
12
|
|
16
13
|
<script src="../../js/jquery.js"></script>
|
17
|
-
<script src="../../js/navigation.js"></script>
|
18
|
-
<script src="../../js/search_index.js"></script>
|
19
|
-
<script src="../../js/search.js"></script>
|
20
|
-
<script src="../../js/searcher.js"></script>
|
21
14
|
<script src="../../js/darkfish.js"></script>
|
22
15
|
|
16
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
23
20
|
|
24
21
|
<body id="top" role="document" class="class">
|
25
22
|
<nav role="navigation">
|
@@ -98,7 +95,7 @@ captures taken, if any.</p>
|
|
98
95
|
<p>Html logger options include:</p>
|
99
96
|
<dl class="rdoc-list label-list"><dt><code>html</code>
|
100
97
|
<dd>
|
101
|
-
<p>Name of the outpus HTML report file. If not present, defaults
|
98
|
+
<p>Name of the outpus HTML report file. If not present, defaults to
|
102
99
|
“test.html”.</p>
|
103
100
|
</dd><dt><code>html_package</code>
|
104
101
|
<dd>
|
@@ -153,10 +150,10 @@ the filesystem.</p>
|
|
153
150
|
|
154
151
|
<div class="method-source-code" id="new-source">
|
155
152
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/html.rb, line 42</span>
|
156
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
157
|
-
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">options</span>)
|
158
|
-
<span class="ruby-ivar">@file</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:html</span>] <span class="ruby-operator">||</span> <span class="ruby-string">'test.html'</span>
|
159
|
-
<span class="ruby-ivar">@imgs</span> = []
|
153
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
154
|
+
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">options</span>)
|
155
|
+
<span class="ruby-ivar">@file</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:html</span>] <span class="ruby-operator">||</span> <span class="ruby-string">'test.html'</span>
|
156
|
+
<span class="ruby-ivar">@imgs</span> = []
|
160
157
|
<span class="ruby-keyword">end</span></pre>
|
161
158
|
</div>
|
162
159
|
|
@@ -196,94 +193,94 @@ the filesystem.</p>
|
|
196
193
|
|
197
194
|
<div class="method-source-code" id="finalize-source">
|
198
195
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/html.rb, line 50</span>
|
199
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>)
|
200
|
-
<span class="ruby-identifier">output</span> = <span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">variables</span>[<span class="ruby-string">'__OUTPUT__'</span>] <span class="ruby-operator">||</span> <span class="ruby-string">''</span>
|
201
|
-
|
202
|
-
<span class="ruby-identifier">html</span> = <span class="ruby-node">"<!DOCTYPE html>
|
203
|
-
<html>
|
204
|
-
<head>
|
205
|
-
<style type='text/css'>
|
206
|
-
body { font: 10pt sans-serif; }
|
207
|
-
.action div { display: inline-block; }
|
208
|
-
.cmd { width: 100px }
|
209
|
-
.status { float: right; text-align: center; }
|
210
|
-
.status .text { width: 100px; font-weight: bold }
|
211
|
-
.test { background-color: #DFDFFF; margin-top: 20px }
|
212
|
-
.ok .status .text { background-color: #DFFFDF }
|
213
|
-
.error .status .text { background-color: #FFDFDF }
|
214
|
-
.skip .status .text { background-color: #FFDFFF }
|
215
|
-
.capture { border: 1px solid black }
|
216
|
-
.capture img { max-width: 100% }
|
217
|
-
.odd { background-color: #EEEEEE }
|
218
|
-
.summary th { background-color: #DFDFFF; text-align: left }
|
219
|
-
.summary td { cursor: pointer; }
|
220
|
-
.top { position: absolute; top: 0px; right: 0px; background-color: #DFDFFF; padding: 5px; border-radius: 0px 0px 0px 5px; }
|
221
|
-
|
222
|
-
</style>
|
223
|
-
<script type='text/javascript'>
|
224
|
-
function show(target) {
|
225
|
-
var e = document.getElementById(target+'_content');
|
226
|
-
window.location.href = '#'+target;
|
227
|
-
}
|
228
|
-
</script>
|
229
|
-
</head>
|
230
|
-
<body>"</span>
|
231
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-node">"<div class='top'>Created using <a href='https://github.com/pzavolinsky/bauxite'>bauxite</a> on #{Time.new}</div>"</span>)
|
232
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">tests</span>.<span class="ruby-identifier">any?</span>
|
233
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-string">"<h1>Test Summary</h1>"</span>)
|
234
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-string">"<table class='summary'>"</span>)
|
235
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-string">"<tr><th>Name</th><th>Time</th><th>Status</th><th>Error</th></tr>"</span>)
|
236
|
-
|
237
|
-
<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">tests</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span>,<span class="ruby-identifier">idx</span><span class="ruby-operator">|</span>
|
238
|
-
<span class="ruby-identifier">error</span> = <span class="ruby-identifier">t</span>[<span class="ruby-value">:error</span>]
|
239
|
-
<span class="ruby-identifier">error</span> = <span class="ruby-identifier">error</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">error</span>.<span class="ruby-identifier">message</span> <span class="ruby-operator">:</span> <span class="ruby-string">''</span>
|
240
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-node">"<tr class='#{t[:status].downcase} #{(idx % 2) == 1 ? 'odd' : 'even'}' onclick='show(\"#{t[:name]}\")'>"</span>)
|
241
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">4</span>, <span class="ruby-node">"<td>#{t[:name]}</td><td>#{t[:time].round(2)}</td><td class='status'>#{t[:status]}</td><td>#{error}</td>"</span>)
|
242
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-string">"</tr>"</span>)
|
243
|
-
<span class="ruby-keyword">end</span>
|
244
|
-
|
245
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-string">"</table>"</span>)
|
246
|
-
<span class="ruby-keyword">end</span>
|
247
|
-
|
248
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-string">"<h1>Test Details</h1>"</span>)
|
249
|
-
<span class="ruby-ivar">@data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">test</span><span class="ruby-operator">|</span>
|
250
|
-
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">test</span>[<span class="ruby-value">:name</span>]
|
251
|
-
<span class="ruby-identifier">status</span> = <span class="ruby-identifier">test</span>[<span class="ruby-value">:actions</span>].<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>[<span class="ruby-value">:status</span>] <span class="ruby-operator">==</span> <span class="ruby-value">:error</span> } <span class="ruby-operator">?</span> <span class="ruby-value">:error</span> <span class="ruby-operator">:</span> <span class="ruby-value">:ok</span>
|
252
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-node">"<a name='#{name}'></a>"</span>)
|
253
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-node">"<div class='test #{status}'>#{name}<div class='status'><div class='text'>#{status.upcase}</div></div></div>"</span>)
|
254
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-node">"<div id='#{name}_content' class='test-content'>"</span>)
|
255
|
-
|
256
|
-
<span class="ruby-identifier">test</span>[<span class="ruby-value">:actions</span>].<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">action</span>,<span class="ruby-identifier">idx</span><span class="ruby-operator">|</span>
|
257
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-node">"<div class='action #{action[:status]} #{(idx % 2) == 1 ? 'odd' : 'even'}'>"</span>)
|
258
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">4</span>, <span class="ruby-node">"<div class='cmd'>#{action[:cmd]}</div>"</span>)
|
259
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">4</span>, <span class="ruby-node">"<div class='args'>#{action[:args].join(' ')}</div>"</span>)
|
260
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">4</span>, <span class="ruby-string">"<div class='status'>"</span>)
|
261
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">5</span>, <span class="ruby-node">"<div class='time'>(#{action[:time].round(2).to_s}s)</div>"</span>)
|
262
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">5</span>, <span class="ruby-node">"<div class='text'>#{action[:status].upcase}</div>"</span>)
|
263
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">4</span>, <span class="ruby-string">"</div>"</span>)
|
264
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-string">"</div>"</span>)
|
265
|
-
<span class="ruby-identifier">capture</span> = <span class="ruby-identifier">action</span>[<span class="ruby-value">:capture</span>]
|
266
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">capture</span>
|
267
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-node">"<div class='capture'>#{_img(output, capture)}</div>"</span>)
|
268
|
-
<span class="ruby-keyword">end</span>
|
269
|
-
<span class="ruby-keyword">end</span>
|
270
|
-
|
271
|
-
<span class="ruby-identifier">item</span> = <span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">tests</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>[<span class="ruby-value">:name</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span> }
|
272
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">item</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">item</span>[<span class="ruby-value">:error</span>]
|
273
|
-
<span class="ruby-identifier">capture</span> = <span class="ruby-identifier">item</span>[<span class="ruby-value">:error</span>].<span class="ruby-identifier">variables</span>[<span class="ruby-string">'__CAPTURE__'</span>]
|
274
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">capture</span>
|
275
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-node">"<div class='capture'>#{_img(output, capture)}</div>"</span>)
|
276
|
-
<span class="ruby-keyword">end</span>
|
277
|
-
<span class="ruby-keyword">end</span>
|
278
|
-
|
279
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-string">"</div>"</span>)
|
280
|
-
<span class="ruby-keyword">end</span>
|
281
|
-
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"
|
282
|
-
</body>
|
283
|
-
</html>"</span>
|
284
|
-
<span class="ruby-identifier">file</span> = <span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">output_path</span>(<span class="ruby-ivar">@file</span>)
|
285
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>, <span class="ruby-string">'w'</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span> <span class="ruby-identifier">html</span> }
|
286
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@imgs</span>) <span class="ruby-keyword">if</span> <span class="ruby-ivar">@imgs</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
196
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>)
|
197
|
+
<span class="ruby-identifier">output</span> = <span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">variables</span>[<span class="ruby-string">'__OUTPUT__'</span>] <span class="ruby-operator">||</span> <span class="ruby-string">''</span>
|
198
|
+
|
199
|
+
<span class="ruby-identifier">html</span> = <span class="ruby-node">"<!DOCTYPE html>
|
200
|
+
<html>
|
201
|
+
<head>
|
202
|
+
<style type='text/css'>
|
203
|
+
body { font: 10pt sans-serif; }
|
204
|
+
.action div { display: inline-block; }
|
205
|
+
.cmd { width: 100px }
|
206
|
+
.status { float: right; text-align: center; }
|
207
|
+
.status .text { width: 100px; font-weight: bold }
|
208
|
+
.test { background-color: #DFDFFF; margin-top: 20px }
|
209
|
+
.ok .status .text { background-color: #DFFFDF }
|
210
|
+
.error .status .text { background-color: #FFDFDF }
|
211
|
+
.skip .status .text { background-color: #FFDFFF }
|
212
|
+
.capture { border: 1px solid black }
|
213
|
+
.capture img { max-width: 100% }
|
214
|
+
.odd { background-color: #EEEEEE }
|
215
|
+
.summary th { background-color: #DFDFFF; text-align: left }
|
216
|
+
.summary td { cursor: pointer; }
|
217
|
+
.top { position: absolute; top: 0px; right: 0px; background-color: #DFDFFF; padding: 5px; border-radius: 0px 0px 0px 5px; }
|
218
|
+
|
219
|
+
</style>
|
220
|
+
<script type='text/javascript'>
|
221
|
+
function show(target) {
|
222
|
+
var e = document.getElementById(target+'_content');
|
223
|
+
window.location.href = '#'+target;
|
224
|
+
}
|
225
|
+
</script>
|
226
|
+
</head>
|
227
|
+
<body>"</span>
|
228
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-node">"<div class='top'>Created using <a href='https://github.com/pzavolinsky/bauxite'>bauxite</a> on #{Time.new}</div>"</span>)
|
229
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">tests</span>.<span class="ruby-identifier">any?</span>
|
230
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-string">"<h1>Test Summary</h1>"</span>)
|
231
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-string">"<table class='summary'>"</span>)
|
232
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-string">"<tr><th>Name</th><th>Time</th><th>Status</th><th>Error</th></tr>"</span>)
|
233
|
+
|
234
|
+
<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">tests</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span>,<span class="ruby-identifier">idx</span><span class="ruby-operator">|</span>
|
235
|
+
<span class="ruby-identifier">error</span> = <span class="ruby-identifier">t</span>[<span class="ruby-value">:error</span>]
|
236
|
+
<span class="ruby-identifier">error</span> = <span class="ruby-identifier">error</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">error</span>.<span class="ruby-identifier">message</span> <span class="ruby-operator">:</span> <span class="ruby-string">''</span>
|
237
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-node">"<tr class='#{t[:status].downcase} #{(idx % 2) == 1 ? 'odd' : 'even'}' onclick='show(\"#{t[:name]}\")'>"</span>)
|
238
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">4</span>, <span class="ruby-node">"<td>#{t[:name]}</td><td>#{t[:time].round(2)}</td><td class='status'>#{t[:status]}</td><td>#{error}</td>"</span>)
|
239
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-string">"</tr>"</span>)
|
240
|
+
<span class="ruby-keyword">end</span>
|
241
|
+
|
242
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-string">"</table>"</span>)
|
243
|
+
<span class="ruby-keyword">end</span>
|
244
|
+
|
245
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-string">"<h1>Test Details</h1>"</span>)
|
246
|
+
<span class="ruby-ivar">@data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">test</span><span class="ruby-operator">|</span>
|
247
|
+
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">test</span>[<span class="ruby-value">:name</span>]
|
248
|
+
<span class="ruby-identifier">status</span> = <span class="ruby-identifier">test</span>[<span class="ruby-value">:actions</span>].<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>[<span class="ruby-value">:status</span>] <span class="ruby-operator">==</span> <span class="ruby-value">:error</span> } <span class="ruby-operator">?</span> <span class="ruby-value">:error</span> <span class="ruby-operator">:</span> <span class="ruby-value">:ok</span>
|
249
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-node">"<a name='#{name}'></a>"</span>)
|
250
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-node">"<div class='test #{status}'>#{name}<div class='status'><div class='text'>#{status.upcase}</div></div></div>"</span>)
|
251
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-node">"<div id='#{name}_content' class='test-content'>"</span>)
|
252
|
+
|
253
|
+
<span class="ruby-identifier">test</span>[<span class="ruby-value">:actions</span>].<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">action</span>,<span class="ruby-identifier">idx</span><span class="ruby-operator">|</span>
|
254
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-node">"<div class='action #{action[:status]} #{(idx % 2) == 1 ? 'odd' : 'even'}'>"</span>)
|
255
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">4</span>, <span class="ruby-node">"<div class='cmd'>#{action[:cmd]}</div>"</span>)
|
256
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">4</span>, <span class="ruby-node">"<div class='args'>#{action[:args].join(' ')}</div>"</span>)
|
257
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">4</span>, <span class="ruby-string">"<div class='status'>"</span>)
|
258
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">5</span>, <span class="ruby-node">"<div class='time'>(#{action[:time].round(2).to_s}s)</div>"</span>)
|
259
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">5</span>, <span class="ruby-node">"<div class='text'>#{action[:status].upcase}</div>"</span>)
|
260
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">4</span>, <span class="ruby-string">"</div>"</span>)
|
261
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-string">"</div>"</span>)
|
262
|
+
<span class="ruby-identifier">capture</span> = <span class="ruby-identifier">action</span>[<span class="ruby-value">:capture</span>]
|
263
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">capture</span>
|
264
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-node">"<div class='capture'>#{_img(output, capture)}</div>"</span>)
|
265
|
+
<span class="ruby-keyword">end</span>
|
266
|
+
<span class="ruby-keyword">end</span>
|
267
|
+
|
268
|
+
<span class="ruby-identifier">item</span> = <span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">tests</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>[<span class="ruby-value">:name</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span> }
|
269
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">item</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">item</span>[<span class="ruby-value">:error</span>]
|
270
|
+
<span class="ruby-identifier">capture</span> = <span class="ruby-identifier">item</span>[<span class="ruby-value">:error</span>].<span class="ruby-identifier">variables</span>[<span class="ruby-string">'__CAPTURE__'</span>]
|
271
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">capture</span>
|
272
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">3</span>, <span class="ruby-node">"<div class='capture'>#{_img(output, capture)}</div>"</span>)
|
273
|
+
<span class="ruby-keyword">end</span>
|
274
|
+
<span class="ruby-keyword">end</span>
|
275
|
+
|
276
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">_d</span>(<span class="ruby-value">2</span>, <span class="ruby-string">"</div>"</span>)
|
277
|
+
<span class="ruby-keyword">end</span>
|
278
|
+
<span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"
|
279
|
+
</body>
|
280
|
+
</html>"</span>
|
281
|
+
<span class="ruby-identifier">file</span> = <span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">output_path</span>(<span class="ruby-ivar">@file</span>)
|
282
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>, <span class="ruby-string">'w'</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span> <span class="ruby-identifier">html</span> }
|
283
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@imgs</span>) <span class="ruby-keyword">if</span> <span class="ruby-ivar">@imgs</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
287
284
|
<span class="ruby-keyword">end</span></pre>
|
288
285
|
</div>
|
289
286
|
|
@@ -303,7 +300,7 @@ the filesystem.</p>
|
|
303
300
|
|
304
301
|
<footer id="validator-badges" role="contentinfo">
|
305
302
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
306
|
-
<p>Generated by <a href="http://
|
307
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
303
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
304
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
308
305
|
</footer>
|
309
306
|
|