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
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>class Bauxite::Loggers::NullLogger - 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">
|
@@ -150,8 +147,8 @@ convention, custom loggers are defined in the 'loggers/' directory.</p>
|
|
150
147
|
|
151
148
|
<div class="method-source-code" id="new-source">
|
152
149
|
<pre><span class="ruby-comment"># File lib/bauxite/core/logger.rb, line 44</span>
|
153
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
154
|
-
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
|
150
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
151
|
+
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
|
155
152
|
<span class="ruby-keyword">end</span></pre>
|
156
153
|
</div>
|
157
154
|
|
@@ -198,8 +195,8 @@ href="../Context.html#method-i-debug">Bauxite::Context#debug</a>).</p>
|
|
198
195
|
|
199
196
|
<div class="method-source-code" id="debug_prompt-source">
|
200
197
|
<pre><span class="ruby-comment"># File lib/bauxite/core/logger.rb, line 68</span>
|
201
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">debug_prompt</span>
|
202
|
-
<span class="ruby-string">'debug> '</span>
|
198
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">debug_prompt</span>
|
199
|
+
<span class="ruby-string">'debug> '</span>
|
203
200
|
<span class="ruby-keyword">end</span></pre>
|
204
201
|
</div>
|
205
202
|
|
@@ -231,7 +228,7 @@ href="../Context.html#method-i-debug">Bauxite::Context#debug</a>).</p>
|
|
231
228
|
|
232
229
|
<div class="method-source-code" id="finalize-source">
|
233
230
|
<pre><span class="ruby-comment"># File lib/bauxite/core/logger.rb, line 87</span>
|
234
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>)
|
231
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>)
|
235
232
|
<span class="ruby-keyword">end</span></pre>
|
236
233
|
</div>
|
237
234
|
|
@@ -266,8 +263,8 @@ href="../Context.html#method-i-debug">Bauxite::Context#debug</a>).</p>
|
|
266
263
|
|
267
264
|
<div class="method-source-code" id="log-source">
|
268
265
|
<pre><span class="ruby-comment"># File lib/bauxite/core/logger.rb, line 81</span>
|
269
|
-
<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>)
|
270
|
-
<span class="ruby-identifier">print</span> <span class="ruby-identifier">s</span>
|
266
|
+
<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>)
|
267
|
+
<span class="ruby-identifier">print</span> <span class="ruby-identifier">s</span>
|
271
268
|
<span class="ruby-keyword">end</span></pre>
|
272
269
|
</div>
|
273
270
|
|
@@ -309,8 +306,8 @@ href="../Context.html#method-i-debug">Bauxite::Context#debug</a>).</p>
|
|
309
306
|
|
310
307
|
<div class="method-source-code" id="log_cmd-source">
|
311
308
|
<pre><span class="ruby-comment"># File lib/bauxite/core/logger.rb, line 59</span>
|
312
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>)
|
313
|
-
<span class="ruby-keyword">yield</span>
|
309
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>)
|
310
|
+
<span class="ruby-keyword">yield</span>
|
314
311
|
<span class="ruby-keyword">end</span></pre>
|
315
312
|
</div>
|
316
313
|
|
@@ -342,7 +339,7 @@ href="../Context.html#method-i-debug">Bauxite::Context#debug</a>).</p>
|
|
342
339
|
|
343
340
|
<div class="method-source-code" id="progress-source">
|
344
341
|
<pre><span class="ruby-comment"># File lib/bauxite/core/logger.rb, line 73</span>
|
345
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">progress</span>(<span class="ruby-identifier">value</span>)
|
342
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">progress</span>(<span class="ruby-identifier">value</span>)
|
346
343
|
<span class="ruby-keyword">end</span></pre>
|
347
344
|
</div>
|
348
345
|
|
@@ -362,7 +359,7 @@ href="../Context.html#method-i-debug">Bauxite::Context#debug</a>).</p>
|
|
362
359
|
|
363
360
|
<footer id="validator-badges" role="contentinfo">
|
364
361
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
365
|
-
<p>Generated by <a href="http://
|
366
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
362
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
363
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
367
364
|
</footer>
|
368
365
|
|
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>class Bauxite::Loggers::ReportLogger - 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">
|
@@ -173,9 +170,9 @@ implementation see the <a href="HtmlLogger.html">HtmlLogger</a> class.</p>
|
|
173
170
|
|
174
171
|
<div class="method-source-code" id="new-source">
|
175
172
|
<pre><span class="ruby-comment"># File lib/bauxite/core/logger.rb, line 116</span>
|
176
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
177
|
-
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">options</span>)
|
178
|
-
<span class="ruby-ivar">@data</span> = []
|
173
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
174
|
+
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">options</span>)
|
175
|
+
<span class="ruby-ivar">@data</span> = []
|
179
176
|
<span class="ruby-keyword">end</span></pre>
|
180
177
|
</div>
|
181
178
|
|
@@ -215,7 +212,7 @@ implementation see the <a href="HtmlLogger.html">HtmlLogger</a> class.</p>
|
|
215
212
|
|
216
213
|
<div class="method-source-code" id="finalize-source">
|
217
214
|
<pre><span class="ruby-comment"># File lib/bauxite/core/logger.rb, line 166</span>
|
218
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>)
|
215
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">ctx</span>)
|
219
216
|
<span class="ruby-keyword">end</span></pre>
|
220
217
|
</div>
|
221
218
|
|
@@ -250,7 +247,7 @@ implementation see the <a href="HtmlLogger.html">HtmlLogger</a> class.</p>
|
|
250
247
|
|
251
248
|
<div class="method-source-code" id="log-source">
|
252
249
|
<pre><span class="ruby-comment"># File lib/bauxite/core/logger.rb, line 126</span>
|
253
|
-
<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>)
|
250
|
+
<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>)
|
254
251
|
<span class="ruby-keyword">end</span></pre>
|
255
252
|
</div>
|
256
253
|
|
@@ -282,38 +279,38 @@ implementation see the <a href="HtmlLogger.html">HtmlLogger</a> class.</p>
|
|
282
279
|
|
283
280
|
<div class="method-source-code" id="log_cmd-source">
|
284
281
|
<pre><span class="ruby-comment"># File lib/bauxite/core/logger.rb, line 130</span>
|
285
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>)
|
286
|
-
<span class="ruby-identifier">stime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
|
287
|
-
<span class="ruby-identifier">ret</span> = <span class="ruby-keyword">yield</span> <span class="ruby-operator">||</span> <span class="ruby-keyword">false</span>
|
288
|
-
<span class="ruby-identifier">etime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
|
289
|
-
<span class="ruby-keyword">ensure</span>
|
290
|
-
<span class="ruby-identifier">etime</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
|
291
|
-
<span class="ruby-identifier">status</span> = <span class="ruby-keyword">case</span> <span class="ruby-identifier">ret</span>; <span class="ruby-keyword">when</span> <span class="ruby-keyword">nil</span>; <span class="ruby-value">:error</span>; <span class="ruby-keyword">when</span> <span class="ruby-keyword">false</span>; <span class="ruby-value">:skip</span>; <span class="ruby-keyword">else</span> <span class="ruby-value">:ok</span>; <span class="ruby-keyword">end</span>
|
292
|
-
|
293
|
-
<span class="ruby-identifier">test_name</span> = <span class="ruby-identifier">action</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">variables</span>[<span class="ruby-string">'__TEST__'</span>] <span class="ruby-operator">||</span> <span class="ruby-string">'Main'</span>
|
294
|
-
<span class="ruby-identifier">test</span> = <span class="ruby-ivar">@data</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">test_name</span> }
|
295
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">test</span>
|
296
|
-
<span class="ruby-identifier">test</span> = { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">test_name</span>, <span class="ruby-value">:actions</span> =<span class="ruby-operator">></span> [] }
|
297
|
-
<span class="ruby-ivar">@data</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">test</span>
|
298
|
-
<span class="ruby-keyword">end</span>
|
299
|
-
|
300
|
-
<span class="ruby-identifier">capture</span> = <span class="ruby-identifier">action</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">variables</span>[<span class="ruby-string">'__CAPTURE__'</span>]
|
301
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">capture</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@last_capture</span>
|
302
|
-
<span class="ruby-identifier">capture</span> = <span class="ruby-keyword">nil</span>
|
303
|
-
<span class="ruby-keyword">else</span>
|
304
|
-
<span class="ruby-ivar">@last_capture</span> = <span class="ruby-identifier">capture</span>
|
305
|
-
<span class="ruby-keyword">end</span>
|
306
|
-
|
307
|
-
<span class="ruby-identifier">test</span>[<span class="ruby-value">:actions</span>] <span class="ruby-operator"><<</span> {
|
308
|
-
<span class="ruby-value">:cmd</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">cmd</span>,
|
309
|
-
<span class="ruby-value">:args</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">args</span>(<span class="ruby-keyword">true</span>),
|
310
|
-
<span class="ruby-value">:action</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">action</span>,
|
311
|
-
<span class="ruby-value">:status</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">status</span>,
|
312
|
-
<span class="ruby-value">:time</span> =<span class="ruby-operator">></span> (<span class="ruby-identifier">etime</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">stime</span>),
|
313
|
-
<span class="ruby-value">:capture</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">capture</span>
|
314
|
-
}
|
315
|
-
|
316
|
-
<span class="ruby-identifier">ret</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-identifier">stime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
|
284
|
+
<span class="ruby-identifier">ret</span> = <span class="ruby-keyword">yield</span> <span class="ruby-operator">||</span> <span class="ruby-keyword">false</span>
|
285
|
+
<span class="ruby-identifier">etime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
|
286
|
+
<span class="ruby-keyword">ensure</span>
|
287
|
+
<span class="ruby-identifier">etime</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
|
288
|
+
<span class="ruby-identifier">status</span> = <span class="ruby-keyword">case</span> <span class="ruby-identifier">ret</span>; <span class="ruby-keyword">when</span> <span class="ruby-keyword">nil</span>; <span class="ruby-value">:error</span>; <span class="ruby-keyword">when</span> <span class="ruby-keyword">false</span>; <span class="ruby-value">:skip</span>; <span class="ruby-keyword">else</span> <span class="ruby-value">:ok</span>; <span class="ruby-keyword">end</span>
|
289
|
+
|
290
|
+
<span class="ruby-identifier">test_name</span> = <span class="ruby-identifier">action</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">variables</span>[<span class="ruby-string">'__TEST__'</span>] <span class="ruby-operator">||</span> <span class="ruby-string">'Main'</span>
|
291
|
+
<span class="ruby-identifier">test</span> = <span class="ruby-ivar">@data</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">test_name</span> }
|
292
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">test</span>
|
293
|
+
<span class="ruby-identifier">test</span> = { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">test_name</span>, <span class="ruby-value">:actions</span> =<span class="ruby-operator">></span> [] }
|
294
|
+
<span class="ruby-ivar">@data</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">test</span>
|
295
|
+
<span class="ruby-keyword">end</span>
|
296
|
+
|
297
|
+
<span class="ruby-identifier">capture</span> = <span class="ruby-identifier">action</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">variables</span>[<span class="ruby-string">'__CAPTURE__'</span>]
|
298
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">capture</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@last_capture</span>
|
299
|
+
<span class="ruby-identifier">capture</span> = <span class="ruby-keyword">nil</span>
|
300
|
+
<span class="ruby-keyword">else</span>
|
301
|
+
<span class="ruby-ivar">@last_capture</span> = <span class="ruby-identifier">capture</span>
|
302
|
+
<span class="ruby-keyword">end</span>
|
303
|
+
|
304
|
+
<span class="ruby-identifier">test</span>[<span class="ruby-value">:actions</span>] <span class="ruby-operator"><<</span> {
|
305
|
+
<span class="ruby-value">:cmd</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">cmd</span>,
|
306
|
+
<span class="ruby-value">:args</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">args</span>(<span class="ruby-keyword">true</span>),
|
307
|
+
<span class="ruby-value">:action</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">action</span>,
|
308
|
+
<span class="ruby-value">:status</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">status</span>,
|
309
|
+
<span class="ruby-value">:time</span> =<span class="ruby-operator">></span> (<span class="ruby-identifier">etime</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">stime</span>),
|
310
|
+
<span class="ruby-value">:capture</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">capture</span>
|
311
|
+
}
|
312
|
+
|
313
|
+
<span class="ruby-identifier">ret</span>
|
317
314
|
<span class="ruby-keyword">end</span></pre>
|
318
315
|
</div>
|
319
316
|
|
@@ -333,7 +330,7 @@ implementation see the <a href="HtmlLogger.html">HtmlLogger</a> class.</p>
|
|
333
330
|
|
334
331
|
<footer id="validator-badges" role="contentinfo">
|
335
332
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
336
|
-
<p>Generated by <a href="http://
|
337
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
333
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
334
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
338
335
|
</footer>
|
339
336
|
|
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
<title>class Bauxite::Loggers::TerminalLogger - 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">
|
@@ -158,9 +155,9 @@
|
|
158
155
|
|
159
156
|
<div class="method-source-code" id="new-source">
|
160
157
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 30</span>
|
161
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
162
|
-
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">options</span>)
|
163
|
-
<span class="ruby-ivar">@max_cmd_size</span> = <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">max_action_name_size</span>
|
158
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
159
|
+
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">options</span>)
|
160
|
+
<span class="ruby-ivar">@max_cmd_size</span> = <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">max_action_name_size</span>
|
164
161
|
<span class="ruby-keyword">end</span></pre>
|
165
162
|
</div>
|
166
163
|
|
@@ -205,8 +202,8 @@
|
|
205
202
|
|
206
203
|
<div class="method-source-code" id="debug_prompt-source">
|
207
204
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 69</span>
|
208
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">debug_prompt</span>
|
209
|
-
<span class="ruby-identifier">_fmt</span>(<span class="ruby-value">:white</span>, <span class="ruby-keyword">super</span>)
|
205
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">debug_prompt</span>
|
206
|
+
<span class="ruby-identifier">_fmt</span>(<span class="ruby-value">:white</span>, <span class="ruby-keyword">super</span>)
|
210
207
|
<span class="ruby-keyword">end</span></pre>
|
211
208
|
</div>
|
212
209
|
|
@@ -245,17 +242,17 @@
|
|
245
242
|
|
246
243
|
<div class="method-source-code" id="log-source">
|
247
244
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 85</span>
|
248
|
-
<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>)
|
249
|
-
<span class="ruby-identifier">color</span> = <span class="ruby-value">:gray</span>
|
250
|
-
<span class="ruby-keyword">case</span> <span class="ruby-identifier">type</span>
|
251
|
-
<span class="ruby-keyword">when</span> <span class="ruby-value">:error</span>
|
252
|
-
<span class="ruby-identifier">color</span> = <span class="ruby-value">:red</span>
|
253
|
-
<span class="ruby-keyword">when</span> <span class="ruby-value">:warning</span>
|
254
|
-
<span class="ruby-identifier">color</span> = <span class="ruby-value">:yellow</span>
|
255
|
-
<span class="ruby-keyword">when</span> <span class="ruby-value">:debug</span>
|
256
|
-
<span class="ruby-identifier">color</span> = <span class="ruby-value">:purple</span>
|
257
|
-
<span class="ruby-keyword">end</span>
|
258
|
-
<span class="ruby-keyword">super</span> <span class="ruby-identifier">_fmt</span>(<span class="ruby-identifier">color</span>, <span class="ruby-identifier">s</span>), <span class="ruby-identifier">type</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-identifier">color</span> = <span class="ruby-value">:gray</span>
|
247
|
+
<span class="ruby-keyword">case</span> <span class="ruby-identifier">type</span>
|
248
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:error</span>
|
249
|
+
<span class="ruby-identifier">color</span> = <span class="ruby-value">:red</span>
|
250
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:warning</span>
|
251
|
+
<span class="ruby-identifier">color</span> = <span class="ruby-value">:yellow</span>
|
252
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:debug</span>
|
253
|
+
<span class="ruby-identifier">color</span> = <span class="ruby-value">:purple</span>
|
254
|
+
<span class="ruby-keyword">end</span>
|
255
|
+
<span class="ruby-keyword">super</span> <span class="ruby-identifier">_fmt</span>(<span class="ruby-identifier">color</span>, <span class="ruby-identifier">s</span>), <span class="ruby-identifier">type</span>
|
259
256
|
<span class="ruby-keyword">end</span></pre>
|
260
257
|
</div>
|
261
258
|
|
@@ -287,36 +284,36 @@
|
|
287
284
|
|
288
285
|
<div class="method-source-code" id="log_cmd-source">
|
289
286
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 36</span>
|
290
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>)
|
291
|
-
<span class="ruby-identifier">width</span> = <span class="ruby-identifier">_screen_width</span>
|
292
|
-
<span class="ruby-identifier">cmd</span> = <span class="ruby-identifier">action</span>.<span class="ruby-identifier">cmd</span>.<span class="ruby-identifier">downcase</span>
|
293
|
-
<span class="ruby-identifier">color</span> = <span class="ruby-identifier">_cmd_color</span>(<span class="ruby-identifier">cmd</span>)
|
294
|
-
<span class="ruby-identifier">cmd</span> = <span class="ruby-identifier">cmd</span>.<span class="ruby-identifier">ljust</span>(<span class="ruby-ivar">@max_cmd_size</span>)
|
295
|
-
<span class="ruby-identifier">max_args_size</span> = <span class="ruby-identifier">width</span><span class="ruby-operator">-</span><span class="ruby-identifier">cmd</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span><span class="ruby-operator">-</span><span class="ruby-value">6</span><span class="ruby-operator">-</span><span class="ruby-value">1</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>
|
296
|
-
|
297
|
-
<span class="ruby-identifier">print</span> <span class="ruby-node">"#{_fmt(color, cmd)} "</span>
|
298
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">action</span>.<span class="ruby-identifier">args</span>(<span class="ruby-keyword">true</span>).<span class="ruby-identifier">join</span>(<span class="ruby-string">' '</span>)
|
299
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">max_args_size</span><span class="ruby-operator">-</span><span class="ruby-value">3</span>]<span class="ruby-operator">+</span><span class="ruby-string">'...'</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-identifier">max_args_size</span>
|
300
|
-
<span class="ruby-identifier">print</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">ljust</span>(<span class="ruby-identifier">max_args_size</span>)
|
301
|
-
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
302
|
-
|
303
|
-
<span class="ruby-identifier">_save_cursor</span>
|
304
|
-
<span class="ruby-identifier">color</span> = <span class="ruby-value">:green</span>
|
305
|
-
<span class="ruby-identifier">text</span> = <span class="ruby-string">'OK'</span>
|
306
|
-
<span class="ruby-identifier">ret</span> = <span class="ruby-keyword">yield</span>
|
307
|
-
<span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">ret</span>
|
308
|
-
<span class="ruby-identifier">color</span> = <span class="ruby-value">:yellow</span>
|
309
|
-
<span class="ruby-identifier">text</span> = <span class="ruby-string">'SKIP'</span>
|
310
|
-
<span class="ruby-keyword">end</span>
|
311
|
-
<span class="ruby-identifier">_restore_cursor</span>
|
312
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-node">" #{_block(color, text, 5)}"</span>
|
313
|
-
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
314
|
-
<span class="ruby-identifier">ret</span>
|
315
|
-
<span class="ruby-keyword">rescue</span>
|
316
|
-
<span class="ruby-identifier">_restore_cursor</span>
|
317
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-node">" #{_block(:red, 'ERROR', 5)}"</span>
|
318
|
-
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
319
|
-
<span class="ruby-identifier">raise</span>
|
287
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>)
|
288
|
+
<span class="ruby-identifier">width</span> = <span class="ruby-identifier">_screen_width</span>
|
289
|
+
<span class="ruby-identifier">cmd</span> = <span class="ruby-identifier">action</span>.<span class="ruby-identifier">cmd</span>.<span class="ruby-identifier">downcase</span>
|
290
|
+
<span class="ruby-identifier">color</span> = <span class="ruby-identifier">_cmd_color</span>(<span class="ruby-identifier">cmd</span>)
|
291
|
+
<span class="ruby-identifier">cmd</span> = <span class="ruby-identifier">cmd</span>.<span class="ruby-identifier">ljust</span>(<span class="ruby-ivar">@max_cmd_size</span>)
|
292
|
+
<span class="ruby-identifier">max_args_size</span> = <span class="ruby-identifier">width</span><span class="ruby-operator">-</span><span class="ruby-identifier">cmd</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span><span class="ruby-operator">-</span><span class="ruby-value">6</span><span class="ruby-operator">-</span><span class="ruby-value">1</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>
|
293
|
+
|
294
|
+
<span class="ruby-identifier">print</span> <span class="ruby-node">"#{_fmt(color, cmd)} "</span>
|
295
|
+
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">action</span>.<span class="ruby-identifier">args</span>(<span class="ruby-keyword">true</span>).<span class="ruby-identifier">join</span>(<span class="ruby-string">' '</span>)
|
296
|
+
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">max_args_size</span><span class="ruby-operator">-</span><span class="ruby-value">3</span>]<span class="ruby-operator">+</span><span class="ruby-string">'...'</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-identifier">max_args_size</span>
|
297
|
+
<span class="ruby-identifier">print</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">ljust</span>(<span class="ruby-identifier">max_args_size</span>)
|
298
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
299
|
+
|
300
|
+
<span class="ruby-identifier">_save_cursor</span>
|
301
|
+
<span class="ruby-identifier">color</span> = <span class="ruby-value">:green</span>
|
302
|
+
<span class="ruby-identifier">text</span> = <span class="ruby-string">'OK'</span>
|
303
|
+
<span class="ruby-identifier">ret</span> = <span class="ruby-keyword">yield</span>
|
304
|
+
<span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">ret</span>
|
305
|
+
<span class="ruby-identifier">color</span> = <span class="ruby-value">:yellow</span>
|
306
|
+
<span class="ruby-identifier">text</span> = <span class="ruby-string">'SKIP'</span>
|
307
|
+
<span class="ruby-keyword">end</span>
|
308
|
+
<span class="ruby-identifier">_restore_cursor</span>
|
309
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">" #{_block(color, text, 5)}"</span>
|
310
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
311
|
+
<span class="ruby-identifier">ret</span>
|
312
|
+
<span class="ruby-keyword">rescue</span>
|
313
|
+
<span class="ruby-identifier">_restore_cursor</span>
|
314
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">" #{_block(:red, 'ERROR', 5)}"</span>
|
315
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
316
|
+
<span class="ruby-identifier">raise</span>
|
320
317
|
<span class="ruby-keyword">end</span></pre>
|
321
318
|
</div>
|
322
319
|
|
@@ -348,11 +345,11 @@
|
|
348
345
|
|
349
346
|
<div class="method-source-code" id="progress-source">
|
350
347
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 74</span>
|
351
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">progress</span>(<span class="ruby-identifier">value</span>)
|
352
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">_restore_cursor</span>
|
353
|
-
<span class="ruby-identifier">print</span> <span class="ruby-node">" #{_block(:gray, value.to_s, 5)}"</span>
|
354
|
-
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
355
|
-
<span class="ruby-keyword">end</span>
|
348
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">progress</span>(<span class="ruby-identifier">value</span>)
|
349
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">_restore_cursor</span>
|
350
|
+
<span class="ruby-identifier">print</span> <span class="ruby-node">" #{_block(:gray, value.to_s, 5)}"</span>
|
351
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
352
|
+
<span class="ruby-keyword">end</span>
|
356
353
|
<span class="ruby-keyword">end</span></pre>
|
357
354
|
</div>
|
358
355
|
|
@@ -392,8 +389,8 @@
|
|
392
389
|
|
393
390
|
<div class="method-source-code" id="_block-source">
|
394
391
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 115</span>
|
395
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_block</span>(<span class="ruby-identifier">color</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">size</span>)
|
396
|
-
<span class="ruby-node">"#{_fmt(:white, '[')}#{_fmt(color, text, size)}#{_fmt(:white, ']')}"</span>
|
392
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_block</span>(<span class="ruby-identifier">color</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">size</span>)
|
393
|
+
<span class="ruby-node">"#{_fmt(:white, '[')}#{_fmt(color, text, size)}#{_fmt(:white, ']')}"</span>
|
397
394
|
<span class="ruby-keyword">end</span></pre>
|
398
395
|
</div>
|
399
396
|
|
@@ -425,15 +422,15 @@
|
|
425
422
|
|
426
423
|
<div class="method-source-code" id="_cmd_color-source">
|
427
424
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 120</span>
|
428
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_cmd_color</span>(<span class="ruby-identifier">cmd</span>)
|
429
|
-
<span class="ruby-keyword">case</span> <span class="ruby-identifier">cmd</span>
|
430
|
-
<span class="ruby-keyword">when</span> <span class="ruby-string">'load'</span>
|
431
|
-
<span class="ruby-keyword">return</span> <span class="ruby-value">:cyan</span>
|
432
|
-
<span class="ruby-keyword">when</span> <span class="ruby-string">'test'</span>
|
433
|
-
<span class="ruby-keyword">return</span> <span class="ruby-value">:purple</span>
|
434
|
-
<span class="ruby-keyword">else</span>
|
435
|
-
<span class="ruby-keyword">return</span> <span class="ruby-value">:blue</span>
|
436
|
-
<span class="ruby-keyword">end</span>
|
425
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_cmd_color</span>(<span class="ruby-identifier">cmd</span>)
|
426
|
+
<span class="ruby-keyword">case</span> <span class="ruby-identifier">cmd</span>
|
427
|
+
<span class="ruby-keyword">when</span> <span class="ruby-string">'load'</span>
|
428
|
+
<span class="ruby-keyword">return</span> <span class="ruby-value">:cyan</span>
|
429
|
+
<span class="ruby-keyword">when</span> <span class="ruby-string">'test'</span>
|
430
|
+
<span class="ruby-keyword">return</span> <span class="ruby-value">:purple</span>
|
431
|
+
<span class="ruby-keyword">else</span>
|
432
|
+
<span class="ruby-keyword">return</span> <span class="ruby-value">:blue</span>
|
433
|
+
<span class="ruby-keyword">end</span>
|
437
434
|
<span class="ruby-keyword">end</span></pre>
|
438
435
|
</div>
|
439
436
|
|
@@ -465,8 +462,8 @@
|
|
465
462
|
|
466
463
|
<div class="method-source-code" id="_fmt-source">
|
467
464
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 100</span>
|
468
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_fmt</span>(<span class="ruby-identifier">color</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">size</span> = <span class="ruby-value">0</span>)
|
469
|
-
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">center</span>(<span class="ruby-identifier">size</span>)
|
465
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_fmt</span>(<span class="ruby-identifier">color</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">size</span> = <span class="ruby-value">0</span>)
|
466
|
+
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">center</span>(<span class="ruby-identifier">size</span>)
|
470
467
|
<span class="ruby-keyword">end</span></pre>
|
471
468
|
</div>
|
472
469
|
|
@@ -498,8 +495,8 @@
|
|
498
495
|
|
499
496
|
<div class="method-source-code" id="_restore_cursor-source">
|
500
497
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 110</span>
|
501
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_restore_cursor</span>
|
502
|
-
<span class="ruby-keyword">false</span>
|
498
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_restore_cursor</span>
|
499
|
+
<span class="ruby-keyword">false</span>
|
503
500
|
<span class="ruby-keyword">end</span></pre>
|
504
501
|
</div>
|
505
502
|
|
@@ -531,8 +528,8 @@
|
|
531
528
|
|
532
529
|
<div class="method-source-code" id="_save_cursor-source">
|
533
530
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 105</span>
|
534
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_save_cursor</span>
|
535
|
-
<span class="ruby-keyword">false</span>
|
531
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_save_cursor</span>
|
532
|
+
<span class="ruby-keyword">false</span>
|
536
533
|
<span class="ruby-keyword">end</span></pre>
|
537
534
|
</div>
|
538
535
|
|
@@ -564,8 +561,8 @@
|
|
564
561
|
|
565
562
|
<div class="method-source-code" id="_screen_width-source">
|
566
563
|
<pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 132</span>
|
567
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_screen_width</span>
|
568
|
-
<span class="ruby-value">80</span>
|
564
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_screen_width</span>
|
565
|
+
<span class="ruby-value">80</span>
|
569
566
|
<span class="ruby-keyword">end</span></pre>
|
570
567
|
</div>
|
571
568
|
|
@@ -585,7 +582,7 @@
|
|
585
582
|
|
586
583
|
<footer id="validator-badges" role="contentinfo">
|
587
584
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
588
|
-
<p>Generated by <a href="http://
|
589
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
585
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
586
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
590
587
|
</footer>
|
591
588
|
|