mbrao 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.travis-gemfile +3 -3
  3. data/CHANGELOG.md +4 -0
  4. data/Gemfile +5 -5
  5. data/README.md +1 -0
  6. data/doc/ActionView/Template/Handlers/MbraoTemplate.html +3 -3
  7. data/doc/ActionView/Template/Handlers.html +3 -3
  8. data/doc/HTML/Pipeline/KramdownFilter.html +3 -3
  9. data/doc/HTML/Pipeline.html +3 -3
  10. data/doc/HTML.html +3 -3
  11. data/doc/Mbrao/Author.html +3 -3
  12. data/doc/Mbrao/Content.html +12 -12
  13. data/doc/Mbrao/ContentPublicInterface.html +3 -3
  14. data/doc/Mbrao/Exceptions/InvalidDate.html +3 -3
  15. data/doc/Mbrao/Exceptions/InvalidMetadata.html +3 -3
  16. data/doc/Mbrao/Exceptions/Parsing.html +3 -3
  17. data/doc/Mbrao/Exceptions/Rendering.html +3 -3
  18. data/doc/Mbrao/Exceptions/UnavailableLocalization.html +3 -3
  19. data/doc/Mbrao/Exceptions/Unimplemented.html +3 -3
  20. data/doc/Mbrao/Exceptions/UnknownEngine.html +3 -3
  21. data/doc/Mbrao/Exceptions.html +3 -3
  22. data/doc/Mbrao/Parser.html +3 -3
  23. data/doc/Mbrao/ParsingEngines/Base.html +3 -3
  24. data/doc/Mbrao/ParsingEngines/PlainText.html +3 -3
  25. data/doc/Mbrao/ParsingEngines.html +3 -3
  26. data/doc/Mbrao/PublicInterface/ClassMethods.html +3 -3
  27. data/doc/Mbrao/PublicInterface.html +3 -3
  28. data/doc/Mbrao/RenderingEngines/Base.html +3 -3
  29. data/doc/Mbrao/RenderingEngines/HtmlPipeline.html +7 -7
  30. data/doc/Mbrao/RenderingEngines.html +3 -3
  31. data/doc/Mbrao/Validations/ClassMethods.html +3 -3
  32. data/doc/Mbrao/Validations.html +3 -3
  33. data/doc/Mbrao/Version.html +4 -4
  34. data/doc/Mbrao.html +3 -3
  35. data/doc/_index.html +4 -4
  36. data/doc/css/style.css +1 -1
  37. data/doc/file.README.html +5 -4
  38. data/doc/frames.html +5 -7
  39. data/doc/index.html +5 -4
  40. data/doc/js/app.js +7 -2
  41. data/doc/top-level-namespace.html +3 -3
  42. data/lib/mbrao/content.rb +3 -3
  43. data/lib/mbrao/parsing_engines/plain_text.rb +5 -5
  44. data/lib/mbrao/rendering_engines/html_pipeline.rb +2 -2
  45. data/lib/mbrao/version.rb +1 -1
  46. data/mbrao.gemspec +7 -4
  47. data/spec/mbrao/integrations/rails_spec.rb +2 -0
  48. data/spec/mbrao/parsing_engines/plain_text_spec.rb +1 -1
  49. data/spec/mbrao/rendering_engines/html_pipeline_spec.rb +6 -6
  50. metadata +41 -11
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mbrao::PublicInterface
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.3
10
10
 
11
11
  </title>
12
12
 
@@ -125,9 +125,9 @@
125
125
  </div>
126
126
 
127
127
  <div id="footer">
128
- Generated on Sun Aug 18 16:37:00 2013 by
128
+ Generated on Sat Nov 23 13:44:01 2013 by
129
129
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
- 0.8.7 (ruby-2.0.0).
130
+ 0.8.7.3 (ruby-2.0.0).
131
131
  </div>
132
132
 
133
133
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mbrao::RenderingEngines::Base
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.3
10
10
 
11
11
  </title>
12
12
 
@@ -271,9 +271,9 @@
271
271
  </div>
272
272
 
273
273
  <div id="footer">
274
- Generated on Sun Aug 18 16:37:01 2013 by
274
+ Generated on Sat Nov 23 13:44:02 2013 by
275
275
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
276
- 0.8.7 (ruby-2.0.0).
276
+ 0.8.7.3 (ruby-2.0.0).
277
277
  </div>
278
278
 
279
279
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mbrao::RenderingEngines::HtmlPipeline
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.3
10
10
 
11
11
  </title>
12
12
 
@@ -450,7 +450,7 @@
450
450
  </span> <span class='comment'># @param context [Hash] A context for rendering.
451
451
  </span> <span class='comment'># @return [HTML::Pipeline] The pipeline
452
452
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_create_pipeline'>create_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
453
- <span class='op'>::</span><span class='const'>HTML</span><span class='op'>::</span><span class='const'>Pipeline</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_find_class'>find_class</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>::HTML::Pipeline::%CLASS%Filter</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span><span class='rparen'>)</span>
453
+ <span class='op'>::</span><span class='const'>HTML</span><span class='op'>::</span><span class='const'>Pipeline</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_find_class'>find_class</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>::HTML::Pipeline::%CLASS%Filter</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span><span class='rparen'>)</span>
454
454
  <span class='kw'>end</span>
455
455
 
456
456
  <span class='comment'># Filters pipeline filters basing on the options provided.
@@ -472,7 +472,7 @@
472
472
  </span> <span class='comment'># @param options [Hash] The options to parse.
473
473
  </span> <span class='comment'># @return [Array] The pipeline to process.
474
474
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_get_pipeline'>get_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
475
- <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:pipeline</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_pipeline'>default_pipeline</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:first</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span>
475
+ <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:pipeline</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_pipeline'>default_pipeline</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:first</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span>
476
476
  <span class='kw'>end</span>
477
477
  <span class='kw'>end</span></pre>
478
478
  </td>
@@ -711,7 +711,7 @@
711
711
  </span> <span class='comment'># @param context [Hash] A context for rendering.
712
712
  </span> <span class='comment'># @return [HTML::Pipeline] The pipeline
713
713
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_create_pipeline'>create_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
714
- <span class='op'>::</span><span class='const'>HTML</span><span class='op'>::</span><span class='const'>Pipeline</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_find_class'>find_class</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>::HTML::Pipeline::%CLASS%Filter</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span><span class='rparen'>)</span>
714
+ <span class='op'>::</span><span class='const'>HTML</span><span class='op'>::</span><span class='const'>Pipeline</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_find_class'>find_class</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>::HTML::Pipeline::%CLASS%Filter</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span><span class='rparen'>)</span>
715
715
  <span class='kw'>end</span>
716
716
 
717
717
  <span class='comment'># Filters pipeline filters basing on the options provided.
@@ -733,7 +733,7 @@
733
733
  </span> <span class='comment'># @param options [Hash] The options to parse.
734
734
  </span> <span class='comment'># @return [Array] The pipeline to process.
735
735
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_get_pipeline'>get_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
736
- <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:pipeline</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_pipeline'>default_pipeline</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:first</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span>
736
+ <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:pipeline</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_pipeline'>default_pipeline</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:first</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span>
737
737
  <span class='kw'>end</span>
738
738
  <span class='kw'>end</span></pre>
739
739
  </td>
@@ -864,9 +864,9 @@
864
864
  </div>
865
865
 
866
866
  <div id="footer">
867
- Generated on Sun Aug 18 16:37:01 2013 by
867
+ Generated on Sat Nov 23 13:44:02 2013 by
868
868
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
869
- 0.8.7 (ruby-2.0.0).
869
+ 0.8.7.3 (ruby-2.0.0).
870
870
  </div>
871
871
 
872
872
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mbrao::RenderingEngines
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.3
10
10
 
11
11
  </title>
12
12
 
@@ -118,9 +118,9 @@
118
118
  </div>
119
119
 
120
120
  <div id="footer">
121
- Generated on Sun Aug 18 16:37:00 2013 by
121
+ Generated on Sat Nov 23 13:44:01 2013 by
122
122
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
123
- 0.8.7 (ruby-2.0.0).
123
+ 0.8.7.3 (ruby-2.0.0).
124
124
  </div>
125
125
 
126
126
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mbrao::Validations::ClassMethods
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.3
10
10
 
11
11
  </title>
12
12
 
@@ -345,9 +345,9 @@
345
345
  </div>
346
346
 
347
347
  <div id="footer">
348
- Generated on Sun Aug 18 16:37:00 2013 by
348
+ Generated on Sat Nov 23 13:44:01 2013 by
349
349
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
350
- 0.8.7 (ruby-2.0.0).
350
+ 0.8.7.3 (ruby-2.0.0).
351
351
  </div>
352
352
 
353
353
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mbrao::Validations
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.3
10
10
 
11
11
  </title>
12
12
 
@@ -125,9 +125,9 @@
125
125
  </div>
126
126
 
127
127
  <div id="footer">
128
- Generated on Sun Aug 18 16:37:00 2013 by
128
+ Generated on Sat Nov 23 13:44:01 2013 by
129
129
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
- 0.8.7 (ruby-2.0.0).
130
+ 0.8.7.3 (ruby-2.0.0).
131
131
  </div>
132
132
 
133
133
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mbrao::Version
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.3
10
10
 
11
11
  </title>
12
12
 
@@ -149,7 +149,7 @@
149
149
 
150
150
  </div>
151
151
  </dt>
152
- <dd><pre class="code"><span class='int'>2</span></pre></dd>
152
+ <dd><pre class="code"><span class='int'>3</span></pre></dd>
153
153
 
154
154
  <dt id="STRING-constant" class="">STRING =
155
155
  <div class="docstring">
@@ -180,9 +180,9 @@
180
180
  </div>
181
181
 
182
182
  <div id="footer">
183
- Generated on Sun Aug 18 16:37:00 2013 by
183
+ Generated on Sat Nov 23 13:44:01 2013 by
184
184
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
- 0.8.7 (ruby-2.0.0).
185
+ 0.8.7.3 (ruby-2.0.0).
186
186
  </div>
187
187
 
188
188
  </body>
data/doc/Mbrao.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mbrao
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.3
10
10
 
11
11
  </title>
12
12
 
@@ -121,9 +121,9 @@ Licensed under the MIT license, which can be found at http://www.opensource.org/
121
121
  </div>
122
122
 
123
123
  <div id="footer">
124
- Generated on Sun Aug 18 16:37:00 2013 by
124
+ Generated on Sat Nov 23 13:44:01 2013 by
125
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
- 0.8.7 (ruby-2.0.0).
126
+ 0.8.7.3 (ruby-2.0.0).
127
127
  </div>
128
128
 
129
129
  </body>
data/doc/_index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
- Documentation by YARD 0.8.7
7
+ Documentation by YARD 0.8.7.3
8
8
 
9
9
  </title>
10
10
 
@@ -56,7 +56,7 @@
56
56
 
57
57
  <iframe id="search_frame"></iframe>
58
58
 
59
- <div id="content"><h1 class="noborder title">Documentation by YARD 0.8.7</h1>
59
+ <div id="content"><h1 class="noborder title">Documentation by YARD 0.8.7.3</h1>
60
60
  <div id="listing">
61
61
  <h1 class="alphaindex">Alphabetic Index</h1>
62
62
 
@@ -386,9 +386,9 @@
386
386
  </div>
387
387
 
388
388
  <div id="footer">
389
- Generated on Sun Aug 18 16:37:00 2013 by
389
+ Generated on Sat Nov 23 13:44:01 2013 by
390
390
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
391
- 0.8.7 (ruby-2.0.0).
391
+ 0.8.7.3 (ruby-2.0.0).
392
392
  </div>
393
393
 
394
394
  </body>
data/doc/css/style.css CHANGED
@@ -324,9 +324,9 @@ pre.code .dot + pre.code .id,
324
324
  pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; }
325
325
  pre.code .comment { color: #0066FF; }
326
326
  pre.code .const, pre.code .constant { color: #585CF6; }
327
+ pre.code .label,
327
328
  pre.code .symbol { color: #C5060B; }
328
329
  pre.code .kw,
329
- pre.code .label,
330
330
  pre.code .rubyid_require,
331
331
  pre.code .rubyid_extend,
332
332
  pre.code .rubyid_include { color: #0000FF; }
data/doc/file.README.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.3
10
10
 
11
11
  </title>
12
12
 
@@ -67,7 +67,8 @@
67
67
  <a href="https://gemnasium.com/ShogunPanda/mbrao"><img src="https://gemnasium.com/ShogunPanda/mbrao.png?travis" alt="Dependency Status" /></a>
68
68
  <a href="https://travis-ci.org/ShogunPanda/mbrao"><img src="https://secure.travis-ci.org/ShogunPanda/mbrao.png?branch=master" alt="Build Status" /></a>
69
69
  <a href="https://codeclimate.com/github/ShogunPanda/mbrao"><img src="https://codeclimate.com/github/ShogunPanda/mbrao.png" alt="Code Climate" /></a>
70
- <a href="https://coveralls.io/r/ShogunPanda/mbrao"><img src="https://coveralls.io/repos/ShogunPanda/mbrao/badge.png" alt="Coverage Status" /></a></p>
70
+ <a href="https://coveralls.io/r/ShogunPanda/mbrao"><img src="https://coveralls.io/repos/ShogunPanda/mbrao/badge.png" alt="Coverage Status" /></a>
71
+ <a href="https://bitdeli.com/free" title="Bitdeli Badge"><img src="https://d2weczhvl823v0.cloudfront.net/ShogunPanda/mbrao/trend.png" alt="Bitdeli Trend" /></a></p>
71
72
 
72
73
  <p>A content parser and renderer with embedded metadata support.</p>
73
74
 
@@ -129,9 +130,9 @@ Mbrao::Parser.render(content)
129
130
  </div></div>
130
131
 
131
132
  <div id="footer">
132
- Generated on Sun Aug 18 16:37:00 2013 by
133
+ Generated on Sat Nov 23 13:44:01 2013 by
133
134
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
134
- 0.8.7 (ruby-2.0.0).
135
+ 0.8.7.3 (ruby-2.0.0).
135
136
  </div>
136
137
 
137
138
  </body>
data/doc/frames.html CHANGED
@@ -4,18 +4,16 @@
4
4
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
5
  <head>
6
6
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7
- <title>Documentation by YARD 0.8.7</title>
7
+ <title>Documentation by YARD 0.8.7.3</title>
8
8
  </head>
9
9
  <script type="text/javascript" charset="utf-8">
10
10
  window.onload = function() {
11
- var match = window.location.hash.match(/^#!(.+)/);
12
- var name = 'index.html';
13
- if (match) {
14
- name = unescape(match[1]);
15
- }
11
+ var match = unescape(window.location.hash).match(/^#!(.+)/);
12
+ var name = match ? match[1] : 'index.html';
13
+ name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
16
14
  document.writeln('<frameset cols="20%,*">' +
17
15
  '<frame name="list" src="class_list.html" />' +
18
- '<frame name="main" src="' + name + '" />' +
16
+ '<frame name="main" src="' + escape(name) + '" />' +
19
17
  '</frameset>');
20
18
  }
21
19
  </script>
data/doc/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.3
10
10
 
11
11
  </title>
12
12
 
@@ -67,7 +67,8 @@
67
67
  <a href="https://gemnasium.com/ShogunPanda/mbrao"><img src="https://gemnasium.com/ShogunPanda/mbrao.png?travis" alt="Dependency Status" /></a>
68
68
  <a href="https://travis-ci.org/ShogunPanda/mbrao"><img src="https://secure.travis-ci.org/ShogunPanda/mbrao.png?branch=master" alt="Build Status" /></a>
69
69
  <a href="https://codeclimate.com/github/ShogunPanda/mbrao"><img src="https://codeclimate.com/github/ShogunPanda/mbrao.png" alt="Code Climate" /></a>
70
- <a href="https://coveralls.io/r/ShogunPanda/mbrao"><img src="https://coveralls.io/repos/ShogunPanda/mbrao/badge.png" alt="Coverage Status" /></a></p>
70
+ <a href="https://coveralls.io/r/ShogunPanda/mbrao"><img src="https://coveralls.io/repos/ShogunPanda/mbrao/badge.png" alt="Coverage Status" /></a>
71
+ <a href="https://bitdeli.com/free" title="Bitdeli Badge"><img src="https://d2weczhvl823v0.cloudfront.net/ShogunPanda/mbrao/trend.png" alt="Bitdeli Trend" /></a></p>
71
72
 
72
73
  <p>A content parser and renderer with embedded metadata support.</p>
73
74
 
@@ -129,9 +130,9 @@ Mbrao::Parser.render(content)
129
130
  </div></div>
130
131
 
131
132
  <div id="footer">
132
- Generated on Sun Aug 18 16:37:00 2013 by
133
+ Generated on Sat Nov 23 13:44:01 2013 by
133
134
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
134
- 0.8.7 (ruby-2.0.0).
135
+ 0.8.7.3 (ruby-2.0.0).
135
136
  </div>
136
137
 
137
138
  </body>
data/doc/js/app.js CHANGED
@@ -78,7 +78,12 @@ function framesInit() {
78
78
  if (hasFrames) {
79
79
  document.body.className = 'frames';
80
80
  $('#menu .noframes a').attr('href', document.location);
81
- window.top.document.title = $('html head title').text();
81
+ try {
82
+ window.top.document.title = $('html head title').text();
83
+ } catch(error) {
84
+ // some browsers will not allow this when serving from file://
85
+ // but we don't want to stop the world.
86
+ }
82
87
  }
83
88
  else {
84
89
  $('#menu .noframes a').text('frames').attr('href', framesUrl);
@@ -211,4 +216,4 @@ $(linkSummaries);
211
216
  $(keyboardShortcuts);
212
217
  $(summaryToggle);
213
218
  $(fixOutsideWorldLinks);
214
- $(generateTOC);
219
+ $(generateTOC);
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.3
10
10
 
11
11
  </title>
12
12
 
@@ -103,9 +103,9 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Sun Aug 18 16:37:00 2013 by
106
+ Generated on Sat Nov 23 13:44:01 2013 by
107
107
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
- 0.8.7 (ruby-2.0.0).
108
+ 0.8.7.3 (ruby-2.0.0).
109
109
  </div>
110
110
 
111
111
  </body>
data/lib/mbrao/content.rb CHANGED
@@ -59,7 +59,7 @@ module Mbrao
59
59
  locales = ::Mbrao::Content.validate_locales(locales, self)
60
60
 
61
61
  if attribute.is_a?(HashWithIndifferentAccess) then
62
- rv = attribute.inject(HashWithIndifferentAccess.new) { |hash, pair| append_value_for_locale(hash, pair[0], locales, pair[1]) }
62
+ rv = attribute.reduce(HashWithIndifferentAccess.new) { |hash, pair| append_value_for_locale(hash, pair[0], locales, pair[1]) }
63
63
  rv.keys.length == 1 ? rv.values.first : rv
64
64
  else
65
65
  attribute
@@ -74,7 +74,7 @@ module Mbrao
74
74
  # @param value [Object] The value to add.
75
75
  # @return [Hash] Return the original hash.
76
76
  def append_value_for_locale(hash, locale, locales, value)
77
- locale.split(/\s*,\s*/).collect(&:strip).each do |l|
77
+ locale.split(/\s*,\s*/).map(&:strip).each do |l|
78
78
  hash[l] = value if locales.include?("*") || locales.include?(l)
79
79
  end
80
80
 
@@ -272,7 +272,7 @@ module Mbrao
272
272
  # @param locales [Array] The locales to normalize.
273
273
  # @return [Array] The normalized locales.
274
274
  def self.normalize_locales(locales)
275
- locales.flatten.collect(&:ensure_string).collect(&:strip).uniq
275
+ locales.flatten.map(&:ensure_string).map(&:strip).uniq
276
276
  end
277
277
 
278
278
  # Extracts a date and time from a value.
@@ -78,8 +78,8 @@ module Mbrao
78
78
  # @param tag [Array|String] The tag to sanitize.
79
79
  # @return [Array] Sanitized tags.
80
80
  def sanitize_tags(tag, default = ["---"])
81
- tag = tag.ensure_string.split(/\s*,\s*/).collect(&:strip) if tag && !tag.is_a?(Array)
82
- (tag.present? ? tag : default).slice(0, 2).collect {|t| /#{Regexp.quote(t).gsub("%ARGS%", "\\s*(?<args>[^\\n\\}]+,?)*")}/ }
81
+ tag = tag.ensure_string.split(/\s*,\s*/).map(&:strip) if tag && !tag.is_a?(Array)
82
+ (tag.present? ? tag : default).slice(0, 2).map {|t| /#{Regexp.quote(t).gsub("%ARGS%", "\\s*(?<args>[^\\n\\}]+,?)*")}/ }
83
83
  end
84
84
 
85
85
  # Scans a text and content section.
@@ -152,7 +152,7 @@ module Mbrao
152
152
  # @param locales [Array] The desired locales. Can include `*` to match all.
153
153
  # @return [String|nil] Return the filtered content or `nil` if the content must be hidden.
154
154
  def perform_filter_content(content, locales)
155
- content.collect { |part|
155
+ content.map { |part|
156
156
  part_locales = parse_locales(part[1])
157
157
 
158
158
  if locales_valid?(locales, part_locales) then
@@ -168,9 +168,9 @@ module Mbrao
168
168
  # @param locales [String] The desired locales. Can include `*` to match all. Note that `!*` is ignored.
169
169
  # @return [Hash] An hash with valid and invalid locales.
170
170
  def parse_locales(locales)
171
- types = locales.split(/\s*,\s*/).collect(&:strip).group_by {|l| l !~ /^!/ ? "valid" : "invalid" }
171
+ types = locales.split(/\s*,\s*/).map(&:strip).group_by {|l| l !~ /^!/ ? "valid" : "invalid" }
172
172
  types["valid"] ||= []
173
- types["invalid"] = types.fetch("invalid", []).reject {|l| l == "!*" }.collect {|l| l.gsub(/^!/, "") }
173
+ types["invalid"] = types.fetch("invalid", []).reject {|l| l == "!*" }.map {|l| l.gsub(/^!/, "") }
174
174
  types
175
175
  end
176
176
 
@@ -118,7 +118,7 @@ module Mbrao
118
118
  # @param context [Hash] A context for rendering.
119
119
  # @return [HTML::Pipeline] The pipeline
120
120
  def create_pipeline(options, context)
121
- ::HTML::Pipeline.new(options[:pipeline].collect {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }, options[:pipeline_options].merge(context))
121
+ ::HTML::Pipeline.new(options[:pipeline].map {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }, options[:pipeline_options].merge(context))
122
122
  end
123
123
 
124
124
  # Filters pipeline filters basing on the options provided.
@@ -140,7 +140,7 @@ module Mbrao
140
140
  # @param options [Hash] The options to parse.
141
141
  # @return [Array] The pipeline to process.
142
142
  def get_pipeline(options)
143
- options.fetch(:pipeline, self.default_pipeline.collect(&:first)).collect(&:to_sym)
143
+ options.fetch(:pipeline, self.default_pipeline.map(&:first)).map(&:to_sym)
144
144
  end
145
145
  end
146
146
  end
data/lib/mbrao/version.rb CHANGED
@@ -17,7 +17,7 @@ module Mbrao
17
17
  MINOR = 2
18
18
 
19
19
  # The patch version.
20
- PATCH = 2
20
+ PATCH = 3
21
21
 
22
22
  # The current version of mbrao.
23
23
  STRING = [MAJOR, MINOR, PATCH].compact.join(".")
data/mbrao.gemspec CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
16
16
 
17
17
  gem.authors = ["Shogun"]
18
18
  gem.email = ["shogun@cowtech.it"]
19
+ gem.license = "MIT"
19
20
 
20
21
  gem.files = `git ls-files`.split($\)
21
22
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -24,8 +25,10 @@ Gem::Specification.new do |gem|
24
25
 
25
26
  gem.required_ruby_version = ">= 1.9.3"
26
27
 
27
- gem.add_dependency("lazier", "~> 3.3.3")
28
- gem.add_dependency("html-pipeline", "~> 0.1.0")
29
- gem.add_dependency("slim", "~> 2.0.0")
30
- gem.add_dependency("kramdown", "~> 1.1.0")
28
+ gem.add_dependency("lazier", "~> 3.3.9")
29
+ gem.add_dependency("html-pipeline", "~> 1.1.0")
30
+ gem.add_dependency("slim", "~> 2.0.2")
31
+ gem.add_dependency("kramdown", "~> 1.2.0")
32
+ gem.add_dependency("rinku", "~> 1.7.3")
33
+ gem.add_dependency("gemoji", "~> 1.5.0")
31
34
  end
@@ -5,6 +5,8 @@
5
5
  #
6
6
 
7
7
  require "spec_helper"
8
+ require "action_view"
9
+ require "mbrao/integrations/rails"
8
10
 
9
11
  describe ActionView::Template::Handlers::MbraoTemplate do
10
12
  class DummyTemplate
@@ -105,7 +105,7 @@ EOS4
105
105
 
106
106
  describe "#filter_content" do
107
107
  def parse_content(content)
108
- content.split("\n").collect(&:strip).select {|l| l.present? }
108
+ content.split("\n").map(&:strip).select {|l| l.present? }
109
109
  end
110
110
 
111
111
  it "should return the original content if locales contains *" do
@@ -27,7 +27,7 @@ describe Mbrao::RenderingEngines::HtmlPipeline do
27
27
  end
28
28
 
29
29
  it "should have default options" do
30
- filters = [:kramdown, :table_of_contents, :autolink, :emoji, :image_max_width].collect {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
30
+ filters = [:kramdown, :table_of_contents, :autolink, :emoji, :image_max_width].map {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
31
31
  expect(::HTML::Pipeline).to receive(:new).with(filters, {gfm: true, asset_root: "/"}).and_call_original
32
32
  reference.render("CONTENT")
33
33
  end
@@ -38,23 +38,23 @@ describe Mbrao::RenderingEngines::HtmlPipeline do
38
38
  end
39
39
 
40
40
  it "should restrict filter used" do
41
- filters = [:table_of_contents, :autolink, :emoji, :image_max_width].collect {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
41
+ filters = [:table_of_contents, :autolink, :emoji, :image_max_width].map {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
42
42
  expect(::HTML::Pipeline).to receive(:new).with(filters, an_instance_of(Hash)).and_call_original
43
43
  reference.render("CONTENT", {kramdown: false})
44
44
 
45
- filters = [:kramdown, :autolink, :emoji, :image_max_width].collect {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
45
+ filters = [:kramdown, :autolink, :emoji, :image_max_width].map {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
46
46
  expect(::HTML::Pipeline).to receive(:new).with(filters, an_instance_of(Hash)).and_call_original
47
47
  reference.render("CONTENT", {toc: false})
48
48
 
49
- filters = [:kramdown, :table_of_contents, :emoji, :image_max_width].collect {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
49
+ filters = [:kramdown, :table_of_contents, :emoji, :image_max_width].map {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
50
50
  expect(::HTML::Pipeline).to receive(:new).with(filters, an_instance_of(Hash)).and_call_original
51
51
  reference.render("CONTENT", {links: false})
52
52
 
53
- filters = [:kramdown, :table_of_contents, :autolink, :image_max_width].collect {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
53
+ filters = [:kramdown, :table_of_contents, :autolink, :image_max_width].map {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
54
54
  expect(::HTML::Pipeline).to receive(:new).with(filters, an_instance_of(Hash)).and_call_original
55
55
  reference.render("CONTENT", {emoji: false})
56
56
 
57
- filters = [:kramdown, :table_of_contents, :autolink, :emoji].collect {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
57
+ filters = [:kramdown, :table_of_contents, :autolink, :emoji].map {|f| ::Lazier.find_class(f, "::HTML::Pipeline::%CLASS%Filter", true) }
58
58
  expect(::HTML::Pipeline).to receive(:new).with(filters, an_instance_of(Hash)).and_call_original
59
59
  reference.render("CONTENT", {image_max_width: false})
60
60
  end