mbrao 1.2.3 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/CHANGELOG.md +5 -0
- data/doc/ActionView/Template/Handlers/MbraoTemplate.html +87 -20
- data/doc/ActionView/Template/Handlers.html +1 -1
- data/doc/HTML/Pipeline/KramdownFilter.html +1 -1
- data/doc/HTML/Pipeline.html +1 -1
- data/doc/HTML.html +1 -1
- data/doc/Mbrao/Author.html +337 -67
- data/doc/Mbrao/Content.html +1268 -444
- data/doc/Mbrao/ContentPublicInterface.html +24 -20
- data/doc/Mbrao/Exceptions/InvalidDate.html +1 -1
- data/doc/Mbrao/Exceptions/InvalidMetadata.html +1 -1
- data/doc/Mbrao/Exceptions/Parsing.html +1 -1
- data/doc/Mbrao/Exceptions/Rendering.html +1 -1
- data/doc/Mbrao/Exceptions/UnavailableLocalization.html +1 -1
- data/doc/Mbrao/Exceptions/Unimplemented.html +1 -1
- data/doc/Mbrao/Exceptions/UnknownEngine.html +1 -1
- data/doc/Mbrao/Exceptions.html +1 -1
- data/doc/Mbrao/Parser.html +11 -11
- data/doc/Mbrao/ParsingEngines/Base.html +25 -24
- data/doc/Mbrao/ParsingEngines/PlainText.html +17 -16
- data/doc/Mbrao/ParsingEngines.html +1 -1
- data/doc/Mbrao/PublicInterface/ClassMethods.html +312 -19
- data/doc/Mbrao/PublicInterface.html +1 -1
- data/doc/Mbrao/RenderingEngines/Base.html +7 -7
- data/doc/Mbrao/RenderingEngines/HtmlPipeline.html +27 -15
- data/doc/Mbrao/RenderingEngines.html +1 -1
- data/doc/Mbrao/Validations/ClassMethods.html +21 -21
- data/doc/Mbrao/Validations.html +1 -1
- data/doc/Mbrao/Version.html +3 -3
- data/doc/Mbrao.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +86 -62
- data/doc/top-level-namespace.html +1 -1
- data/lib/mbrao/author.rb +18 -4
- data/lib/mbrao/content.rb +93 -44
- data/lib/mbrao/integrations/rails.rb +12 -5
- data/lib/mbrao/parser.rb +23 -0
- data/lib/mbrao/parsing_engines/base.rb +12 -11
- data/lib/mbrao/parsing_engines/plain_text.rb +29 -23
- data/lib/mbrao/rendering_engines/base.rb +4 -4
- data/lib/mbrao/rendering_engines/html_pipeline.rb +7 -2
- data/lib/mbrao/version.rb +2 -2
- data/spec/mbrao/author_spec.rb +32 -16
- data/spec/mbrao/content_spec.rb +144 -85
- data/spec/mbrao/integrations/rails_spec.rb +14 -0
- data/spec/mbrao/parser_spec.rb +19 -19
- data/spec/mbrao/parsing_engines/base_spec.rb +12 -12
- data/spec/mbrao/parsing_engines/plain_text_spec.rb +21 -21
- data/spec/mbrao/rendering_engines/base_spec.rb +2 -2
- data/spec/mbrao/rendering_engines/html_pipeline_spec.rb +31 -31
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d8cdcece5127a52606743fb1f1a5b60fd263d85
|
4
|
+
data.tar.gz: e82bfb645863252bc1b0d0cbb59361306bf41a22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16b211a2ec3906a47096e415321e428ae7d3b354214da7b7f94fcb5a70ee5317216719d424bfb61719b7e25e6e2cc658f8267d2ec48b01762c9ad9d796d96718
|
7
|
+
data.tar.gz: a38360d95c6f0232983bbd3f9b5d4a653724c947c71be850a2e92655e47d4e04ff261c978068a9518726e98fe5fcf858ed6acb9617b8bbfbdbd96eb462bb2c47
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -144,6 +144,29 @@
|
|
144
144
|
<span class="summary_desc"><div class='inline'><p>Returns a unique (singleton) instance of the template handler.</p>
|
145
145
|
</div></span>
|
146
146
|
|
147
|
+
</li>
|
148
|
+
|
149
|
+
|
150
|
+
<li class="public ">
|
151
|
+
<span class="summary_signature">
|
152
|
+
|
153
|
+
<a href="#register-class_method" title="register (class method)">+ (Object) <strong>register</strong> </a>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
</span>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<span class="summary_desc"><div class='inline'><p>Register Mbrao into Rails.</p>
|
168
|
+
</div></span>
|
169
|
+
|
147
170
|
</li>
|
148
171
|
|
149
172
|
|
@@ -312,6 +335,46 @@
|
|
312
335
|
</td>
|
313
336
|
</tr>
|
314
337
|
</table>
|
338
|
+
</div>
|
339
|
+
|
340
|
+
<div class="method_details ">
|
341
|
+
<h3 class="signature " id="register-class_method">
|
342
|
+
|
343
|
+
+ (<tt>Object</tt>) <strong>register</strong>
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
</h3><div class="docstring">
|
350
|
+
<div class="discussion">
|
351
|
+
<p>Register Mbrao into Rails.</p>
|
352
|
+
|
353
|
+
|
354
|
+
</div>
|
355
|
+
</div>
|
356
|
+
<div class="tags">
|
357
|
+
|
358
|
+
|
359
|
+
</div><table class="source_code">
|
360
|
+
<tr>
|
361
|
+
<td>
|
362
|
+
<pre class="lines">
|
363
|
+
|
364
|
+
|
365
|
+
21
|
366
|
+
22
|
367
|
+
23</pre>
|
368
|
+
</td>
|
369
|
+
<td>
|
370
|
+
<pre class="code"><span class="info file"># File 'lib/mbrao/integrations/rails.rb', line 21</span>
|
371
|
+
|
372
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span>
|
373
|
+
<span class='const'>ActionView</span><span class='op'>::</span><span class='const'>Template</span><span class='period'>.</span><span class='id identifier rubyid_register_template_handler'>register_template_handler</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>emt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='const'>ActionView</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='const'>Rails</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^[34]</span><span class='regexp_end'>/</span></span>
|
374
|
+
<span class='kw'>end</span></pre>
|
375
|
+
</td>
|
376
|
+
</tr>
|
377
|
+
</table>
|
315
378
|
</div>
|
316
379
|
|
317
380
|
</div>
|
@@ -381,12 +444,12 @@
|
|
381
444
|
<pre class="lines">
|
382
445
|
|
383
446
|
|
384
|
-
|
385
|
-
|
386
|
-
|
447
|
+
52
|
448
|
+
53
|
449
|
+
54</pre>
|
387
450
|
</td>
|
388
451
|
<td>
|
389
|
-
<pre class="code"><span class="info file"># File 'lib/mbrao/integrations/rails.rb', line
|
452
|
+
<pre class="code"><span class="info file"># File 'lib/mbrao/integrations/rails.rb', line 52</span>
|
390
453
|
|
391
454
|
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_template'>template</span><span class='rparen'>)</span>
|
392
455
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ActionView::Template::Handlers::MbraoTemplate.instance.render(self, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
@@ -472,25 +535,29 @@
|
|
472
535
|
<pre class="lines">
|
473
536
|
|
474
537
|
|
475
|
-
25
|
476
|
-
26
|
477
|
-
27
|
478
|
-
28
|
479
|
-
29
|
480
538
|
30
|
481
539
|
31
|
482
|
-
32
|
540
|
+
32
|
541
|
+
33
|
542
|
+
34
|
543
|
+
35
|
544
|
+
36
|
545
|
+
37
|
546
|
+
38
|
547
|
+
39</pre>
|
483
548
|
</td>
|
484
549
|
<td>
|
485
|
-
<pre class="code"><span class="info file"># File 'lib/mbrao/integrations/rails.rb', line
|
550
|
+
<pre class="code"><span class="info file"># File 'lib/mbrao/integrations/rails.rb', line 30</span>
|
486
551
|
|
487
552
|
<span class='kw'>def</span> <span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='id identifier rubyid_renderer'>renderer</span><span class='comma'>,</span> <span class='id identifier rubyid_template'>template</span><span class='rparen'>)</span>
|
488
553
|
<span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Parser</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_template'>template</span><span class='rparen'>)</span>
|
489
|
-
<span class='id identifier
|
490
|
-
<span class='id identifier rubyid_renderer'>renderer</span><span class='period'>.</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_define_singleton_method'>define_singleton_method</span><span class='lparen'>(</span><span class='symbol'>:mbrao_content</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='ivar'>@mbrao_content</span> <span class='rbrace'>}</span>
|
491
|
-
<span class='id identifier rubyid_renderer'>renderer</span><span class='period'>.</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:helper_method</span><span class='comma'>,</span> <span class='symbol'>:mbrao_content</span><span class='rparen'>)</span>
|
554
|
+
<span class='id identifier rubyid_controller'>controller</span> <span class='op'>=</span> <span class='id identifier rubyid_renderer'>renderer</span><span class='period'>.</span><span class='id identifier rubyid_controller'>controller</span>
|
492
555
|
|
493
|
-
<span class='
|
556
|
+
<span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_instance_variable_set'>instance_variable_set</span><span class='lparen'>(</span><span class='symbol'>:@mbrao_content</span><span class='comma'>,</span> <span class='id identifier rubyid_content'>content</span><span class='rparen'>)</span>
|
557
|
+
<span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_define_singleton_method'>define_singleton_method</span><span class='lparen'>(</span><span class='symbol'>:mbrao_content</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='ivar'>@mbrao_content</span> <span class='rbrace'>}</span>
|
558
|
+
<span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:helper_method</span><span class='comma'>,</span> <span class='symbol'>:mbrao_content</span><span class='rparen'>)</span>
|
559
|
+
|
560
|
+
<span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Parser</span><span class='period'>.</span><span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>engine:</span> <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_metadata'>metadata</span><span class='lbracket'>[</span><span class='symbol'>:engine</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>locale:</span> <span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:locale</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
494
561
|
<span class='kw'>end</span></pre>
|
495
562
|
</td>
|
496
563
|
</tr>
|
@@ -539,12 +606,12 @@
|
|
539
606
|
<pre class="lines">
|
540
607
|
|
541
608
|
|
542
|
-
|
543
|
-
|
544
|
-
|
609
|
+
44
|
610
|
+
45
|
611
|
+
46</pre>
|
545
612
|
</td>
|
546
613
|
<td>
|
547
|
-
<pre class="code"><span class="info file"># File 'lib/mbrao/integrations/rails.rb', line
|
614
|
+
<pre class="code"><span class="info file"># File 'lib/mbrao/integrations/rails.rb', line 44</span>
|
548
615
|
|
549
616
|
<span class='kw'>def</span> <span class='id identifier rubyid_supports_streaming?'>supports_streaming?</span>
|
550
617
|
<span class='kw'>true</span>
|
@@ -559,7 +626,7 @@
|
|
559
626
|
</div>
|
560
627
|
|
561
628
|
<div id="footer">
|
562
|
-
Generated on
|
629
|
+
Generated on Sun Nov 24 14:07:04 2013 by
|
563
630
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
564
631
|
0.8.7.3 (ruby-2.0.0).
|
565
632
|
</div>
|
@@ -116,7 +116,7 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Sun Nov 24 14:07:03 2013 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
121
|
0.8.7.3 (ruby-2.0.0).
|
122
122
|
</div>
|
@@ -345,7 +345,7 @@
|
|
345
345
|
</div>
|
346
346
|
|
347
347
|
<div id="footer">
|
348
|
-
Generated on
|
348
|
+
Generated on Sun Nov 24 14:07:04 2013 by
|
349
349
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
350
350
|
0.8.7.3 (ruby-2.0.0).
|
351
351
|
</div>
|
data/doc/HTML/Pipeline.html
CHANGED
@@ -131,7 +131,7 @@
|
|
131
131
|
</div>
|
132
132
|
|
133
133
|
<div id="footer">
|
134
|
-
Generated on
|
134
|
+
Generated on Sun Nov 24 14:07:04 2013 by
|
135
135
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
136
136
|
0.8.7.3 (ruby-2.0.0).
|
137
137
|
</div>
|
data/doc/HTML.html
CHANGED
@@ -116,7 +116,7 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Sun Nov 24 14:07:03 2013 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
121
|
0.8.7.3 (ruby-2.0.0).
|
122
122
|
</div>
|