brakeman 5.2.3 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (637) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +111 -0
  3. data/README.md +8 -5
  4. data/bundle/load.rb +15 -15
  5. data/bundle/ruby/3.1.0/gems/csv-3.3.2/LICENSE.txt +33 -0
  6. data/bundle/ruby/3.1.0/gems/csv-3.3.2/NEWS.md +965 -0
  7. data/bundle/ruby/3.1.0/gems/csv-3.3.2/README.md +55 -0
  8. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/core_ext/array.rb +9 -0
  9. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/core_ext/string.rb +9 -0
  10. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/fields_converter.rb +96 -0
  11. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/input_record_separator.rb +18 -0
  12. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/parser.rb +1292 -0
  13. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/row.rb +757 -0
  14. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/table.rb +1055 -0
  15. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/version.rb +6 -0
  16. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/writer.rb +209 -0
  17. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv.rb +3017 -0
  18. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/Changelog.md +34 -0
  19. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/Gemfile +3 -5
  20. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/README.md +41 -3
  21. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/highline.gemspec +6 -1
  22. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/io_console_compatible.rb +1 -1
  23. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/menu.rb +0 -0
  24. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/question/answer_converter.rb +2 -5
  25. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/question.rb +23 -13
  26. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/question_asker.rb +3 -1
  27. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/style.rb +0 -0
  28. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal/io_console.rb +1 -1
  29. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal/unix_stty.rb +6 -4
  30. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal.rb +8 -6
  31. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/version.rb +1 -1
  32. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline.rb +27 -6
  33. data/bundle/ruby/3.1.0/gems/parallel-1.26.3/lib/parallel/version.rb +4 -0
  34. data/bundle/ruby/{2.7.0/gems/parallel-1.22.1 → 3.1.0/gems/parallel-1.26.3}/lib/parallel.rb +109 -13
  35. data/bundle/ruby/3.1.0/gems/reline-0.6.0/COPYING +56 -0
  36. data/bundle/ruby/3.1.0/gems/reline-0.6.0/README.md +94 -0
  37. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/config.rb +373 -0
  38. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/face.rb +199 -0
  39. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/history.rb +76 -0
  40. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io/ansi.rb +325 -0
  41. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io/dumb.rb +120 -0
  42. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io/windows.rb +530 -0
  43. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io.rb +55 -0
  44. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/base.rb +37 -0
  45. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/composite.rb +17 -0
  46. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/emacs.rb +517 -0
  47. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/vi_command.rb +518 -0
  48. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/vi_insert.rb +517 -0
  49. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor.rb +8 -0
  50. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_stroke.rb +119 -0
  51. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/kill_ring.rb +125 -0
  52. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/line_editor.rb +2382 -0
  53. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/unicode/east_asian_width.rb +1267 -0
  54. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/unicode.rb +415 -0
  55. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/version.rb +3 -0
  56. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline.rb +519 -0
  57. data/bundle/ruby/3.1.0/gems/reline-0.6.0/license_of_rb-readline +25 -0
  58. data/bundle/ruby/3.1.0/gems/rexml-3.4.0/LICENSE.txt +22 -0
  59. data/bundle/ruby/3.1.0/gems/rexml-3.4.0/NEWS.md +675 -0
  60. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/README.md +10 -1
  61. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/attribute.rb +17 -11
  62. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/document.rb +6 -2
  63. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/element.rb +19 -34
  64. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/entity.rb +9 -38
  65. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/formatters/pretty.rb +3 -3
  66. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/functions.rb +1 -2
  67. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/namespace.rb +8 -4
  68. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/node.rb +8 -4
  69. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parseexception.rb +1 -0
  70. data/bundle/ruby/3.1.0/gems/rexml-3.4.0/lib/rexml/parsers/baseparser.rb +866 -0
  71. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/pullparser.rb +16 -0
  72. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/sax2parser.rb +16 -19
  73. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/streamparser.rb +16 -10
  74. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/treeparser.rb +9 -21
  75. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/xpathparser.rb +136 -86
  76. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/rexml.rb +3 -1
  77. data/bundle/ruby/3.1.0/gems/rexml-3.4.0/lib/rexml/source.rb +369 -0
  78. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/text.rb +60 -61
  79. data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xpath_parser.rb +7 -3
  80. data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/History.rdoc +22 -0
  81. data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/lib/ruby2ruby.rb +162 -26
  82. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/History.rdoc +48 -0
  83. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/Manifest.txt +2 -0
  84. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/README.rdoc +2 -1
  85. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/compare/normalize.rb +1 -0
  86. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby20_parser.rb +4267 -4284
  87. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby20_parser.y +50 -26
  88. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby21_parser.rb +4241 -4240
  89. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby21_parser.y +50 -26
  90. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby22_parser.rb +4289 -4290
  91. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby22_parser.y +50 -26
  92. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby23_parser.rb +4274 -4243
  93. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby23_parser.y +50 -26
  94. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby24_parser.rb +4279 -4298
  95. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby24_parser.y +50 -26
  96. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby25_parser.rb +4270 -4289
  97. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby25_parser.y +50 -26
  98. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby26_parser.rb +4270 -4289
  99. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby26_parser.y +50 -26
  100. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby27_parser.rb +4189 -4206
  101. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby27_parser.y +63 -27
  102. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby30_parser.rb +6037 -5963
  103. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby30_parser.y +148 -87
  104. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby31_parser.rb +6213 -6186
  105. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1/lib/ruby3_parser.yy → 3.1.0/gems/ruby_parser-3.20.3/lib/ruby31_parser.y} +149 -143
  106. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.rb +13601 -0
  107. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.y → 3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.y} +171 -109
  108. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby3_parser.yy +3635 -0
  109. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rb +26 -11
  110. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rex.rb +1 -1
  111. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer_strings.rb +2 -2
  112. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_parser.rb +2 -0
  113. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_parser.yy +63 -27
  114. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_parser_extras.rb +36 -23
  115. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/tools/munge.rb +8 -2
  116. data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/tools/ripper.rb +14 -12
  117. data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/History.rdoc +31 -0
  118. data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/pt_testcase.rb +3 -3
  119. data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/sexp.rb +9 -3
  120. data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/sexp_matcher.rb +1 -1
  121. data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/sexp_processor.rb +1 -1
  122. data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/strict_sexp.rb +6 -5
  123. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/CHANGES +44 -8
  124. data/bundle/ruby/3.1.0/gems/slim-5.2.1/Gemfile +43 -0
  125. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/LICENSE +1 -1
  126. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/README.jp.md +28 -41
  127. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/README.md +66 -43
  128. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/code_attributes.rb +2 -1
  129. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/command.rb +2 -8
  130. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/controls.rb +1 -0
  131. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/do_inserter.rb +4 -3
  132. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/embedded.rb +17 -17
  133. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/end_inserter.rb +3 -2
  134. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/engine.rb +3 -0
  135. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/erb_converter.rb +1 -0
  136. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/filter.rb +1 -0
  137. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/grammar.rb +1 -0
  138. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/include.rb +1 -0
  139. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/interpolation.rb +1 -0
  140. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/logic_less/context.rb +6 -7
  141. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/logic_less/filter.rb +1 -0
  142. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/logic_less.rb +1 -0
  143. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/parser.rb +26 -39
  144. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/railtie.rb +19 -0
  145. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart/escaper.rb +1 -1
  146. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart/filter.rb +3 -2
  147. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart/parser.rb +4 -3
  148. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart.rb +1 -0
  149. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/splat/builder.rb +16 -8
  150. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/splat/filter.rb +6 -4
  151. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/template.rb +6 -0
  152. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/translator.rb +4 -3
  153. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/version.rb +2 -1
  154. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim.rb +2 -0
  155. data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/slim.gemspec +14 -5
  156. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/CHANGES +39 -1
  157. data/bundle/ruby/3.1.0/gems/temple-0.10.3/Gemfile +2 -0
  158. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/README.md +1 -1
  159. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/engine.rb +1 -0
  160. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/engine.rb +3 -0
  161. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/parser.rb +2 -1
  162. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/template.rb +1 -0
  163. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/trimming.rb +1 -0
  164. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/exceptions.rb +1 -0
  165. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filter.rb +1 -0
  166. data/bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/filters/ambles.rb +22 -0
  167. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/code_merger.rb +1 -0
  168. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/control_flow.rb +1 -0
  169. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/dynamic_inliner.rb +2 -1
  170. data/bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/filters/dynamic_merger.rb +69 -0
  171. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/encoding.rb +1 -0
  172. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/eraser.rb +1 -0
  173. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/escapable.rb +1 -0
  174. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/multi_flattener.rb +1 -0
  175. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/remove_bom.rb +1 -0
  176. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/static_analyzer.rb +1 -0
  177. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/static_merger.rb +1 -0
  178. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/string_splitter.rb +13 -1
  179. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/validator.rb +1 -0
  180. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generator.rb +5 -2
  181. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/array.rb +1 -0
  182. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/array_buffer.rb +1 -0
  183. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/erb.rb +1 -0
  184. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/rails_output_buffer.rb +4 -4
  185. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/string_buffer.rb +2 -1
  186. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/grammar.rb +1 -0
  187. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/attribute_merger.rb +1 -0
  188. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/attribute_remover.rb +1 -0
  189. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/attribute_sorter.rb +1 -0
  190. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/dispatcher.rb +1 -0
  191. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/fast.rb +1 -0
  192. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/filter.rb +1 -0
  193. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/pretty.rb +1 -0
  194. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/safe.rb +1 -0
  195. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/map.rb +1 -0
  196. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/dispatcher.rb +1 -0
  197. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/engine_dsl.rb +1 -0
  198. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/grammar_dsl.rb +4 -2
  199. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/options.rb +1 -0
  200. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/template.rb +1 -0
  201. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/parser.rb +1 -0
  202. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/static_analyzer.rb +1 -0
  203. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/templates/rails.rb +7 -2
  204. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/templates/tilt.rb +2 -9
  205. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/templates.rb +1 -0
  206. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/utils.rb +5 -15
  207. data/bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/version.rb +4 -0
  208. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple.rb +3 -0
  209. data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/temple.gemspec +4 -6
  210. data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/History.rdoc +142 -0
  211. data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/README.md +417 -0
  212. data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/cell.rb +8 -8
  213. data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/row.rb +18 -4
  214. data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/separator.rb +66 -0
  215. data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/style.rb +284 -0
  216. data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/table.rb +47 -18
  217. data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/util.rb +13 -0
  218. data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/version.rb +1 -1
  219. data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table.rb +2 -2
  220. data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/terminal-table.gemspec +3 -3
  221. data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/COPYING +1 -0
  222. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_emacs_org.rb +2 -0
  223. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_handlebars.rb +2 -0
  224. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_jbuilder.rb +2 -0
  225. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_org.rb +2 -0
  226. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/asciidoc.rb +15 -0
  227. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/babel.rb +8 -0
  228. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/builder.rb +42 -0
  229. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/cli.rb +134 -0
  230. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/coffee.rb +39 -0
  231. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/commonmarker.rb +95 -0
  232. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/creole.rb +16 -0
  233. data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/csv.rb +6 -18
  234. data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/erb.rb +23 -21
  235. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/erubi.rb +55 -0
  236. data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/etanni.rb +5 -4
  237. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/haml.rb +94 -0
  238. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/kramdown.rb +13 -0
  239. data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/liquid.rb +10 -17
  240. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/livescript.rb +11 -0
  241. data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/mapping.rb +228 -109
  242. data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/markaby.rb +5 -7
  243. data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/nokogiri.rb +11 -10
  244. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/pandoc.rb +39 -0
  245. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/pipeline.rb +19 -0
  246. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/plain.rb +5 -0
  247. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/prawn.rb +28 -0
  248. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/radius.rb +41 -0
  249. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/rdiscount.rb +23 -0
  250. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/rdoc.rb +11 -0
  251. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/redcarpet.rb +31 -0
  252. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/redcloth.rb +13 -0
  253. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/rst-pandoc.rb +10 -0
  254. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/sass.rb +78 -0
  255. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/slim.rb +5 -0
  256. data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/string.rb +9 -3
  257. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/template.rb +479 -0
  258. data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/typescript.rb +19 -0
  259. data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/yajl.rb +5 -11
  260. data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt.rb +60 -42
  261. data/bundle/ruby/{2.7.0/gems/unicode-display_width-1.8.0 → 3.1.0/gems/unicode-display_width-2.6.0}/CHANGELOG.md +65 -2
  262. data/bundle/ruby/{2.7.0/gems/unicode-display_width-1.8.0 → 3.1.0/gems/unicode-display_width-2.6.0}/MIT-LICENSE.txt +1 -1
  263. data/bundle/ruby/{2.7.0/gems/unicode-display_width-1.8.0 → 3.1.0/gems/unicode-display_width-2.6.0}/README.md +67 -20
  264. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/data/display_width.marshal.gz +0 -0
  265. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/constants.rb +10 -0
  266. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/index.rb +34 -0
  267. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/no_string_ext.rb +8 -0
  268. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/string_ext.rb +9 -0
  269. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width.rb +123 -0
  270. data/lib/brakeman/app_tree.rb +40 -13
  271. data/lib/brakeman/checks/base_check.rb +2 -3
  272. data/lib/brakeman/checks/check_basic_auth.rb +4 -2
  273. data/lib/brakeman/checks/check_basic_auth_timing_attack.rb +2 -1
  274. data/lib/brakeman/checks/check_content_tag.rb +16 -9
  275. data/lib/brakeman/checks/check_cookie_serialization.rb +2 -1
  276. data/lib/brakeman/checks/check_create_with.rb +4 -2
  277. data/lib/brakeman/checks/check_cross_site_scripting.rb +6 -3
  278. data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +2 -1
  279. data/lib/brakeman/checks/check_default_routes.rb +6 -3
  280. data/lib/brakeman/checks/check_deserialize.rb +6 -2
  281. data/lib/brakeman/checks/check_detailed_exceptions.rb +4 -2
  282. data/lib/brakeman/checks/check_digest_dos.rb +2 -1
  283. data/lib/brakeman/checks/check_divide_by_zero.rb +2 -1
  284. data/lib/brakeman/checks/check_dynamic_finders.rb +2 -1
  285. data/lib/brakeman/checks/check_eol_rails.rb +6 -0
  286. data/lib/brakeman/checks/check_eol_ruby.rb +4 -1
  287. data/lib/brakeman/checks/check_escape_function.rb +2 -1
  288. data/lib/brakeman/checks/check_evaluation.rb +21 -2
  289. data/lib/brakeman/checks/check_execute.rb +34 -3
  290. data/lib/brakeman/checks/check_file_access.rb +2 -1
  291. data/lib/brakeman/checks/check_file_disclosure.rb +2 -1
  292. data/lib/brakeman/checks/check_filter_skipping.rb +2 -1
  293. data/lib/brakeman/checks/check_force_ssl.rb +2 -1
  294. data/lib/brakeman/checks/check_forgery_setting.rb +4 -2
  295. data/lib/brakeman/checks/check_header_dos.rb +2 -1
  296. data/lib/brakeman/checks/check_i18n_xss.rb +2 -1
  297. data/lib/brakeman/checks/check_jruby_xml.rb +2 -1
  298. data/lib/brakeman/checks/check_json_encoding.rb +2 -1
  299. data/lib/brakeman/checks/check_json_entity_escape.rb +4 -2
  300. data/lib/brakeman/checks/check_json_parsing.rb +4 -2
  301. data/lib/brakeman/checks/check_link_to.rb +2 -1
  302. data/lib/brakeman/checks/check_link_to_href.rb +4 -2
  303. data/lib/brakeman/checks/check_mail_to.rb +2 -1
  304. data/lib/brakeman/checks/check_mass_assignment.rb +6 -3
  305. data/lib/brakeman/checks/check_mime_type_dos.rb +2 -1
  306. data/lib/brakeman/checks/check_model_attr_accessible.rb +3 -1
  307. data/lib/brakeman/checks/check_model_attributes.rb +4 -2
  308. data/lib/brakeman/checks/check_model_serialize.rb +2 -1
  309. data/lib/brakeman/checks/check_nested_attributes.rb +2 -1
  310. data/lib/brakeman/checks/check_nested_attributes_bypass.rb +2 -1
  311. data/lib/brakeman/checks/check_number_to_currency.rb +4 -2
  312. data/lib/brakeman/checks/check_page_caching_cve.rb +2 -1
  313. data/lib/brakeman/checks/check_pathname.rb +48 -0
  314. data/lib/brakeman/checks/check_permit_attributes.rb +2 -1
  315. data/lib/brakeman/checks/check_quote_table_name.rb +2 -1
  316. data/lib/brakeman/checks/check_ransack.rb +53 -0
  317. data/lib/brakeman/checks/check_redirect.rb +67 -31
  318. data/lib/brakeman/checks/check_regex_dos.rb +2 -1
  319. data/lib/brakeman/checks/check_render.rb +10 -3
  320. data/lib/brakeman/checks/check_render_dos.rb +2 -1
  321. data/lib/brakeman/checks/check_render_inline.rb +4 -2
  322. data/lib/brakeman/checks/check_response_splitting.rb +2 -1
  323. data/lib/brakeman/checks/check_reverse_tabnabbing.rb +2 -1
  324. data/lib/brakeman/checks/check_route_dos.rb +2 -1
  325. data/lib/brakeman/checks/check_safe_buffer_manipulation.rb +2 -1
  326. data/lib/brakeman/checks/check_sanitize_config_cve.rb +120 -0
  327. data/lib/brakeman/checks/check_sanitize_methods.rb +6 -3
  328. data/lib/brakeman/checks/check_secrets.rb +2 -1
  329. data/lib/brakeman/checks/check_select_tag.rb +2 -1
  330. data/lib/brakeman/checks/check_select_vulnerability.rb +2 -1
  331. data/lib/brakeman/checks/check_send.rb +2 -1
  332. data/lib/brakeman/checks/check_session_manipulation.rb +2 -1
  333. data/lib/brakeman/checks/check_session_settings.rb +8 -6
  334. data/lib/brakeman/checks/check_simple_format.rb +4 -2
  335. data/lib/brakeman/checks/check_single_quotes.rb +2 -1
  336. data/lib/brakeman/checks/check_skip_before_filter.rb +4 -2
  337. data/lib/brakeman/checks/check_sprockets_path_traversal.rb +2 -1
  338. data/lib/brakeman/checks/check_sql.rb +5 -3
  339. data/lib/brakeman/checks/check_sql_cves.rb +4 -2
  340. data/lib/brakeman/checks/check_ssl_verify.rb +2 -1
  341. data/lib/brakeman/checks/check_strip_tags.rb +6 -3
  342. data/lib/brakeman/checks/check_symbol_dos.rb +2 -1
  343. data/lib/brakeman/checks/check_symbol_dos_cve.rb +2 -1
  344. data/lib/brakeman/checks/check_template_injection.rb +2 -1
  345. data/lib/brakeman/checks/check_translate_bug.rb +2 -1
  346. data/lib/brakeman/checks/check_unsafe_reflection.rb +2 -1
  347. data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +2 -1
  348. data/lib/brakeman/checks/check_unscoped_find.rb +10 -1
  349. data/lib/brakeman/checks/check_validation_regex.rb +2 -1
  350. data/lib/brakeman/checks/check_verb_confusion.rb +2 -1
  351. data/lib/brakeman/checks/check_weak_hash.rb +6 -3
  352. data/lib/brakeman/checks/check_weak_rsa_key.rb +112 -0
  353. data/lib/brakeman/checks/check_without_protection.rb +2 -1
  354. data/lib/brakeman/checks/check_xml_dos.rb +2 -1
  355. data/lib/brakeman/checks/check_yaml_parsing.rb +4 -2
  356. data/lib/brakeman/checks/eol_check.rb +4 -2
  357. data/lib/brakeman/file_parser.rb +35 -2
  358. data/lib/brakeman/options.rb +42 -5
  359. data/lib/brakeman/parsers/erubis_patch.rb +11 -0
  360. data/lib/brakeman/parsers/rails2_erubis.rb +3 -0
  361. data/lib/brakeman/parsers/rails2_xss_plugin_erubis.rb +4 -0
  362. data/lib/brakeman/parsers/rails3_erubis.rb +5 -1
  363. data/lib/brakeman/parsers/slim_embedded.rb +2 -0
  364. data/lib/brakeman/processors/alias_processor.rb +124 -41
  365. data/lib/brakeman/processors/gem_processor.rb +2 -2
  366. data/lib/brakeman/processors/lib/file_type_detector.rb +9 -7
  367. data/lib/brakeman/processors/lib/find_all_calls.rb +1 -0
  368. data/lib/brakeman/processors/lib/module_helper.rb +31 -1
  369. data/lib/brakeman/processors/lib/rails3_config_processor.rb +1 -1
  370. data/lib/brakeman/processors/library_processor.rb +6 -0
  371. data/lib/brakeman/report/ignore/config.rb +0 -1
  372. data/lib/brakeman/report/pager.rb +1 -1
  373. data/lib/brakeman/report/report_codeclimate.rb +1 -1
  374. data/lib/brakeman/report/report_csv.rb +2 -0
  375. data/lib/brakeman/report/report_github.rb +1 -1
  376. data/lib/brakeman/report/report_junit.rb +2 -2
  377. data/lib/brakeman/report/report_markdown.rb +1 -1
  378. data/lib/brakeman/report/report_sarif.rb +122 -2
  379. data/lib/brakeman/report/report_table.rb +7 -7
  380. data/lib/brakeman/report/report_tabs.rb +0 -1
  381. data/lib/brakeman/report/report_text.rb +10 -1
  382. data/lib/brakeman/report/templates/controller_warnings.html.erb +2 -0
  383. data/lib/brakeman/report/templates/ignored_warnings.html.erb +2 -0
  384. data/lib/brakeman/report/templates/model_warnings.html.erb +2 -0
  385. data/lib/brakeman/report/templates/security_warnings.html.erb +2 -0
  386. data/lib/brakeman/report/templates/view_warnings.html.erb +2 -0
  387. data/lib/brakeman/rescanner.rb +40 -388
  388. data/lib/brakeman/scanner.rb +161 -76
  389. data/lib/brakeman/tracker/config.rb +89 -34
  390. data/lib/brakeman/tracker/controller.rb +14 -10
  391. data/lib/brakeman/tracker/file_cache.rb +83 -0
  392. data/lib/brakeman/tracker.rb +21 -4
  393. data/lib/brakeman/util.rb +21 -7
  394. data/lib/brakeman/version.rb +1 -1
  395. data/lib/brakeman/warning.rb +6 -3
  396. data/lib/brakeman/warning_codes.rb +6 -0
  397. data/lib/brakeman.rb +22 -7
  398. data/lib/ruby_parser/bm_sexp.rb +5 -1
  399. metadata +438 -422
  400. data/bundle/ruby/2.7.0/gems/highline-2.0.3/appveyor.yml +0 -37
  401. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/processor_count.rb +0 -44
  402. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/version.rb +0 -4
  403. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md +0 -178
  404. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +0 -694
  405. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb +0 -298
  406. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -6
  407. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -19
  408. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -54
  409. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -5794
  410. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -1909
  411. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -6186
  412. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -2117
  413. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -1412
  414. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -179
  415. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +0 -323
  416. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -30
  417. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +0 -1388
  418. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -5
  419. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/CHANGES.md +0 -154
  420. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/Gemfile +0 -11
  421. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/LICENSE.txt +0 -22
  422. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/README.md +0 -191
  423. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -11
  424. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -34
  425. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -36
  426. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -181
  427. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -37
  428. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -12
  429. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -26
  430. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -99
  431. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -52
  432. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -94
  433. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -29
  434. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -39
  435. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -36
  436. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -43
  437. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -38
  438. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -21
  439. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -13
  440. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -33
  441. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -26
  442. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -18
  443. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -17
  444. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -47
  445. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -41
  446. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -3
  447. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -94
  448. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -38
  449. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -19
  450. data/bundle/ruby/2.7.0/gems/slim-4.1.0/Gemfile +0 -70
  451. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/template.rb +0 -19
  452. data/bundle/ruby/2.7.0/gems/temple-0.8.2/Gemfile +0 -3
  453. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/version.rb +0 -3
  454. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/History.rdoc +0 -85
  455. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/README.rdoc +0 -247
  456. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -14
  457. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -79
  458. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/asciidoc.rb +0 -27
  459. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/babel.rb +0 -16
  460. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/bluecloth.rb +0 -24
  461. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/builder.rb +0 -37
  462. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/coffee.rb +0 -58
  463. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/commonmarker.rb +0 -78
  464. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/creole.rb +0 -25
  465. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/dummy.rb +0 -3
  466. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubi.rb +0 -32
  467. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubis.rb +0 -43
  468. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/haml.rb +0 -86
  469. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/kramdown.rb +0 -25
  470. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/less.rb +0 -30
  471. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/livescript.rb +0 -23
  472. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/maruku.rb +0 -22
  473. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/pandoc.rb +0 -49
  474. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/plain.rb +0 -16
  475. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/prawn.rb +0 -43
  476. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/radius.rb +0 -48
  477. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdiscount.rb +0 -39
  478. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdoc.rb +0 -40
  479. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcarpet.rb +0 -83
  480. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcloth.rb +0 -23
  481. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rst-pandoc.rb +0 -18
  482. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sass.rb +0 -52
  483. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sigil.rb +0 -34
  484. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/template.rb +0 -297
  485. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/typescript.rb +0 -26
  486. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/wikicloth.rb +0 -22
  487. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
  488. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/constants.rb +0 -8
  489. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/index.rb +0 -12
  490. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/no_string_ext.rb +0 -7
  491. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/string_ext.rb +0 -17
  492. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb +0 -51
  493. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
  494. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
  495. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/README.txt +0 -0
  496. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
  497. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
  498. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
  499. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
  500. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
  501. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
  502. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
  503. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
  504. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
  505. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
  506. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
  507. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
  508. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
  509. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
  510. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
  511. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
  512. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
  513. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
  514. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
  515. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
  516. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
  517. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
  518. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
  519. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
  520. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
  521. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
  522. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
  523. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
  524. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
  525. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/setup.rb +0 -0
  526. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/CHANGELOG.md +0 -0
  527. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/FAQ.md +0 -0
  528. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/Gemfile +0 -0
  529. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/MIT-LICENSE +0 -0
  530. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/README.md +0 -0
  531. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/REFERENCE.md +0 -0
  532. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/TODO +0 -0
  533. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/haml.gemspec +0 -0
  534. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/attribute_builder.rb +0 -0
  535. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/attribute_compiler.rb +0 -0
  536. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/attribute_parser.rb +0 -0
  537. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/buffer.rb +0 -0
  538. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/compiler.rb +0 -0
  539. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/engine.rb +0 -0
  540. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/error.rb +0 -0
  541. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/escapable.rb +0 -0
  542. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/exec.rb +0 -0
  543. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/filters.rb +0 -0
  544. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/generator.rb +0 -0
  545. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_extensions.rb +0 -0
  546. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_mods.rb +0 -0
  547. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_xss_mods.rb +0 -0
  548. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/safe_erubi_template.rb +0 -0
  549. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/safe_erubis_template.rb +0 -0
  550. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/xss_mods.rb +0 -0
  551. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers.rb +0 -0
  552. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/options.rb +0 -0
  553. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/parser.rb +0 -0
  554. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/plugin.rb +0 -0
  555. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/railtie.rb +0 -0
  556. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/sass_rails_filter.rb +0 -0
  557. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/template/options.rb +0 -0
  558. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/template.rb +0 -0
  559. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/temple_engine.rb +0 -0
  560. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/temple_line_counter.rb +0 -0
  561. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/util.rb +0 -0
  562. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/version.rb +0 -0
  563. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml.rb +0 -0
  564. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/yard/default/fulldoc/html/css/common.sass +0 -0
  565. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/yard/default/layout/html/footer.erb +0 -0
  566. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/AUTHORS +0 -0
  567. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/COPYING +0 -0
  568. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/LICENSE +0 -0
  569. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/TODO +0 -0
  570. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/builtin_styles.rb +0 -0
  571. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/color_scheme.rb +0 -0
  572. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/compatibility.rb +0 -0
  573. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/custom_errors.rb +0 -0
  574. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/import.rb +0 -0
  575. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/list.rb +0 -0
  576. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/list_renderer.rb +0 -0
  577. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/menu/item.rb +0 -0
  578. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/paginator.rb +0 -0
  579. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/simulate.rb +0 -0
  580. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/statement.rb +0 -0
  581. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/string.rb +0 -0
  582. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/string_extensions.rb +0 -0
  583. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/template_renderer.rb +0 -0
  584. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal/ncurses.rb +0 -0
  585. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/wrapper.rb +0 -0
  586. /data/bundle/ruby/{2.7.0/gems/parallel-1.22.1 → 3.1.0/gems/parallel-1.26.3}/MIT-LICENSE.txt +0 -0
  587. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5/LICENSE.txt → 3.1.0/gems/reline-0.6.0/BSDL} +0 -0
  588. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/attlistdecl.rb +0 -0
  589. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/cdata.rb +0 -0
  590. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/child.rb +0 -0
  591. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/comment.rb +0 -0
  592. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/doctype.rb +0 -0
  593. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/attlistdecl.rb +0 -0
  594. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/dtd.rb +0 -0
  595. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/elementdecl.rb +0 -0
  596. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/entitydecl.rb +0 -0
  597. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/notationdecl.rb +0 -0
  598. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/encoding.rb +0 -0
  599. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/formatters/default.rb +0 -0
  600. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/formatters/transitive.rb +0 -0
  601. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/instruction.rb +0 -0
  602. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/light/node.rb +0 -0
  603. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/output.rb +0 -0
  604. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parent.rb +0 -0
  605. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/lightparser.rb +0 -0
  606. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/ultralightparser.rb +0 -0
  607. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/quickpath.rb +0 -0
  608. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/sax2listener.rb +0 -0
  609. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/security.rb +0 -0
  610. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/streamlistener.rb +0 -0
  611. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/undefinednamespaceexception.rb +0 -0
  612. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/validation/relaxng.rb +0 -0
  613. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/validation/validation.rb +0 -0
  614. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/validation/validationexception.rb +0 -0
  615. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xmldecl.rb +0 -0
  616. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xmltokens.rb +0 -0
  617. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xpath.rb +0 -0
  618. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml.rb +0 -0
  619. /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/Manifest.txt +0 -0
  620. /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/README.rdoc +0 -0
  621. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/debugging.md +0 -0
  622. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/gauntlet.md +0 -0
  623. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_extensions.rb +0 -0
  624. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_stringscanner.rb +0 -0
  625. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rex +0 -0
  626. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/Manifest.txt +0 -0
  627. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/README.rdoc +0 -0
  628. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/composite_sexp_processor.rb +0 -0
  629. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/unique.rb +0 -0
  630. /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/EXPRESSIONS.md +0 -0
  631. /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/LICENSE +0 -0
  632. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/Gemfile +0 -0
  633. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/LICENSE.txt +0 -0
  634. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/Manifest +0 -0
  635. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/Todo.rdoc +0 -0
  636. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/import.rb +0 -0
  637. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/table_helper.rb +0 -0
@@ -1,43 +0,0 @@
1
- require 'tilt/template'
2
- require 'prawn'
3
-
4
- module Tilt
5
- # Prawn template implementation. See: http://prawnpdf.org
6
- #
7
- class PrawnTemplate < Template
8
- self.default_mime_type = 'application/pdf'
9
-
10
- def prepare
11
- @engine = ::Prawn::Document.new(prawn_options)
12
- end
13
-
14
- def evaluate(scope, locals, &block)
15
- pdf = @engine
16
- if data.respond_to?(:to_str)
17
- locals[:pdf] = pdf
18
- super(scope, locals, &block)
19
- elsif data.kind_of?(Proc)
20
- data.call(pdf)
21
- end
22
- @output ||= pdf.render
23
- end
24
-
25
- def allows_script?
26
- false
27
- end
28
-
29
- def precompiled_template(locals)
30
- data.to_str
31
- end
32
-
33
-
34
- private
35
-
36
- def prawn_options
37
- # defaults to A4 instead of crazy US Letter format.
38
- { :page_size => "A4", :page_layout => :portrait }.merge(options)
39
- end
40
-
41
- end
42
-
43
- end
@@ -1,48 +0,0 @@
1
- require 'tilt/template'
2
- require 'radius'
3
-
4
- module Tilt
5
- # Radius Template
6
- # http://github.com/jlong/radius/
7
- class RadiusTemplate < Template
8
- def self.context_class
9
- @context_class ||= Class.new(Radius::Context) do
10
- attr_accessor :tilt_scope
11
-
12
- def tag_missing(name, attributes)
13
- tilt_scope.__send__(name)
14
- end
15
-
16
- def dup
17
- i = super
18
- i.tilt_scope = tilt_scope
19
- i
20
- end
21
- end
22
- end
23
-
24
- def prepare
25
- end
26
-
27
- def evaluate(scope, locals, &block)
28
- context = self.class.context_class.new
29
- context.tilt_scope = scope
30
- context.define_tag("yield") do
31
- block.call
32
- end
33
- locals.each do |tag, value|
34
- context.define_tag(tag) do
35
- value
36
- end
37
- end
38
-
39
- options = {:tag_prefix => 'r'}.merge(@options)
40
- parser = Radius::Parser.new(context, options)
41
- parser.parse(data)
42
- end
43
-
44
- def allows_script?
45
- false
46
- end
47
- end
48
- end
@@ -1,39 +0,0 @@
1
- require 'tilt/template'
2
- require 'rdiscount'
3
-
4
- module Tilt
5
- # Discount Markdown implementation. See:
6
- # http://github.com/rtomayko/rdiscount
7
- #
8
- # RDiscount is a simple text filter. It does not support +scope+ or
9
- # +locals+. The +:smart+ and +:filter_html+ options may be set true
10
- # to enable those flags on the underlying RDiscount object.
11
- class RDiscountTemplate < Template
12
- self.default_mime_type = 'text/html'
13
-
14
- ALIAS = {
15
- :escape_html => :filter_html,
16
- :smartypants => :smart
17
- }
18
-
19
- FLAGS = [:smart, :filter_html, :smartypants, :escape_html]
20
-
21
- def flags
22
- FLAGS.select { |flag| options[flag] }.map { |flag| ALIAS[flag] || flag }
23
- end
24
-
25
- def prepare
26
- @engine = RDiscount.new(data, *flags)
27
- @output = nil
28
- end
29
-
30
- def evaluate(scope, locals, &block)
31
- @output ||= @engine.to_html
32
- end
33
-
34
- def allows_script?
35
- false
36
- end
37
- end
38
- end
39
-
@@ -1,40 +0,0 @@
1
- require 'tilt/template'
2
- require 'rdoc'
3
- require 'rdoc/markup'
4
- require 'rdoc/markup/to_html'
5
-
6
- module Tilt
7
- # RDoc template. See:
8
- # http://rdoc.rubyforge.org/
9
- #
10
- # It's suggested that your program `require 'rdoc/markup'` and
11
- # `require 'rdoc/markup/to_html'` at load time when using this template
12
- # engine in a threaded environment.
13
- class RDocTemplate < Template
14
- self.default_mime_type = 'text/html'
15
-
16
- def markup
17
- begin
18
- # RDoc 4.0
19
- require 'rdoc/options'
20
- RDoc::Markup::ToHtml.new(RDoc::Options.new, nil)
21
- rescue ArgumentError
22
- # RDoc < 4.0
23
- RDoc::Markup::ToHtml.new
24
- end
25
- end
26
-
27
- def prepare
28
- @engine = markup.convert(data)
29
- @output = nil
30
- end
31
-
32
- def evaluate(scope, locals, &block)
33
- @output ||= @engine.to_s
34
- end
35
-
36
- def allows_script?
37
- false
38
- end
39
- end
40
- end
@@ -1,83 +0,0 @@
1
- require 'tilt/template'
2
- require 'redcarpet'
3
-
4
- module Tilt
5
- # Compatibility mode for Redcarpet 1.x
6
- class Redcarpet1Template < Template
7
- self.default_mime_type = 'text/html'
8
-
9
- ALIAS = {
10
- :escape_html => :filter_html,
11
- :smartypants => :smart
12
- }
13
-
14
- FLAGS = [:smart, :filter_html, :smartypants, :escape_html]
15
-
16
- def flags
17
- FLAGS.select { |flag| options[flag] }.map { |flag| ALIAS[flag] || flag }
18
- end
19
-
20
- def prepare
21
- @engine = RedcarpetCompat.new(data, *flags)
22
- @output = nil
23
- end
24
-
25
- def evaluate(scope, locals, &block)
26
- @output ||= @engine.to_html
27
- end
28
-
29
- def allows_script?
30
- false
31
- end
32
- end
33
-
34
- # Future proof mode for Redcarpet 2.x (not yet released)
35
- class Redcarpet2Template < Template
36
- self.default_mime_type = 'text/html'
37
-
38
- def generate_renderer
39
- renderer = options.delete(:renderer) || ::Redcarpet::Render::HTML.new(options)
40
- return renderer unless options.delete(:smartypants)
41
- return renderer if renderer.is_a?(Class) && renderer <= ::Redcarpet::Render::SmartyPants
42
-
43
- if renderer == ::Redcarpet::Render::XHTML
44
- ::Redcarpet::Render::SmartyHTML.new(:xhtml => true)
45
- elsif renderer == ::Redcarpet::Render::HTML
46
- ::Redcarpet::Render::SmartyHTML
47
- elsif renderer.is_a? Class
48
- Class.new(renderer) { include ::Redcarpet::Render::SmartyPants }
49
- else
50
- renderer.extend ::Redcarpet::Render::SmartyPants
51
- end
52
- end
53
-
54
- def prepare
55
- # try to support the same aliases
56
- Redcarpet1Template::ALIAS.each do |opt, aka|
57
- next if options.key? opt or not options.key? aka
58
- options[opt] = options.delete(aka)
59
- end
60
-
61
- # only raise an exception if someone is trying to enable :escape_html
62
- options.delete(:escape_html) unless options[:escape_html]
63
-
64
- @engine = ::Redcarpet::Markdown.new(generate_renderer, options)
65
- @output = nil
66
- end
67
-
68
- def evaluate(scope, locals, &block)
69
- @output ||= @engine.render(data)
70
- end
71
-
72
- def allows_script?
73
- false
74
- end
75
- end
76
-
77
- if defined? ::Redcarpet::Render and defined? ::Redcarpet::Markdown
78
- RedcarpetTemplate = Redcarpet2Template
79
- else
80
- RedcarpetTemplate = Redcarpet1Template
81
- end
82
- end
83
-
@@ -1,23 +0,0 @@
1
- require 'tilt/template'
2
- require 'redcloth'
3
-
4
- module Tilt
5
- # RedCloth implementation. See:
6
- # http://redcloth.org/
7
- class RedClothTemplate < Template
8
- def prepare
9
- @engine = RedCloth.new(data)
10
- options.each {|k, v| @engine.send("#{k}=", v) if @engine.respond_to? "#{k}="}
11
- @output = nil
12
- end
13
-
14
- def evaluate(scope, locals, &block)
15
- @output ||= @engine.to_html
16
- end
17
-
18
- def allows_script?
19
- false
20
- end
21
- end
22
- end
23
-
@@ -1,18 +0,0 @@
1
- require 'tilt/template'
2
- require 'tilt/pandoc'
3
-
4
- module Tilt
5
- # Pandoc reStructuredText implementation. See:
6
- # http://pandoc.org/
7
- # Use PandocTemplate and specify input format
8
- class RstPandocTemplate < PandocTemplate
9
- def tilt_to_pandoc_mapping
10
- { :smartypants => :smart }
11
- end
12
-
13
- def pandoc_options
14
- options.merge!(f: 'rst')
15
- super
16
- end
17
- end
18
- end
@@ -1,52 +0,0 @@
1
- require 'tilt/template'
2
-
3
- module Tilt
4
- # Sass template implementation. See:
5
- # http://haml.hamptoncatlin.com/
6
- #
7
- # Sass templates do not support object scopes, locals, or yield.
8
- class SassTemplate < Template
9
- self.default_mime_type = 'text/css'
10
-
11
- begin
12
- require 'sassc'
13
- Sass = ::SassC
14
- rescue LoadError => err
15
- begin
16
- require 'sass'
17
- Sass = ::Sass
18
- rescue LoadError
19
- raise err
20
- end
21
- end
22
-
23
- def prepare
24
- @engine = Sass::Engine.new(data, sass_options)
25
- end
26
-
27
- def evaluate(scope, locals, &block)
28
- @output ||= @engine.render
29
- end
30
-
31
- def allows_script?
32
- false
33
- end
34
-
35
- private
36
- def sass_options
37
- options.merge(:filename => eval_file, :line => line, :syntax => :sass)
38
- end
39
- end
40
-
41
- # Sass's new .scss type template implementation.
42
- class ScssTemplate < SassTemplate
43
- self.default_mime_type = 'text/css'
44
-
45
- private
46
- def sass_options
47
- options.merge(:filename => eval_file, :line => line, :syntax => :scss)
48
- end
49
- end
50
-
51
- end
52
-
@@ -1,34 +0,0 @@
1
- require 'open3'
2
- require 'shellwords'
3
-
4
- module Tilt
5
- # Standalone string interpolator and template processor implementation in Go.
6
- # see: https://github.com/gliderlabs/sigil
7
- class SigilTemplate < Template
8
- def prepare
9
- end
10
-
11
- def evaluate(scope, locals, &block)
12
- variables = locals.map {|k, v| "#{k}=#{v}" }
13
-
14
- cmd = ['sigil']
15
-
16
- unless variables.empty?
17
- cmd << '-p'
18
- cmd.concat(variables)
19
- end
20
-
21
- out, err, status = Open3.capture3(*cmd, :stdin_data => data)
22
-
23
- if status.success?
24
- out.chomp
25
- else
26
- raise err.chomp.gsub('<stdin>', file)
27
- end
28
- end
29
-
30
- def allows_script?
31
- false
32
- end
33
- end
34
- end
@@ -1,297 +0,0 @@
1
- require 'thread'
2
-
3
- module Tilt
4
- # @private
5
- TOPOBJECT = if RUBY_VERSION >= '2.0'
6
- # @private
7
- module CompiledTemplates
8
- self
9
- end
10
- elsif RUBY_VERSION >= '1.9'
11
- BasicObject
12
- else
13
- Object
14
- end
15
- # @private
16
- LOCK = Mutex.new
17
-
18
- # Base class for template implementations. Subclasses must implement
19
- # the #prepare method and one of the #evaluate or #precompiled_template
20
- # methods.
21
- class Template
22
- # Template source; loaded from a file or given directly.
23
- attr_reader :data
24
-
25
- # The name of the file where the template data was loaded from.
26
- attr_reader :file
27
-
28
- # The line number in #file where template data was loaded from.
29
- attr_reader :line
30
-
31
- # A Hash of template engine specific options. This is passed directly
32
- # to the underlying engine and is not used by the generic template
33
- # interface.
34
- attr_reader :options
35
-
36
- class << self
37
- # An empty Hash that the template engine can populate with various
38
- # metadata.
39
- def metadata
40
- @metadata ||= {}
41
- end
42
-
43
- # @deprecated Use `.metadata[:mime_type]` instead.
44
- def default_mime_type
45
- metadata[:mime_type]
46
- end
47
-
48
- # @deprecated Use `.metadata[:mime_type] = val` instead.
49
- def default_mime_type=(value)
50
- metadata[:mime_type] = value
51
- end
52
- end
53
-
54
- # Create a new template with the file, line, and options specified. By
55
- # default, template data is read from the file. When a block is given,
56
- # it should read template data and return as a String. When file is nil,
57
- # a block is required.
58
- #
59
- # All arguments are optional.
60
- def initialize(file=nil, line=1, options={}, &block)
61
- @file, @line, @options = nil, 1, {}
62
-
63
- [options, line, file].compact.each do |arg|
64
- case
65
- when arg.respond_to?(:to_str) ; @file = arg.to_str
66
- when arg.respond_to?(:to_int) ; @line = arg.to_int
67
- when arg.respond_to?(:to_hash) ; @options = arg.to_hash.dup
68
- when arg.respond_to?(:path) ; @file = arg.path
69
- when arg.respond_to?(:to_path) ; @file = arg.to_path
70
- else raise TypeError, "Can't load the template file. Pass a string with a path " +
71
- "or an object that responds to 'to_str', 'path' or 'to_path'"
72
- end
73
- end
74
-
75
- raise ArgumentError, "file or block required" if (@file || block).nil?
76
-
77
- # used to hold compiled template methods
78
- @compiled_method = {}
79
-
80
- # used on 1.9 to set the encoding if it is not set elsewhere (like a magic comment)
81
- # currently only used if template compiles to ruby
82
- @default_encoding = @options.delete :default_encoding
83
-
84
- # load template data and prepare (uses binread to avoid encoding issues)
85
- @reader = block || lambda { |t| read_template_file }
86
- @data = @reader.call(self)
87
-
88
- if @data.respond_to?(:force_encoding)
89
- if default_encoding
90
- @data = @data.dup if @data.frozen?
91
- @data.force_encoding(default_encoding)
92
- end
93
-
94
- if !@data.valid_encoding?
95
- raise Encoding::InvalidByteSequenceError, "#{eval_file} is not valid #{@data.encoding}"
96
- end
97
- end
98
-
99
- prepare
100
- end
101
-
102
- # Render the template in the given scope with the locals specified. If a
103
- # block is given, it is typically available within the template via
104
- # +yield+.
105
- def render(scope=nil, locals={}, &block)
106
- scope ||= Object.new
107
- current_template = Thread.current[:tilt_current_template]
108
- Thread.current[:tilt_current_template] = self
109
- evaluate(scope, locals || {}, &block)
110
- ensure
111
- Thread.current[:tilt_current_template] = current_template
112
- end
113
-
114
- # The basename of the template file.
115
- def basename(suffix='')
116
- File.basename(file, suffix) if file
117
- end
118
-
119
- # The template file's basename with all extensions chomped off.
120
- def name
121
- basename.split('.', 2).first if basename
122
- end
123
-
124
- # The filename used in backtraces to describe the template.
125
- def eval_file
126
- file || '(__TEMPLATE__)'
127
- end
128
-
129
- # An empty Hash that the template engine can populate with various
130
- # metadata.
131
- def metadata
132
- if respond_to?(:allows_script?)
133
- self.class.metadata.merge(:allows_script => allows_script?)
134
- else
135
- self.class.metadata
136
- end
137
- end
138
-
139
- protected
140
-
141
- # @!group For template implementations
142
-
143
- # The encoding of the source data. Defaults to the
144
- # default_encoding-option if present. You may override this method
145
- # in your template class if you have a better hint of the data's
146
- # encoding.
147
- def default_encoding
148
- @default_encoding
149
- end
150
-
151
- # Do whatever preparation is necessary to setup the underlying template
152
- # engine. Called immediately after template data is loaded. Instance
153
- # variables set in this method are available when #evaluate is called.
154
- #
155
- # Subclasses must provide an implementation of this method.
156
- def prepare
157
- raise NotImplementedError
158
- end
159
-
160
- # Execute the compiled template and return the result string. Template
161
- # evaluation is guaranteed to be performed in the scope object with the
162
- # locals specified and with support for yielding to the block.
163
- #
164
- # This method is only used by source generating templates. Subclasses that
165
- # override render() may not support all features.
166
- def evaluate(scope, locals, &block)
167
- locals_keys = locals.keys
168
- locals_keys.sort!{|x, y| x.to_s <=> y.to_s}
169
- method = compiled_method(locals_keys, scope.is_a?(Module) ? scope : scope.class)
170
- method.bind(scope).call(locals, &block)
171
- end
172
-
173
- # Generates all template source by combining the preamble, template, and
174
- # postamble and returns a two-tuple of the form: [source, offset], where
175
- # source is the string containing (Ruby) source code for the template and
176
- # offset is the integer line offset where line reporting should begin.
177
- #
178
- # Template subclasses may override this method when they need complete
179
- # control over source generation or want to adjust the default line
180
- # offset. In most cases, overriding the #precompiled_template method is
181
- # easier and more appropriate.
182
- def precompiled(local_keys)
183
- preamble = precompiled_preamble(local_keys)
184
- template = precompiled_template(local_keys)
185
- postamble = precompiled_postamble(local_keys)
186
- source = String.new
187
-
188
- # Ensure that our generated source code has the same encoding as the
189
- # the source code generated by the template engine.
190
- if source.respond_to?(:force_encoding)
191
- template_encoding = extract_encoding(template)
192
-
193
- source.force_encoding(template_encoding)
194
- template.force_encoding(template_encoding)
195
- end
196
-
197
- source << preamble << "\n" << template << "\n" << postamble
198
-
199
- [source, preamble.count("\n")+1]
200
- end
201
-
202
- # A string containing the (Ruby) source code for the template. The
203
- # default Template#evaluate implementation requires either this
204
- # method or the #precompiled method be overridden. When defined,
205
- # the base Template guarantees correct file/line handling, locals
206
- # support, custom scopes, proper encoding, and support for template
207
- # compilation.
208
- def precompiled_template(local_keys)
209
- raise NotImplementedError
210
- end
211
-
212
- def precompiled_preamble(local_keys)
213
- ''
214
- end
215
-
216
- def precompiled_postamble(local_keys)
217
- ''
218
- end
219
-
220
- # !@endgroup
221
-
222
- private
223
-
224
- def read_template_file
225
- data = File.open(file, 'rb') { |io| io.read }
226
- if data.respond_to?(:force_encoding)
227
- # Set it to the default external (without verifying)
228
- data.force_encoding(Encoding.default_external) if Encoding.default_external
229
- end
230
- data
231
- end
232
-
233
- # The compiled method for the locals keys provided.
234
- def compiled_method(locals_keys, scope_class=nil)
235
- LOCK.synchronize do
236
- @compiled_method[[scope_class, locals_keys]] ||= compile_template_method(locals_keys, scope_class)
237
- end
238
- end
239
-
240
- def local_extraction(local_keys)
241
- local_keys.map do |k|
242
- if k.to_s =~ /\A[a-z_][a-zA-Z_0-9]*\z/
243
- "#{k} = locals[#{k.inspect}]"
244
- else
245
- raise "invalid locals key: #{k.inspect} (keys must be variable names)"
246
- end
247
- end.join("\n")
248
- end
249
-
250
- def compile_template_method(local_keys, scope_class=nil)
251
- source, offset = precompiled(local_keys)
252
- local_code = local_extraction(local_keys)
253
-
254
- method_name = "__tilt_#{Thread.current.object_id.abs}"
255
- method_source = String.new
256
-
257
- if method_source.respond_to?(:force_encoding)
258
- method_source.force_encoding(source.encoding)
259
- end
260
-
261
- method_source << <<-RUBY
262
- TOPOBJECT.class_eval do
263
- def #{method_name}(locals)
264
- #{local_code}
265
- RUBY
266
- offset += method_source.count("\n")
267
- method_source << source
268
- method_source << "\nend;end;"
269
- (scope_class || Object).class_eval(method_source, eval_file, line - offset)
270
- unbind_compiled_method(method_name)
271
- end
272
-
273
- def unbind_compiled_method(method_name)
274
- method = TOPOBJECT.instance_method(method_name)
275
- TOPOBJECT.class_eval { remove_method(method_name) }
276
- method
277
- end
278
-
279
- def extract_encoding(script)
280
- extract_magic_comment(script) || script.encoding
281
- end
282
-
283
- def extract_magic_comment(script)
284
- binary(script) do
285
- script[/\A[ \t]*\#.*coding\s*[=:]\s*([[:alnum:]\-_]+).*$/n, 1]
286
- end
287
- end
288
-
289
- def binary(string)
290
- original_encoding = string.encoding
291
- string.force_encoding(Encoding::BINARY)
292
- yield
293
- ensure
294
- string.force_encoding(original_encoding)
295
- end
296
- end
297
- end