bauxite 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/doc/Bauxite/Action.html +3 -3
  3. data/doc/Bauxite/ActionModule.html +4 -4
  4. data/doc/Bauxite/Application.html +1 -1
  5. data/doc/Bauxite/Context.html +184 -143
  6. data/doc/Bauxite/Errors/AssertionError.html +1 -1
  7. data/doc/Bauxite/Errors/FileNotFoundError.html +1 -1
  8. data/doc/Bauxite/Errors/FormatError.html +107 -0
  9. data/doc/Bauxite/Errors.html +1 -1
  10. data/doc/Bauxite/Loggers/CompositeLogger.html +1 -1
  11. data/doc/Bauxite/Loggers/EchoLogger.html +2 -1
  12. data/doc/Bauxite/Loggers/FileLogger.html +1 -1
  13. data/doc/Bauxite/Loggers/NullLogger.html +6 -6
  14. data/doc/Bauxite/Loggers/TerminalLogger.html +15 -10
  15. data/doc/Bauxite/Loggers/XtermLogger.html +1 -1
  16. data/doc/Bauxite/Loggers.html +1 -1
  17. data/doc/Bauxite/Parser.html +325 -0
  18. data/doc/Bauxite/ParserModule.html +203 -0
  19. data/doc/Bauxite/Selector.html +1 -1
  20. data/doc/Bauxite/SelectorModule.html +4 -4
  21. data/doc/Bauxite.html +1 -1
  22. data/doc/created.rid +42 -38
  23. data/doc/index.html +5 -1
  24. data/doc/js/search_index.js +1 -1
  25. data/doc/table_of_contents.html +77 -36
  26. data/lib/bauxite/actions/alias.rb +1 -1
  27. data/lib/bauxite/actions/debug.rb +2 -3
  28. data/lib/bauxite/actions/tryload.rb +1 -1
  29. data/lib/bauxite/application.rb +2 -10
  30. data/lib/bauxite/core/{Context.rb → context.rb} +117 -114
  31. data/lib/bauxite/core/{Errors.rb → errors.rb} +6 -0
  32. data/lib/bauxite/core/parser.rb +78 -0
  33. data/lib/bauxite/loggers/echo.rb +1 -0
  34. data/lib/bauxite/loggers/terminal.rb +5 -0
  35. data/lib/bauxite/parsers/csv.rb +49 -0
  36. data/lib/bauxite/parsers/default.rb +42 -0
  37. data/lib/bauxite/parsers/html.rb +76 -0
  38. data/lib/bauxite.rb +1 -1
  39. data/test/alias.bxt +3 -0
  40. data/test/parsers/page.html +7 -0
  41. data/test/parsers.bxt +2 -0
  42. data/test/parsers.csv +7 -0
  43. data/test/parsers.html +32 -0
  44. metadata +18 -7
  45. /data/lib/bauxite/core/{Action.rb → action.rb} +0 -0
  46. /data/lib/bauxite/core/{Logger.rb → logger.rb} +0 -0
  47. /data/lib/bauxite/core/{Selector.rb → selector.rb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29a130d31e748c347616303198db42223b1366c1
4
- data.tar.gz: 190e8ddb4c0dfdc29f27f58962088fbc7fbce5f2
3
+ metadata.gz: 2e76cc5df6ce7991dc28939a16d8860c4fb1fcec
4
+ data.tar.gz: 01c521fbe0a888c99ce7549c75d5042764291246
5
5
  SHA512:
6
- metadata.gz: 6ffc532a0e81ef8f64c858440f27a14faca03551de377100911e693bc39c307d0709f270109ad407621f40ca4978f0924ceb3fcc2b4fa7ebdf522ade2145414a
7
- data.tar.gz: 6d8295934af8ef063fb7cedac8dab0e5aa5dd327fd0b40d5cc00166cc5ef9d6f9170c7810a538957a777d09caeffcd005da8be29914beeff81c86560f8a5b34a
6
+ metadata.gz: cff8ee99fabe2e6b8149b3eb3b8e9e2cd850e312e4f5a4028c6a4793d5c75cf9831b2448747f17f02788734a80f82495931dfd9262bacb0dbf1d3a3a38b7e518
7
+ data.tar.gz: 5e3e14de4fc66678c39b6ff1825787eee24949c79887b36198b25cd0cd485449a903509cbf422274ce771eb3d9938544d3da528f8b77653d3b152a83d2f50e68
@@ -348,7 +348,7 @@ not alias_action.</p>
348
348
  <div class="method-source-code" id="alias_action-source">
349
349
  <pre><span class="ruby-comment"># File lib/bauxite/actions/alias.rb, line 48</span>
350
350
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">alias_action</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">action</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
351
- <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">aliases</span>[<span class="ruby-identifier">name</span>] = ([<span class="ruby-identifier">action</span>] <span class="ruby-operator">+</span> (<span class="ruby-identifier">args</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-string">&#39;&quot;&#39;</span><span class="ruby-operator">+</span><span class="ruby-identifier">a</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&#39;&quot;&quot;&#39;</span>, <span class="ruby-string">&#39;&#39;</span>)<span class="ruby-operator">+</span><span class="ruby-string">&#39;&quot;&#39;</span> })).<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39; &#39;</span>)
351
+ <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">add_alias</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">args</span>)
352
352
  <span class="ruby-keyword">end</span></pre>
353
353
  </div>
354
354
 
@@ -1351,7 +1351,7 @@ href="Context.html#method-i-with_vars">Bauxite::Context#with_vars</a>).</p>
1351
1351
  <pre><span class="ruby-comment"># File lib/bauxite/actions/tryload.rb, line 44</span>
1352
1352
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">tryload</span>(<span class="ruby-identifier">file</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">vars</span>)
1353
1353
  <span class="ruby-identifier">_load_file_action</span>(<span class="ruby-identifier">file</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">vars</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
1354
- <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">parse_file</span>(<span class="ruby-identifier">f</span>)
1354
+ <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">exec_file</span>(<span class="ruby-identifier">f</span>)
1355
1355
  <span class="ruby-keyword">end</span>
1356
1356
  <span class="ruby-keyword">end</span></pre>
1357
1357
  </div>
@@ -1461,7 +1461,7 @@ href="Context.html#method-i-expand">Bauxite::Context#expand</a>).</p>
1461
1461
 
1462
1462
  <footer id="validator-badges" role="contentinfo">
1463
1463
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
1464
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
1464
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
1465
1465
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
1466
1466
  </footer>
1467
1467
 
@@ -188,7 +188,7 @@ action was defined.</p>
188
188
 
189
189
 
190
190
  <div class="method-source-code" id="new-source">
191
- <pre><span class="ruby-comment"># File lib/bauxite/core/Action.rb, line 39</span>
191
+ <pre><span class="ruby-comment"># File lib/bauxite/core/action.rb, line 39</span>
192
192
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ctx</span>, <span class="ruby-identifier">cmd</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">file</span>, <span class="ruby-identifier">line</span>)
193
193
  <span class="ruby-ivar">@ctx</span> = <span class="ruby-identifier">ctx</span>
194
194
  <span class="ruby-ivar">@cmd</span> = <span class="ruby-identifier">cmd</span>
@@ -260,7 +260,7 @@ quote characters (“) and every quote inside an argument is doubled.</p>
260
260
 
261
261
 
262
262
  <div class="method-source-code" id="args-source">
263
- <pre><span class="ruby-comment"># File lib/bauxite/core/Action.rb, line 74</span>
263
+ <pre><span class="ruby-comment"># File lib/bauxite/core/action.rb, line 74</span>
264
264
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">args</span>(<span class="ruby-identifier">quote</span> = <span class="ruby-keyword">false</span>)
265
265
  <span class="ruby-identifier">ret</span> = <span class="ruby-ivar">@args</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">expand</span>(<span class="ruby-identifier">a</span>) }
266
266
  <span class="ruby-identifier">ret</span> = <span class="ruby-identifier">ret</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-string">&#39;&quot;&#39;</span><span class="ruby-operator">+</span><span class="ruby-identifier">a</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&#39;&quot;&#39;</span>, <span class="ruby-string">&#39;&quot;&quot;&#39;</span>)<span class="ruby-operator">+</span><span class="ruby-string">&#39;&quot;&#39;</span> } <span class="ruby-keyword">if</span> <span class="ruby-identifier">quote</span>
@@ -314,7 +314,7 @@ might yield different results.</p>
314
314
 
315
315
 
316
316
  <div class="method-source-code" id="execute-source">
317
- <pre><span class="ruby-comment"># File lib/bauxite/core/Action.rb, line 96</span>
317
+ <pre><span class="ruby-comment"># File lib/bauxite/core/action.rb, line 96</span>
318
318
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">execute</span>()
319
319
  <span class="ruby-identifier">send</span>(<span class="ruby-ivar">@cmd_real</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
320
320
  <span class="ruby-keyword">end</span></pre>
@@ -336,7 +336,7 @@ might yield different results.</p>
336
336
 
337
337
  <footer id="validator-badges" role="contentinfo">
338
338
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
339
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
339
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
340
340
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
341
341
  </footer>
342
342
 
@@ -243,7 +243,7 @@ indicates success).</p>
243
243
 
244
244
  <footer id="validator-badges" role="contentinfo">
245
245
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
246
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
246
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
247
247
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
248
248
  </footer>
249
249