brakeman 3.3.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (350) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +11 -0
  3. data/README.md +3 -2
  4. data/bundle/load.rb +4 -4
  5. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/History.txt +7 -0
  6. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/Manifest.txt +0 -0
  7. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/README.txt +0 -0
  8. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/Rakefile +0 -0
  9. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/bin/ruby_parse +0 -0
  10. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/bin/ruby_parse_extract_error +0 -0
  11. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby18_parser.rb +1 -1
  12. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby18_parser.y +0 -0
  13. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby19_parser.rb +1 -1
  14. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby19_parser.y +0 -0
  15. data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.2/lib/ruby20_parser.rb +6728 -0
  16. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby20_parser.y +33 -24
  17. data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.2/lib/ruby21_parser.rb +6766 -0
  18. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby21_parser.y +33 -24
  19. data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.2/lib/ruby22_parser.rb +6811 -0
  20. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby22_parser.y +33 -24
  21. data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.2/lib/ruby23_parser.rb +6817 -0
  22. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby23_parser.y +34 -55
  23. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_lexer.rb +0 -0
  24. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_lexer.rex +0 -0
  25. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_lexer.rex.rb +0 -0
  26. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_parser.rb +0 -0
  27. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_parser.yy +36 -69
  28. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_parser_extras.rb +43 -3
  29. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/test/test_ruby_lexer.rb +0 -0
  30. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/test/test_ruby_parser.rb +42 -1
  31. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/test/test_ruby_parser_extras.rb +0 -0
  32. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/CHANGES +5 -0
  33. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/Gemfile +0 -0
  34. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/LICENSE +0 -0
  35. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/README.jp.md +36 -11
  36. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/README.md +44 -19
  37. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/Rakefile +0 -0
  38. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/context.rb +0 -0
  39. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/profile-parser.rb +0 -0
  40. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/profile-render.rb +0 -0
  41. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/run-benchmarks.rb +41 -34
  42. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/run-diffbench.rb +0 -0
  43. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/view.erb +0 -0
  44. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/view.haml +0 -0
  45. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/view.slim +0 -0
  46. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/bin/slimrb +0 -0
  47. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/include.md +0 -0
  48. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/jp/include.md +0 -0
  49. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/jp/logic_less.md +0 -0
  50. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/jp/smart.md +0 -0
  51. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/jp/translator.md +0 -0
  52. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/logic_less.md +1 -1
  53. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/smart.md +0 -0
  54. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/translator.md +0 -0
  55. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim.rb +0 -0
  56. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/code_attributes.rb +0 -0
  57. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/command.rb +0 -0
  58. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/controls.rb +0 -0
  59. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/do_inserter.rb +0 -0
  60. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/embedded.rb +0 -0
  61. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/end_inserter.rb +1 -1
  62. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/engine.rb +1 -3
  63. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/erb_converter.rb +0 -0
  64. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/filter.rb +0 -0
  65. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/grammar.rb +0 -0
  66. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/include.rb +0 -0
  67. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/interpolation.rb +0 -0
  68. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/logic_less.rb +0 -0
  69. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/logic_less/context.rb +0 -0
  70. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/logic_less/filter.rb +0 -0
  71. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/parser.rb +22 -12
  72. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/smart.rb +0 -0
  73. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/smart/escaper.rb +1 -1
  74. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/smart/filter.rb +0 -0
  75. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/smart/parser.rb +0 -0
  76. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/splat/builder.rb +0 -0
  77. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/splat/filter.rb +0 -0
  78. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/template.rb +0 -0
  79. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/translator.rb +0 -0
  80. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/version.rb +1 -1
  81. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/slim.gemspec +1 -1
  82. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/helper.rb +0 -0
  83. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_code_blocks.rb +0 -0
  84. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_code_escaping.rb +0 -0
  85. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_code_evaluation.rb +0 -0
  86. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_code_output.rb +0 -0
  87. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_code_structure.rb +18 -0
  88. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_commands.rb +0 -0
  89. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_embedded_engines.rb +0 -0
  90. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_encoding.rb +0 -0
  91. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_erb_converter.rb +0 -0
  92. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_html_attributes.rb +0 -0
  93. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_html_escaping.rb +0 -0
  94. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_html_structure.rb +16 -0
  95. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_parser_errors.rb +0 -0
  96. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_pretty.rb +0 -0
  97. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_ruby_errors.rb +0 -0
  98. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_slim_template.rb +0 -0
  99. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_tabs.rb +0 -0
  100. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_text_interpolation.rb +0 -0
  101. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_thread_options.rb +0 -0
  102. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_unicode.rb +0 -0
  103. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/include/files/recursive.slim +0 -0
  104. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/include/files/slimfile.slim +0 -0
  105. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/include/files/subdir/test.slim +0 -0
  106. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/include/files/textfile +0 -0
  107. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/include/test_include.rb +0 -0
  108. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/literate/TESTS.md +0 -0
  109. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/literate/helper.rb +0 -0
  110. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/literate/run.rb +0 -0
  111. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/logic_less/test_logic_less.rb +0 -0
  112. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/Rakefile +0 -0
  113. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/controllers/application_controller.rb +0 -0
  114. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/controllers/entries_controller.rb +0 -0
  115. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/controllers/slim_controller.rb +0 -0
  116. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/helpers/application_helper.rb +0 -0
  117. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/models/entry.rb +0 -0
  118. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/entries/edit.html.slim +0 -0
  119. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/layouts/application.html.slim +0 -0
  120. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/_partial.html.slim +0 -0
  121. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/content_for.html.slim +0 -0
  122. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/erb.html.erb +0 -0
  123. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/form_for.html.slim +0 -0
  124. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/helper.html.slim +0 -0
  125. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/integers.html.slim +0 -0
  126. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/no_layout.html.slim +0 -0
  127. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/normal.html.slim +0 -0
  128. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/partial.html.slim +0 -0
  129. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/splat.html.slim +0 -0
  130. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/thread_options.html.slim +0 -0
  131. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/variables.html.slim +0 -0
  132. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/xml.slim +0 -0
  133. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config.ru +0 -0
  134. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/application.rb +0 -0
  135. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/boot.rb +0 -0
  136. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/environment.rb +0 -0
  137. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/environments/test.rb +0 -0
  138. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/initializers/backtrace_silencers.rb +0 -0
  139. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/initializers/inflections.rb +0 -0
  140. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/initializers/mime_types.rb +0 -0
  141. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/initializers/secret_token.rb +0 -0
  142. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/initializers/session_store.rb +0 -0
  143. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/locales/en.yml +0 -0
  144. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/routes.rb +0 -0
  145. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/script/rails +0 -0
  146. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/test/helper.rb +0 -0
  147. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/test/test_slim.rb +0 -0
  148. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/smart/test_smart_text.rb +6 -6
  149. data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/translator/test_translator.rb +0 -0
  150. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/CHANGES +5 -0
  151. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/EXPRESSIONS.md +0 -0
  152. data/bundle/ruby/2.3.0/gems/temple-0.7.7/Gemfile +3 -0
  153. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/LICENSE +0 -0
  154. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/README.md +0 -0
  155. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/Rakefile +0 -0
  156. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple.rb +2 -0
  157. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/engine.rb +0 -0
  158. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/erb/engine.rb +0 -0
  159. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/erb/parser.rb +0 -0
  160. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/erb/template.rb +0 -0
  161. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/erb/trimming.rb +0 -0
  162. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/exceptions.rb +0 -0
  163. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filter.rb +0 -0
  164. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/code_merger.rb +0 -0
  165. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/control_flow.rb +0 -0
  166. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/dynamic_inliner.rb +0 -0
  167. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/encoding.rb +0 -0
  168. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/eraser.rb +0 -0
  169. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/escapable.rb +0 -0
  170. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/multi_flattener.rb +0 -0
  171. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/remove_bom.rb +1 -1
  172. data/bundle/ruby/2.3.0/gems/temple-0.7.7/lib/temple/filters/static_analyzer.rb +87 -0
  173. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/static_merger.rb +0 -0
  174. data/bundle/ruby/2.3.0/gems/temple-0.7.7/lib/temple/filters/string_splitter.rb +130 -0
  175. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/validator.rb +0 -0
  176. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generator.rb +1 -1
  177. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generators/array.rb +0 -0
  178. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generators/array_buffer.rb +3 -2
  179. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generators/erb.rb +1 -1
  180. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generators/rails_output_buffer.rb +1 -1
  181. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generators/string_buffer.rb +0 -0
  182. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/grammar.rb +0 -0
  183. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/attribute_merger.rb +5 -10
  184. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/attribute_remover.rb +0 -0
  185. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/attribute_sorter.rb +0 -0
  186. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/dispatcher.rb +0 -0
  187. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/fast.rb +0 -0
  188. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/filter.rb +0 -0
  189. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/pretty.rb +2 -2
  190. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/safe.rb +0 -0
  191. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/map.rb +0 -0
  192. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/mixins/dispatcher.rb +8 -6
  193. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/mixins/engine_dsl.rb +0 -0
  194. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/mixins/grammar_dsl.rb +0 -0
  195. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/mixins/options.rb +0 -0
  196. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/mixins/template.rb +0 -0
  197. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/parser.rb +0 -0
  198. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/templates.rb +0 -0
  199. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/templates/rails.rb +0 -0
  200. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/templates/tilt.rb +0 -0
  201. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/utils.rb +15 -4
  202. data/bundle/ruby/2.3.0/gems/temple-0.7.7/lib/temple/version.rb +3 -0
  203. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/temple.gemspec +0 -0
  204. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_code_merger.rb +0 -0
  205. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_control_flow.rb +0 -0
  206. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_dynamic_inliner.rb +0 -0
  207. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_eraser.rb +0 -0
  208. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_escapable.rb +0 -0
  209. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_multi_flattener.rb +0 -0
  210. data/bundle/ruby/2.3.0/gems/temple-0.7.7/test/filters/test_static_analyzer.rb +23 -0
  211. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_static_merger.rb +0 -0
  212. data/bundle/ruby/2.3.0/gems/temple-0.7.7/test/filters/test_string_splitter.rb +18 -0
  213. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/helper.rb +0 -0
  214. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/html/test_attribute_merger.rb +0 -0
  215. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/html/test_attribute_remover.rb +0 -0
  216. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/html/test_attribute_sorter.rb +0 -0
  217. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/html/test_fast.rb +0 -0
  218. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/html/test_pretty.rb +0 -0
  219. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/mixins/test_dispatcher.rb +0 -0
  220. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/mixins/test_grammar_dsl.rb +0 -0
  221. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_engine.rb +0 -0
  222. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_erb.rb +0 -0
  223. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_filter.rb +0 -0
  224. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_generator.rb +4 -4
  225. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_grammar.rb +0 -0
  226. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_map.rb +0 -0
  227. data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_utils.rb +0 -0
  228. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/CHANGELOG.md +17 -0
  229. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/COPYING +1 -1
  230. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/Gemfile +3 -0
  231. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/HACKING +0 -0
  232. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/README.md +3 -0
  233. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/Rakefile +0 -0
  234. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/bin/tilt +0 -0
  235. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/docs/TEMPLATES.md +34 -4
  236. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/docs/common.css +0 -0
  237. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt.rb +10 -6
  238. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/asciidoc.rb +0 -0
  239. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/babel.rb +2 -1
  240. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/bluecloth.rb +0 -0
  241. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/builder.rb +12 -8
  242. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/coffee.rb +0 -0
  243. data/bundle/ruby/2.3.0/gems/tilt-2.0.5/lib/tilt/commonmarker.rb +21 -0
  244. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/creole.rb +0 -0
  245. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/csv.rb +0 -0
  246. data/bundle/ruby/2.3.0/gems/tilt-2.0.5/lib/tilt/dummy.rb +3 -0
  247. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/erb.rb +0 -0
  248. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/erubis.rb +1 -1
  249. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/etanni.rb +0 -0
  250. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/haml.rb +0 -0
  251. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/kramdown.rb +0 -0
  252. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/less.rb +0 -0
  253. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/liquid.rb +0 -0
  254. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/mapping.rb +37 -9
  255. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/markaby.rb +0 -0
  256. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/maruku.rb +0 -0
  257. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/nokogiri.rb +0 -0
  258. data/bundle/ruby/2.3.0/gems/tilt-2.0.5/lib/tilt/pandoc.rb +49 -0
  259. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/plain.rb +0 -0
  260. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/prawn.rb +0 -0
  261. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/radius.rb +0 -0
  262. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/rdiscount.rb +0 -0
  263. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/rdoc.rb +0 -0
  264. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/redcarpet.rb +0 -0
  265. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/redcloth.rb +0 -0
  266. data/bundle/ruby/2.3.0/gems/tilt-2.0.5/lib/tilt/rst-pandoc.rb +18 -0
  267. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/sass.rb +0 -0
  268. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/string.rb +1 -1
  269. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/template.rb +6 -3
  270. data/bundle/ruby/2.3.0/gems/tilt-2.0.5/lib/tilt/typescript.rb +26 -0
  271. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/wikicloth.rb +0 -0
  272. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/yajl.rb +0 -0
  273. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/man/index.txt +0 -0
  274. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/man/tilt.1.ronn +0 -0
  275. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/locals.mab +0 -0
  276. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/markaby.mab +0 -0
  277. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/markaby_other_static.mab +0 -0
  278. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/render_twice.mab +0 -0
  279. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/scope.mab +0 -0
  280. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/yielding.mab +0 -0
  281. data/bundle/ruby/2.3.0/gems/tilt-2.0.5/test/mytemplate.rb +2 -0
  282. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/test_helper.rb +0 -0
  283. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_asciidoctor_test.rb +0 -0
  284. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_babeltemplate.rb +0 -0
  285. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_blueclothtemplate_test.rb +0 -0
  286. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_buildertemplate_test.rb +13 -0
  287. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_cache_test.rb +0 -0
  288. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_coffeescripttemplate_test.rb +0 -0
  289. data/bundle/ruby/2.3.0/gems/tilt-2.0.5/test/tilt_commonmarkertemplate_test.rb +20 -0
  290. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_compilesite_test.rb +0 -0
  291. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_creoletemplate_test.rb +0 -0
  292. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_csv_test.rb +0 -0
  293. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_erbtemplate_test.rb +0 -0
  294. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_erubistemplate_test.rb +0 -0
  295. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_etannitemplate_test.rb +0 -0
  296. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_hamltemplate_test.rb +0 -0
  297. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_kramdown_test.rb +0 -0
  298. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_lesstemplate_test.less +0 -0
  299. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_lesstemplate_test.rb +0 -0
  300. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_liquidtemplate_test.rb +0 -0
  301. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_mapping_test.rb +17 -14
  302. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_markaby_test.rb +0 -0
  303. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_markdown_test.rb +9 -0
  304. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_marukutemplate_test.rb +0 -0
  305. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_metadata_test.rb +0 -0
  306. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_nokogiritemplate_test.rb +0 -0
  307. data/bundle/ruby/2.3.0/gems/tilt-2.0.5/test/tilt_pandoctemplate_test.rb +67 -0
  308. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_prawntemplate.prawn +0 -0
  309. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_prawntemplate_test.rb +0 -0
  310. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_radiustemplate_test.rb +0 -0
  311. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_rdiscounttemplate_test.rb +0 -0
  312. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_rdoctemplate_test.rb +0 -0
  313. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_redcarpettemplate_test.rb +0 -0
  314. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_redclothtemplate_test.rb +0 -0
  315. data/bundle/ruby/2.3.0/gems/tilt-2.0.5/test/tilt_rstpandoctemplate_test.rb +32 -0
  316. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_sasstemplate_test.rb +0 -0
  317. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_stringtemplate_test.rb +0 -0
  318. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_template_test.rb +0 -0
  319. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_test.rb +0 -0
  320. data/bundle/ruby/2.3.0/gems/tilt-2.0.5/test/tilt_typescript_test.rb +34 -0
  321. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_wikiclothtemplate_test.rb +0 -0
  322. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_yajltemplate_test.rb +0 -0
  323. data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/tilt.gemspec +12 -2
  324. data/lib/brakeman.rb +21 -12
  325. data/lib/brakeman/checks/check_sql.rb +3 -3
  326. data/lib/brakeman/checks/check_validation_regex.rb +31 -3
  327. data/lib/brakeman/options.rb +4 -0
  328. data/lib/brakeman/parsers/rails3_erubis.rb +43 -23
  329. data/lib/brakeman/processors/alias_processor.rb +5 -0
  330. data/lib/brakeman/processors/base_processor.rb +2 -8
  331. data/lib/brakeman/processors/erb_template_processor.rb +1 -5
  332. data/lib/brakeman/processors/erubis_template_processor.rb +16 -10
  333. data/lib/brakeman/processors/haml_template_processor.rb +4 -2
  334. data/lib/brakeman/processors/lib/basic_processor.rb +2 -16
  335. data/lib/brakeman/processors/lib/safe_call_helper.rb +16 -0
  336. data/lib/brakeman/processors/output_processor.rb +1 -1
  337. data/lib/brakeman/processors/slim_template_processor.rb +1 -5
  338. data/lib/brakeman/processors/template_processor.rb +19 -0
  339. data/lib/brakeman/rescanner.rb +2 -1
  340. data/lib/brakeman/scanner.rb +2 -4
  341. data/lib/brakeman/tracker.rb +0 -9
  342. data/lib/brakeman/tracker/collection.rb +4 -0
  343. data/lib/brakeman/version.rb +1 -1
  344. metadata +322 -307
  345. data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.1/lib/ruby20_parser.rb +0 -6723
  346. data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.1/lib/ruby21_parser.rb +0 -6764
  347. data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.1/lib/ruby22_parser.rb +0 -6804
  348. data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.1/lib/ruby23_parser.rb +0 -6905
  349. data/bundle/ruby/2.3.0/gems/temple-0.7.6/Gemfile +0 -3
  350. data/bundle/ruby/2.3.0/gems/temple-0.7.6/lib/temple/version.rb +0 -3
@@ -1401,6 +1401,19 @@ module TestRubyParserShared
1401
1401
  assert_parse rb, pt
1402
1402
  end
1403
1403
 
1404
+ def test_qwords_line_breaks
1405
+ skip "not yet"
1406
+
1407
+ rb = "%w(\na\nb\n)\n1"
1408
+ pt = s(:block,
1409
+ s(:array,
1410
+ s(:str, "a").line(2),
1411
+ s(:str, "b").line(3)).line(1),
1412
+ s(:lit, 1).line(5))
1413
+
1414
+ assert_parse rb, pt
1415
+ end
1416
+
1404
1417
  def test_qWords_space
1405
1418
  rb = "%W( )"
1406
1419
  pt = s(:array)
@@ -2196,6 +2209,13 @@ module TestRubyParserShared20to22
2196
2209
  assert_parse rb, pt
2197
2210
  end
2198
2211
 
2212
+ def test_dstr_lex_state
2213
+ rb = '"#{p:a}"'
2214
+ pt = s(:dstr, "", s(:evstr, s(:call, nil, :p, s(:lit, :a))))
2215
+
2216
+ assert_parse rb, pt
2217
+ end
2218
+
2199
2219
  def test_call_arg_kwsplat
2200
2220
  rb = "a(b, **1)"
2201
2221
  pt = s(:call, nil, :a, s(:call, nil, :b), s(:hash, s(:kwsplat, s(:lit, 1))))
@@ -3429,6 +3449,13 @@ class TestRuby23Parser < RubyParserTestCase
3429
3449
  assert_parse rb, pt
3430
3450
  end
3431
3451
 
3452
+ def test_safe_call_rhs_newline
3453
+ rb = "c = a&.b\n"
3454
+ pt = s(:lasgn, :c, s(:safe_call, s(:call, nil, :a), :b))
3455
+
3456
+ assert_parse rb, pt
3457
+ end
3458
+
3432
3459
  def test_safe_calls
3433
3460
  rb = "a&.b&.c(1)"
3434
3461
  pt = s(:safe_call, s(:safe_call, s(:call, nil, :a), :b), :c, s(:lit, 1))
@@ -3459,7 +3486,21 @@ class TestRuby23Parser < RubyParserTestCase
3459
3486
 
3460
3487
  def test_safe_call_operator
3461
3488
  rb = "a&.> 1"
3462
- pt = s(:safe_call, s(:call, nil, :a), :>, s(:lit, 1))
3489
+ pt = s(:safe_call, s(:call, nil, :a), :>, s(:lit, 1)).line(1)
3490
+
3491
+ assert_parse rb, pt
3492
+ end
3493
+
3494
+ def test_safe_op_asgn
3495
+ rb = "a&.b += x 1\n"
3496
+ pt = s(:safe_op_asgn, s(:call, nil, :a), s(:call, nil, :x, s(:lit, 1)), :b, :+).line(1)
3497
+
3498
+ assert_parse rb, pt
3499
+ end
3500
+
3501
+ def test_safe_op_asgn2
3502
+ rb = "a&.b ||=\nx;"
3503
+ pt = s(:safe_op_asgn2, s(:call, nil, :a), :b=, :"||", s(:call, nil, :x)).line(1)
3463
3504
 
3464
3505
  assert_parse rb, pt
3465
3506
  end
@@ -1,3 +1,8 @@
1
+ 3.0.7 (2016-05-22)
2
+
3
+ * Add additional attributes feature to shortcuts
4
+ * Freeze string literals
5
+
1
6
  3.0.6 (2015-06-05)
2
7
 
3
8
  * Fix warnings #625
@@ -1,6 +1,6 @@
1
1
  # Slim
2
2
 
3
- [![Gem Version](https://img.shields.io/gem/v/slim.svg)](http://rubygems.org/gems/slim) [![Build Status](https://img.shields.io/travis/slim-template/slim.svg?branch=master)](http://travis-ci.org/slim-template/slim) [![Dependency Status](https://img.shields.io/gemnasium/slim-template/slim.svg?travis)](https://gemnasium.com/slim-template/slim) [![Code Climate](https://img.shields.io/codeclimate/github/slim-template/slim.svg)](https://codeclimate.com/github/slim-template/slim) [![Gittip donate button](https://img.shields.io/gratipay/bevry.svg)](https://www.gittip.com/min4d/ "Donate weekly to this project using Gittip")
3
+ [![Gem Version](https://img.shields.io/gem/v/slim.svg)](http://rubygems.org/gems/slim) [![Build Status](https://img.shields.io/travis/slim-template/slim.svg?branch=master)](http://travis-ci.org/slim-template/slim) [![Dependency Status](https://img.shields.io/gemnasium/slim-template/slim.svg?travis)](https://gemnasium.com/slim-template/slim) [![Code Climate](https://codeclimate.com/github/slim-template/slim/badges/gpa.svg)](https://codeclimate.com/github/slim-template/slim) [![Test Coverage](https://codeclimate.com/github/slim-template/slim/badges/coverage.svg)](https://codeclimate.com/github/slim-template/slim/coverage) [![Gittip donate button](https://img.shields.io/gratipay/bevry.svg)](https://www.gittip.com/min4d/ "Donate weekly to this project using Gittip")
4
4
  [![Flattr donate button](https://raw.github.com/balupton/flattr-buttons/master/badge-89x18.gif)](https://flattr.com/submit/auto?user_id=min4d&url=http%3A%2F%2Fslim-lang.org%2F "Donate monthly to this project using Flattr")
5
5
 
6
6
  Slim は 不可解にならないように view の構文を本質的な部品まで減らすことを目指したテンプレート言語です。標準的な HTML テンプレートからどれだけのものが削除できるか確かめるところから始まりました。(<, >, 閉じタグなど) 多くの人が Slim に興味を持ったことで, 機能性は発展し, 柔軟な構文をもたらしました。
@@ -238,7 +238,7 @@ html コメントにはスラッシュの直後にエクスクラメーション
238
238
  p もっといいブラウザを使ってください。
239
239
  ~~~
240
240
 
241
- レンダリング結果
241
+ レンダリング結果:
242
242
 
243
243
  ~~~ html
244
244
  <!--[if IE]><p>もっといいブラウザを使ってください。</p><![endif]-->
@@ -246,9 +246,9 @@ html コメントにはスラッシュの直後にエクスクラメーション
246
246
 
247
247
  ## HTML タグ
248
248
 
249
- ### ドキュメントタイプタグ
249
+ # <!DOCTYPE> 宣言
250
250
 
251
- ドキュメントタイプタグはとても簡単な方法で複雑なドキュメントタイプを生成するために使われる特別なタグです。
251
+ doctype はとても簡単な方法で複雑なドキュメントタイプを生成するために使われる特別なキーワードです。
252
252
 
253
253
  XML 宣言
254
254
 
@@ -513,7 +513,7 @@ input type="text" disabled=nil
513
513
  a.menu class="highlight" href="http://slim-lang.com/" Slim-lang.com
514
514
  ~~~
515
515
 
516
- レンダリング結果
516
+ レンダリング結果:
517
517
 
518
518
  ~~~ html
519
519
  <a class="menu highlight" href="http://slim-lang.com/">Slim-lang.com</a>
@@ -534,7 +534,7 @@ a class=:menu,:highlight
534
534
  .card*{'data-url'=>place_path(place), 'data-id'=>place.id} = place.name
535
535
  ~~~
536
536
 
537
- レンダリング結果
537
+ レンダリング結果:
538
538
 
539
539
  ~~~ html
540
540
  <div class="card" data-id="1234" data-url="/place/1234">Slim の家</div>
@@ -575,7 +575,7 @@ ruby:
575
575
  *a_unless_current リンク
576
576
  ~~~
577
577
 
578
- レンダリング結果
578
+ レンダリング結果:
579
579
 
580
580
  ~~~ html
581
581
  <span>リンク</span><a href="http://slim-lang.com/">リンク</a>
@@ -585,7 +585,7 @@ ruby:
585
585
 
586
586
  #### タグショートカット
587
587
 
588
- `:shortcut` オプションを設定することで独自のタグショートカットを定義できます。
588
+ `:shortcut` オプションを設定することで独自のタグショートカットを定義できます。Rails アプリケーションでは, `config/initializers/slim.rb` のようにイニシャライザに定義します。Sinatra アプリでは, `require 'slim'` が書かれた下であればどこにでも設定を定義することができます。
589
589
 
590
590
  ~~~ ruby
591
591
  Slim::Engine.set_options shortcut: {'c' => {tag: 'container'}, '#' => {attr: 'id'}, '.' => {attr: 'class'} }
@@ -665,6 +665,29 @@ Slim の中で次のように使用し
665
665
  <div class="person" role="admin" data-role="admin">Daniel</div>
666
666
  ~~~
667
667
 
668
+ 次のように追加の属性固定値を設定することもできます。
669
+
670
+ ~~~ ruby
671
+ Slim::Engine.set_options shortcut: {'^' => {tag: 'script', attr: 'data-binding',
672
+ additional_attrs: { type: "text/javascript" }}}
673
+ ~~~
674
+
675
+ このように使用します。
676
+
677
+ ~~~ slim
678
+ ^products
679
+ == @products.to_json
680
+ ~~~
681
+
682
+ レンダリング結果です。
683
+
684
+ ~~~ html
685
+ <script data-binding="products" type="text/javascript">
686
+ [{"name": "product1", "price": "$100"},
687
+ {"name": "prodcut2", "price": "$200"}]
688
+ </script>
689
+ ~~~
690
+
668
691
  #### ID ショートカット `#` と class ショートカット `.`
669
692
 
670
693
  `id` と `class` の属性を次のショートカットで指定できます。
@@ -754,7 +777,7 @@ end
754
777
  = captured_content
755
778
  ~~~
756
779
 
757
- 別の興味深いユースケースは、enumerableを使いそれぞれの要素をキャプチャすることです。ヘルパは、このようになります。
780
+ 別の興味深いユースケースは, enumerableを使いそれぞれの要素をキャプチャすることです。ヘルパは, このようになります。
758
781
 
759
782
  ~~~ ruby
760
783
  module Capture
@@ -766,7 +789,7 @@ module Capture
766
789
  end
767
790
  ~~~
768
791
 
769
- そして、次のように使用出来ます。
792
+ そして, 次のように使用出来ます。
770
793
 
771
794
  ~~~ slim
772
795
  - links = { 'http://slim-lang.com' => 'The Slim Template Language' }
@@ -774,7 +797,7 @@ end
774
797
  a href=url = text
775
798
  ~~~
776
799
 
777
- その後は、`link_list`はキャプチャしたコンテンツを含みます。
800
+ その後は, `link_list`はキャプチャしたコンテンツを含みます。
778
801
 
779
802
  ### インクルードヘルパ
780
803
 
@@ -1080,6 +1103,7 @@ markdown:
1080
1103
  * [Textmate / Sublime Text](https://github.com/slim-template/ruby-slim.tmbundle)
1081
1104
  * [Espresso text editor](https://github.com/slim-template/Slim-Sugar)
1082
1105
  * [Coda](https://github.com/slim-template/Coda-2-Slim.mode)
1106
+ * [Atom](https://github.com/slim-template/language-slim)
1083
1107
 
1084
1108
  ### テンプレート変換 (HAML, ERB, ...)
1085
1109
 
@@ -1181,6 +1205,7 @@ Slim は [MIT license](http://www.opensource.org/licenses/MIT) に基づいて
1181
1205
  静的コード解析:
1182
1206
 
1183
1207
  * [Slim-Lint](https://github.com/sds/slim-lint)
1208
+ * [SublimeLinter-slim-lint](https://github.com/elstgav/SublimeLinter-slim-lint)
1184
1209
 
1185
1210
  テンプレート変換 (HAML, ERB, ...):
1186
1211
 
@@ -1,6 +1,6 @@
1
1
  # Slim
2
2
 
3
- [![Gem Version](https://img.shields.io/gem/v/slim.svg)](http://rubygems.org/gems/slim) [![Build Status](https://img.shields.io/travis/slim-template/slim.svg?branch=master)](http://travis-ci.org/slim-template/slim) [![Dependency Status](https://img.shields.io/gemnasium/slim-template/slim.svg?travis)](https://gemnasium.com/slim-template/slim) [![Code Climate](https://img.shields.io/codeclimate/github/slim-template/slim.svg)](https://codeclimate.com/github/slim-template/slim) [![Gittip donate button](https://img.shields.io/gratipay/bevry.svg)](https://www.gittip.com/min4d/ "Donate weekly to this project using Gittip")
3
+ [![Gem Version](https://img.shields.io/gem/v/slim.svg)](http://rubygems.org/gems/slim) [![Build Status](https://img.shields.io/travis/slim-template/slim.svg?branch=master)](http://travis-ci.org/slim-template/slim) [![Dependency Status](https://img.shields.io/gemnasium/slim-template/slim.svg?travis)](https://gemnasium.com/slim-template/slim) [![Code Climate](https://codeclimate.com/github/slim-template/slim/badges/gpa.svg)](https://codeclimate.com/github/slim-template/slim) [![Test Coverage](https://codeclimate.com/github/slim-template/slim/badges/coverage.svg)](https://codeclimate.com/github/slim-template/slim/coverage) [![Gittip donate button](https://img.shields.io/gratipay/bevry.svg)](https://www.gittip.com/min4d/ "Donate weekly to this project using Gittip")
4
4
  [![Flattr donate button](https://raw.github.com/balupton/flattr-buttons/master/badge-89x18.gif)](https://flattr.com/submit/auto?user_id=min4d&url=http%3A%2F%2Fslim-lang.org%2F "Donate monthly to this project using Flattr")
5
5
 
6
6
  Slim is a template language whose goal is to reduce the view syntax to the essential parts without becoming cryptic. It started as an exercise to see how much could be removed from a standard html template (<, >, closing tags, etc...). As more people took an interest in Slim, the functionality grew and so did the flexibility of the syntax.
@@ -189,7 +189,7 @@ body
189
189
 
190
190
  ### Output `=`
191
191
 
192
- The equal sign tells Slim it's a Ruby call that produces output to add to the buffer. If your ruby code needs to use multiple lines, append a backslash `\` at the end of the lines, for example:
192
+ The equals sign tells Slim it's a Ruby call that produces output to add to the buffer. If your ruby code needs to use multiple lines, append a backslash `\` at the end of the lines. For example:
193
193
 
194
194
  ~~~ slim
195
195
  = javascript_include_tag \
@@ -199,15 +199,15 @@ The equal sign tells Slim it's a Ruby call that produces output to add to the bu
199
199
 
200
200
  If your line ends with comma `,` (e.g because of a method call) you don't need the additional backslash before the linebreak. For trailing or leading whitespace the modifiers `>` and `<` are supported.
201
201
 
202
- * Output with trailing white space `=>`. Same as the single equal sign (`=`), except that it adds a trailing white space.
203
- * Output with leading white space `=<`. Same as the single equal sign (`=`), except that it adds a leading white space.
202
+ * Output with trailing white space `=>`. Same as the single equals sign (`=`), except that it adds a trailing white space.
203
+ * Output with leading white space `=<`. Same as the single equals sign (`=`), except that it adds a leading white space.
204
204
 
205
205
  ### Output without HTML escaping `==`
206
206
 
207
- Same as the single equal sign (`=`), but does not go through the `escape_html` method. For trailing or leading whitespace the modifiers `>` and `<` are supported.
207
+ Same as the single equals sign (`=`), but does not go through the `escape_html` method. For trailing or leading whitespace the modifiers `>` and `<` are supported.
208
208
 
209
- * Output without HTML escaping and trailing white space `==>`. Same as the double equal sign (`==`), except that it adds a trailing white space.
210
- * Output without HTML escaping and leading white space `==<`. Same as the double equal sign (`==`), except that it adds a leading white space.
209
+ * Output without HTML escaping and trailing white space `==>`. Same as the double equals sign (`==`), except that it adds a trailing white space.
210
+ * Output without HTML escaping and leading white space `==<`. Same as the double equals sign (`==`), except that it adds a leading white space.
211
211
 
212
212
  ### Code comment `/`
213
213
 
@@ -238,7 +238,7 @@ Use the forward slash immediately followed by an exclamation mark for html comme
238
238
  p Get a better browser.
239
239
  ~~~
240
240
 
241
- renders as
241
+ This renders as:
242
242
 
243
243
  ~~~ html
244
244
  <!--[if IE]><p>Get a better browser.</p><![endif]-->
@@ -246,9 +246,9 @@ renders as
246
246
 
247
247
  ## HTML tags
248
248
 
249
- ### Doctype tag
249
+ ### <!DOCTYPE> declaration
250
250
 
251
- The doctype tag is a special tag which can be used to generate the complex doctypes in a very simple way.
251
+ The doctype keyword can be used to generate the complex doctypes in a very simple manner.
252
252
 
253
253
  XML VERSION
254
254
 
@@ -513,7 +513,7 @@ this is done for class attributes with the white space as delimiter.
513
513
  a.menu class="highlight" href="http://slim-lang.com/" Slim-lang.com
514
514
  ~~~
515
515
 
516
- This renders as
516
+ This renders as:
517
517
 
518
518
  ~~~ html
519
519
  <a class="menu highlight" href="http://slim-lang.com/">Slim-lang.com</a>
@@ -528,13 +528,13 @@ a class=:menu,:highlight
528
528
 
529
529
  #### Splat attributes `*`
530
530
 
531
- The splat shortcut allows you turn a hash in to attribute/value pairs
531
+ The splat shortcut allows you to turn a hash into attribute/value pairs.
532
532
 
533
533
  ~~~ slim
534
534
  .card*{'data-url'=>place_path(place), 'data-id'=>place.id} = place.name
535
535
  ~~~
536
536
 
537
- renders as
537
+ This renders as:
538
538
 
539
539
  ~~~ html
540
540
  <div class="card" data-id="1234" data-url="/place/1234">Slim's house</div>
@@ -553,7 +553,7 @@ The hash attributes which support attribute merging (see Slim option `:merge_att
553
553
  .first *{class: [:second, :third]} Text
554
554
  ~~~
555
555
 
556
- renders as
556
+ This renders as:
557
557
 
558
558
  ~~~ html
559
559
  div class="first second third"
@@ -575,7 +575,7 @@ ruby:
575
575
  *a_unless_current Link
576
576
  ~~~
577
577
 
578
- renders as
578
+ This renders as:
579
579
 
580
580
  ~~~ html
581
581
  <span>Link</span><a href="http://slim-lang.com/">Link</a>
@@ -585,7 +585,7 @@ renders as
585
585
 
586
586
  #### Tag shortcuts
587
587
 
588
- You can define custom tag shortcuts by setting the option `:shortcut`.
588
+ You can define custom tag shortcuts by setting the option `:shortcut`. In Rails apps, you need to put this code for your shortcuts into an initializer like `config/initializers/slim.rb`. In Sinatra, you simply add the same configuration anywhere below the line where you `require 'slim'`.
589
589
 
590
590
  ~~~ ruby
591
591
  Slim::Engine.set_options shortcut: {'c' => {tag: 'container'}, '#' => {attr: 'id'}, '.' => {attr: 'class'} }
@@ -647,7 +647,7 @@ which renders to
647
647
  <div class="person" role="admin">Daniel</div>
648
648
  ~~~
649
649
 
650
- You can also set multiple attributes at once using one shortcut.
650
+ You can also set multiple attributes with same value at once using one shortcut.
651
651
 
652
652
  ~~~ ruby
653
653
  Slim::Engine.set_options shortcut: {'@' => {attr: %w(data-role role)}}
@@ -665,6 +665,29 @@ which renders to
665
665
  <div class="person" role="admin" data-role="admin">Daniel</div>
666
666
  ~~~
667
667
 
668
+ You can also set additional fixed value attributes to a shortcut.
669
+
670
+ ~~~ ruby
671
+ Slim::Engine.set_options shortcut: {'^' => {tag: 'script', attr: 'data-binding',
672
+ additional_attrs: { type: "text/javascript" }}}
673
+ ~~~
674
+
675
+ Then
676
+
677
+ ~~~ slim
678
+ ^products
679
+ == @products.to_json
680
+ ~~~
681
+
682
+ which renders to
683
+
684
+ ~~~ html
685
+ <script data-binding="products" type="text/javascript">
686
+ [{"name": "product1", "price": "$100"},
687
+ {"name": "prodcut2", "price": "$200"}]
688
+ </script>
689
+ ~~~
690
+
668
691
  #### ID shortcut `#` and class shortcut `.`
669
692
 
670
693
  You can specify the `id` and `class` attributes in the following shortcut form
@@ -818,7 +841,7 @@ body
818
841
 
819
842
  ## Embedded engines (Markdown, ...)
820
843
 
821
- Thanks to [Tilt](https://github.com/rtomayko/tilt), Slim has impressive support for embedding other template engines.
844
+ Thanks to [Tilt](https://github.com/rtomayko/tilt), Slim has extensive support for embedding other template engines.
822
845
 
823
846
  Examples:
824
847
 
@@ -842,7 +865,7 @@ Supported engines:
842
865
  | javascript: | none | Shortcut | Shortcut to embed javascript code and wrap in script tag |
843
866
  | css: | none | Shortcut | Shortcut to embed css code and wrap in style tag |
844
867
  | sass: | sass | Compile time | Embed sass code and wrap in style tag |
845
- | scss: | sass | Compile time | Embedd scss code and wrap in style tag |
868
+ | scss: | sass | Compile time | Embed scss code and wrap in style tag |
846
869
  | less: | less | Compile time | Embed less css code and wrap in style tag |
847
870
  | styl: | styl | Compile time | Embed stylus css code and wrap in style tag |
848
871
  | coffee: | coffee-script | Compile time | Compile coffee script code and wrap in script tag |
@@ -1080,6 +1103,7 @@ There are plugins for various text editors (including the most important ones -
1080
1103
  * [Textmate / Sublime Text](https://github.com/slim-template/ruby-slim.tmbundle)
1081
1104
  * [Espresso text editor](https://github.com/slim-template/Slim-Sugar)
1082
1105
  * [Coda](https://github.com/slim-template/Coda-2-Slim.mode)
1106
+ * [Atom](https://github.com/slim-template/language-slim)
1083
1107
 
1084
1108
  ### Template Converters (HAML, ERB, ...)
1085
1109
 
@@ -1181,6 +1205,7 @@ Syntax highlighting:
1181
1205
  Static code analysis:
1182
1206
 
1183
1207
  * [Slim-Lint](https://github.com/sds/slim-lint)
1208
+ * [SublimeLinter-slim-lint](https://github.com/elstgav/SublimeLinter-slim-lint)
1184
1209
 
1185
1210
  Template Converters (HAML, ERB, ...):
1186
1211
 
@@ -13,7 +13,7 @@ require 'haml'
13
13
 
14
14
  class SlimBenchmarks
15
15
  def initialize(slow)
16
- @benches = []
16
+ @benches = Hash.new { |h, k| h[k] = [] }
17
17
 
18
18
  @erb_code = File.read(File.dirname(__FILE__) + '/view.erb')
19
19
  @haml_code = File.read(File.dirname(__FILE__) + '/view.haml')
@@ -25,8 +25,8 @@ class SlimBenchmarks
25
25
  end
26
26
 
27
27
  def init_compiled_benches
28
- haml_pretty = Haml::Engine.new(@haml_code, format: :html5)
29
- haml_ugly = Haml::Engine.new(@haml_code, format: :html5, ugly: true)
28
+ haml_pretty = Haml::Engine.new(@haml_code, format: :html5, escape_attrs: false)
29
+ haml_ugly = Haml::Engine.new(@haml_code, format: :html5, ugly: true, escape_attrs: false)
30
30
 
31
31
  context = Context.new
32
32
 
@@ -41,14 +41,14 @@ class SlimBenchmarks
41
41
  def run_slim_ugly; #{Slim::Engine.new.call @slim_code}; end
42
42
  }
43
43
 
44
- bench('(1) erb') { context.run_erb }
45
- bench('(1) erubis') { context.run_erubis }
46
- bench('(1) fast erubis') { context.run_fast_erubis }
47
- bench('(1) temple erb') { context.run_temple_erb }
48
- bench('(1) slim pretty') { context.run_slim_pretty }
49
- bench('(1) slim ugly') { context.run_slim_ugly }
50
- bench('(1) haml pretty') { context.run_haml_pretty }
51
- bench('(1) haml ugly') { context.run_haml_ugly }
44
+ bench(:compiled, 'erb') { context.run_erb }
45
+ bench(:compiled, 'erubis') { context.run_erubis }
46
+ bench(:compiled, 'fast erubis') { context.run_fast_erubis }
47
+ bench(:compiled, 'temple erb') { context.run_temple_erb }
48
+ bench(:compiled, 'slim pretty') { context.run_slim_pretty }
49
+ bench(:compiled, 'slim ugly') { context.run_slim_ugly }
50
+ bench(:compiled, 'haml pretty') { context.run_haml_pretty }
51
+ bench(:compiled, 'haml ugly') { context.run_haml_ugly }
52
52
  end
53
53
 
54
54
  def init_tilt_benches
@@ -62,47 +62,54 @@ class SlimBenchmarks
62
62
 
63
63
  context = Context.new
64
64
 
65
- bench('(2) erb') { tilt_erb.render(context) }
66
- bench('(2) erubis') { tilt_erubis.render(context) }
67
- bench('(2) temple erb') { tilt_temple_erb.render(context) }
68
- bench('(2) slim pretty') { tilt_slim_pretty.render(context) }
69
- bench('(2) slim ugly') { tilt_slim_ugly.render(context) }
70
- bench('(2) haml pretty') { tilt_haml_pretty.render(context) }
71
- bench('(2) haml ugly') { tilt_haml_ugly.render(context) }
65
+ bench(:tilt, 'erb') { tilt_erb.render(context) }
66
+ bench(:tilt, 'erubis') { tilt_erubis.render(context) }
67
+ bench(:tilt, 'temple erb') { tilt_temple_erb.render(context) }
68
+ bench(:tilt, 'slim pretty') { tilt_slim_pretty.render(context) }
69
+ bench(:tilt, 'slim ugly') { tilt_slim_ugly.render(context) }
70
+ bench(:tilt, 'haml pretty') { tilt_haml_pretty.render(context) }
71
+ bench(:tilt, 'haml ugly') { tilt_haml_ugly.render(context) }
72
72
  end
73
73
 
74
74
  def init_parsing_benches
75
75
  context = Context.new
76
76
  context_binding = context.instance_eval { binding }
77
77
 
78
- bench('(3) erb') { ERB.new(@erb_code).result(context_binding) }
79
- bench('(3) erubis') { Erubis::Eruby.new(@erb_code).result(context_binding) }
80
- bench('(3) fast erubis') { Erubis::FastEruby.new(@erb_code).result(context_binding) }
81
- bench('(3) temple erb') { Temple::ERB::Template.new { @erb_code }.render(context) }
82
- bench('(3) slim pretty') { Slim::Template.new(pretty: true) { @slim_code }.render(context) }
83
- bench('(3) slim ugly') { Slim::Template.new { @slim_code }.render(context) }
84
- bench('(3) haml pretty') { Haml::Engine.new(@haml_code, format: :html5).render(context) }
85
- bench('(3) haml ugly') { Haml::Engine.new(@haml_code, format: :html5, ugly: true).render(context) }
78
+ bench(:parsing, 'erb') { ERB.new(@erb_code).result(context_binding) }
79
+ bench(:parsing, 'erubis') { Erubis::Eruby.new(@erb_code).result(context_binding) }
80
+ bench(:parsing, 'fast erubis') { Erubis::FastEruby.new(@erb_code).result(context_binding) }
81
+ bench(:parsing, 'temple erb') { Temple::ERB::Template.new { @erb_code }.render(context) }
82
+ bench(:parsing, 'slim pretty') { Slim::Template.new(pretty: true) { @slim_code }.render(context) }
83
+ bench(:parsing, 'slim ugly') { Slim::Template.new { @slim_code }.render(context) }
84
+ bench(:parsing, 'haml pretty') { Haml::Engine.new(@haml_code, format: :html5).render(context) }
85
+ bench(:parsing, 'haml ugly') { Haml::Engine.new(@haml_code, format: :html5, ugly: true).render(context) }
86
86
  end
87
87
 
88
88
  def run
89
- Benchmark.ips do |x|
90
- @benches.each do |name, block|
91
- x.report(name.to_s, &block)
89
+ @benches.each do |group_name, group_benches|
90
+ puts "Running #{group_name} benchmarks:"
91
+
92
+ Benchmark.ips do |x|
93
+ group_benches.each do |name, block|
94
+ x.report("#{group_name} #{name}", &block)
95
+ end
96
+
97
+ x.compare!
92
98
  end
93
99
  end
100
+
94
101
  puts "
95
- (1) Compiled benchmark. Template is parsed before the benchmark and
102
+ Compiled benchmark: Template is parsed before the benchmark and
96
103
  generated ruby code is compiled into a method.
97
104
  This is the fastest evaluation strategy because it benchmarks
98
105
  pure execution speed of the generated ruby code.
99
106
 
100
- (2) Compiled Tilt benchmark. Template is compiled with Tilt, which gives a more
107
+ Compiled Tilt benchmark: Template is compiled with Tilt, which gives a more
101
108
  accurate result of the performance in production mode in frameworks like
102
109
  Sinatra, Ramaze and Camping. (Rails still uses its own template
103
110
  compilation.)
104
111
 
105
- (3) Parsing benchmark. Template is parsed every time.
112
+ Parsing benchmark: Template is parsed every time.
106
113
  This is not the recommended way to use the template engine
107
114
  and Slim is not optimized for it. Activate this benchmark with 'rake bench slow=1'.
108
115
 
@@ -111,8 +118,8 @@ overhead added by the Temple framework compared to ERB.
111
118
  "
112
119
  end
113
120
 
114
- def bench(name, &block)
115
- @benches.push([name, block])
121
+ def bench(group, name, &block)
122
+ @benches[group].push([name, block])
116
123
  end
117
124
  end
118
125