brakeman 4.4.0 → 4.5.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of brakeman might be problematic. Click here for more details.

Files changed (362) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +17 -0
  3. data/bundle/load.rb +7 -8
  4. data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/History.rdoc +8 -0
  5. data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/Manifest.txt +0 -0
  6. data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/README.rdoc +0 -0
  7. data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/lib/ruby2ruby.rb +34 -36
  8. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/History.rdoc +47 -0
  9. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/Manifest.txt +5 -4
  10. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/README.rdoc +0 -0
  11. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/compare/normalize.rb +29 -2
  12. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/debugging.md +18 -0
  13. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/rp_extensions.rb +0 -7
  14. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/rp_stringscanner.rb +0 -0
  15. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby20_parser.rb +6874 -0
  16. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby20_parser.y +284 -201
  17. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby21_parser.rb +6952 -0
  18. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby21_parser.y +281 -197
  19. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby22_parser.rb +6983 -0
  20. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib/ruby_parser.yy → ruby_parser-3.13.0/lib/ruby22_parser.y} +280 -306
  21. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby23_parser.rb +6982 -0
  22. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby23_parser.y +282 -203
  23. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby24_parser.rb +6982 -0
  24. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby24_parser.y +282 -203
  25. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby25_parser.rb +6981 -0
  26. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby25_parser.y +282 -203
  27. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby26_parser.rb +6999 -0
  28. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby26_parser.y +2469 -0
  29. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_lexer.rb +116 -118
  30. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_lexer.rex +10 -8
  31. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_lexer.rex.rb +8 -8
  32. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_parser.rb +5 -7
  33. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby_parser.yy +2571 -0
  34. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby_parser_extras.rb +1360 -0
  35. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/tools/munge.rb +216 -0
  36. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/tools/ripper.rb +23 -0
  37. data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/History.rdoc +6 -0
  38. data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt +19 -0
  39. data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/README.rdoc +54 -0
  40. data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +5 -0
  41. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib → ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy}/ruby18_parser.rb +7 -6
  42. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib → ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy}/ruby18_parser.y +5 -4
  43. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib → ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy}/ruby19_parser.rb +7 -6
  44. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib → ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy}/ruby19_parser.y +5 -4
  45. data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +1412 -0
  46. data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +179 -0
  47. data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +323 -0
  48. data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +30 -0
  49. data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib → ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy}/ruby_parser_extras.rb +43 -33
  50. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/CHANGES.md +5 -0
  51. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/Gemfile +0 -0
  52. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/LICENSE.txt +0 -0
  53. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/README.md +0 -0
  54. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/bundle_install_all_ruby_versions.sh +0 -0
  55. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml.rb +0 -0
  56. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/deep.rb +0 -0
  57. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/libyaml_checker.rb +0 -0
  58. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/load.rb +0 -0
  59. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/parse/date.rb +2 -0
  60. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/parse/hexadecimal.rb +0 -0
  61. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/parse/sexagesimal.rb +0 -0
  62. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/psych_handler.rb +0 -0
  63. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/psych_resolver.rb +0 -0
  64. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/resolver.rb +0 -0
  65. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -0
  66. data/bundle/ruby/2.5.0/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +39 -0
  67. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/syck_hack.rb +0 -0
  68. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/syck_node_monkeypatch.rb +0 -0
  69. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/syck_resolver.rb +0 -0
  70. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform.rb +0 -0
  71. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_boolean.rb +0 -0
  72. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_date.rb +0 -0
  73. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_float.rb +0 -0
  74. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_integer.rb +0 -0
  75. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_nil.rb +0 -0
  76. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_symbol.rb +0 -0
  77. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/transformation_map.rb +0 -0
  78. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/version.rb +1 -1
  79. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/run_specs_all_ruby_versions.sh +0 -0
  80. data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/safe_yaml.gemspec +0 -0
  81. data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/History.rdoc +8 -0
  82. data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/Manifest.txt +0 -0
  83. data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/README.rdoc +0 -0
  84. data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/composite_sexp_processor.rb +0 -0
  85. data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/pt_testcase.rb +2 -2
  86. data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/sexp.rb +4 -4
  87. data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/sexp_processor.rb +1 -1
  88. data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/strict_sexp.rb +3 -3
  89. data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/unique.rb +0 -0
  90. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/CHANGES +6 -0
  91. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/EXPRESSIONS.md +1 -1
  92. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/Gemfile +0 -0
  93. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/LICENSE +0 -0
  94. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/README.md +1 -1
  95. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple.rb +0 -0
  96. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/engine.rb +0 -0
  97. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/engine.rb +0 -0
  98. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/parser.rb +0 -0
  99. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/template.rb +0 -0
  100. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/trimming.rb +0 -0
  101. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/exceptions.rb +0 -0
  102. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filter.rb +0 -0
  103. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/code_merger.rb +0 -0
  104. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/control_flow.rb +0 -0
  105. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/dynamic_inliner.rb +0 -0
  106. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/encoding.rb +0 -0
  107. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/eraser.rb +0 -0
  108. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/escapable.rb +0 -0
  109. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/multi_flattener.rb +0 -0
  110. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/remove_bom.rb +0 -0
  111. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/static_analyzer.rb +0 -0
  112. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/static_merger.rb +0 -0
  113. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/string_splitter.rb +0 -0
  114. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/validator.rb +0 -0
  115. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generator.rb +0 -0
  116. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/array.rb +0 -0
  117. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/array_buffer.rb +0 -0
  118. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/erb.rb +0 -0
  119. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/rails_output_buffer.rb +0 -0
  120. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/string_buffer.rb +0 -0
  121. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/grammar.rb +0 -0
  122. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/attribute_merger.rb +0 -0
  123. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/attribute_remover.rb +0 -0
  124. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/attribute_sorter.rb +0 -0
  125. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/dispatcher.rb +0 -0
  126. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/fast.rb +0 -0
  127. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/filter.rb +0 -0
  128. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/pretty.rb +0 -0
  129. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/safe.rb +0 -0
  130. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/map.rb +0 -0
  131. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/dispatcher.rb +2 -1
  132. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/engine_dsl.rb +0 -0
  133. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/grammar_dsl.rb +0 -0
  134. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/options.rb +0 -0
  135. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/template.rb +0 -0
  136. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/parser.rb +0 -0
  137. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/static_analyzer.rb +0 -0
  138. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/templates.rb +0 -0
  139. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/templates/rails.rb +2 -2
  140. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/templates/tilt.rb +0 -0
  141. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/utils.rb +0 -0
  142. data/bundle/ruby/2.5.0/gems/temple-0.8.1/lib/temple/version.rb +3 -0
  143. data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/temple.gemspec +0 -0
  144. data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/CHANGELOG.md +4 -0
  145. data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/MIT-LICENSE.txt +1 -1
  146. data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/README.md +10 -10
  147. data/bundle/ruby/2.5.0/gems/unicode-display_width-1.5.0/data/display_width.marshal.gz +0 -0
  148. data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/lib/unicode/display_width.rb +0 -0
  149. data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/lib/unicode/display_width/constants.rb +2 -2
  150. data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/lib/unicode/display_width/index.rb +0 -0
  151. data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/lib/unicode/display_width/no_string_ext.rb +0 -0
  152. data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/lib/unicode/display_width/string_ext.rb +0 -0
  153. data/lib/brakeman/checks/base_check.rb +16 -0
  154. data/lib/brakeman/checks/check_content_tag.rb +12 -0
  155. data/lib/brakeman/checks/check_cross_site_scripting.rb +6 -6
  156. data/lib/brakeman/checks/check_evaluation.rb +0 -1
  157. data/lib/brakeman/checks/check_execute.rb +18 -0
  158. data/lib/brakeman/checks/check_send.rb +0 -1
  159. data/lib/brakeman/checks/check_session_manipulation.rb +0 -1
  160. data/lib/brakeman/checks/check_sql.rb +12 -3
  161. data/lib/brakeman/file_parser.rb +8 -4
  162. data/lib/brakeman/parsers/haml_embedded.rb +44 -0
  163. data/lib/brakeman/parsers/slim_embedded.rb +44 -0
  164. data/lib/brakeman/parsers/template_parser.rb +2 -4
  165. data/lib/brakeman/processors/alias_processor.rb +23 -1
  166. data/lib/brakeman/processors/lib/call_conversion_helper.rb +4 -0
  167. data/lib/brakeman/processors/slim_template_processor.rb +16 -0
  168. data/lib/brakeman/processors/template_alias_processor.rb +2 -2
  169. data/lib/brakeman/scanner.rb +11 -10
  170. data/lib/brakeman/tracker.rb +5 -1
  171. data/lib/brakeman/tracker/config.rb +32 -7
  172. data/lib/brakeman/util.rb +17 -0
  173. data/lib/brakeman/version.rb +1 -1
  174. metadata +157 -320
  175. data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby20_parser.rb +0 -6687
  176. data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby21_parser.rb +0 -6767
  177. data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby22_parser.rb +0 -6803
  178. data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby22_parser.y +0 -2376
  179. data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby23_parser.rb +0 -6818
  180. data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby24_parser.rb +0 -6818
  181. data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby25_parser.rb +0 -6818
  182. data/bundle/ruby/2.5.0/gems/sass-3.4.25/CODE_OF_CONDUCT.md +0 -10
  183. data/bundle/ruby/2.5.0/gems/sass-3.4.25/CONTRIBUTING.md +0 -148
  184. data/bundle/ruby/2.5.0/gems/sass-3.4.25/MIT-LICENSE +0 -20
  185. data/bundle/ruby/2.5.0/gems/sass-3.4.25/README.md +0 -227
  186. data/bundle/ruby/2.5.0/gems/sass-3.4.25/REVISION +0 -1
  187. data/bundle/ruby/2.5.0/gems/sass-3.4.25/VERSION +0 -1
  188. data/bundle/ruby/2.5.0/gems/sass-3.4.25/VERSION_DATE +0 -1
  189. data/bundle/ruby/2.5.0/gems/sass-3.4.25/VERSION_NAME +0 -1
  190. data/bundle/ruby/2.5.0/gems/sass-3.4.25/extra/sass-spec-ref.sh +0 -32
  191. data/bundle/ruby/2.5.0/gems/sass-3.4.25/extra/update_watch.rb +0 -13
  192. data/bundle/ruby/2.5.0/gems/sass-3.4.25/init.rb +0 -18
  193. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass.rb +0 -109
  194. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores.rb +0 -15
  195. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/base.rb +0 -88
  196. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/chain.rb +0 -34
  197. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/filesystem.rb +0 -60
  198. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/memory.rb +0 -46
  199. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/null.rb +0 -25
  200. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/callbacks.rb +0 -67
  201. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/css.rb +0 -408
  202. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/deprecation.rb +0 -55
  203. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/engine.rb +0 -1226
  204. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/environment.rb +0 -215
  205. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/error.rb +0 -198
  206. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec.rb +0 -9
  207. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec/base.rb +0 -199
  208. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec/sass_convert.rb +0 -283
  209. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec/sass_scss.rb +0 -440
  210. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/features.rb +0 -47
  211. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers.rb +0 -23
  212. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers/base.rb +0 -182
  213. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers/deprecated_path.rb +0 -51
  214. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers/filesystem.rb +0 -219
  215. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger.rb +0 -17
  216. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger/base.rb +0 -36
  217. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger/delayed.rb +0 -50
  218. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger/log_level.rb +0 -45
  219. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/media.rb +0 -210
  220. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin.rb +0 -134
  221. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb +0 -582
  222. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/configuration.rb +0 -134
  223. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/generic.rb +0 -15
  224. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/merb.rb +0 -48
  225. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/rack.rb +0 -60
  226. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/rails.rb +0 -47
  227. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/staleness_checker.rb +0 -199
  228. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/railtie.rb +0 -10
  229. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/repl.rb +0 -57
  230. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/root.rb +0 -7
  231. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script.rb +0 -66
  232. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/css_lexer.rb +0 -33
  233. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/css_parser.rb +0 -33
  234. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/css_variable_warning.rb +0 -52
  235. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/functions.rb +0 -2693
  236. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/lexer.rb +0 -464
  237. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/parser.rb +0 -832
  238. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree.rb +0 -16
  239. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/funcall.rb +0 -313
  240. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/interpolation.rb +0 -223
  241. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/list_literal.rb +0 -104
  242. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/literal.rb +0 -49
  243. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/map_literal.rb +0 -64
  244. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/node.rb +0 -127
  245. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/operation.rb +0 -156
  246. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/selector.rb +0 -26
  247. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/string_interpolation.rb +0 -125
  248. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/unary_operation.rb +0 -69
  249. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/variable.rb +0 -57
  250. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value.rb +0 -11
  251. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/arg_list.rb +0 -36
  252. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/base.rb +0 -241
  253. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/bool.rb +0 -35
  254. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/color.rb +0 -698
  255. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/helpers.rb +0 -272
  256. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/list.rb +0 -113
  257. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/map.rb +0 -70
  258. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/null.rb +0 -44
  259. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/number.rb +0 -563
  260. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/string.rb +0 -138
  261. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss.rb +0 -14
  262. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/css_parser.rb +0 -56
  263. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/parser.rb +0 -1254
  264. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/rx.rb +0 -140
  265. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/static_parser.rb +0 -373
  266. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector.rb +0 -323
  267. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/abstract_sequence.rb +0 -111
  268. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/comma_sequence.rb +0 -191
  269. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/pseudo.rb +0 -266
  270. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/sequence.rb +0 -636
  271. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/simple.rb +0 -117
  272. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/simple_sequence.rb +0 -344
  273. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/shared.rb +0 -76
  274. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/source/map.rb +0 -213
  275. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/source/position.rb +0 -39
  276. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/source/range.rb +0 -41
  277. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/stack.rb +0 -120
  278. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/supports.rb +0 -225
  279. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/at_root_node.rb +0 -83
  280. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/charset_node.rb +0 -22
  281. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/comment_node.rb +0 -82
  282. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/content_node.rb +0 -9
  283. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/css_import_node.rb +0 -68
  284. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/debug_node.rb +0 -18
  285. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/directive_node.rb +0 -59
  286. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/each_node.rb +0 -24
  287. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/error_node.rb +0 -18
  288. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/extend_node.rb +0 -43
  289. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/for_node.rb +0 -36
  290. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/function_node.rb +0 -44
  291. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/if_node.rb +0 -52
  292. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/import_node.rb +0 -75
  293. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/keyframe_rule_node.rb +0 -15
  294. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/media_node.rb +0 -48
  295. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/mixin_def_node.rb +0 -38
  296. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/mixin_node.rb +0 -52
  297. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/node.rb +0 -240
  298. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/prop_node.rb +0 -170
  299. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/return_node.rb +0 -19
  300. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/root_node.rb +0 -44
  301. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/rule_node.rb +0 -155
  302. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/supports_node.rb +0 -38
  303. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/trace_node.rb +0 -33
  304. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/variable_node.rb +0 -36
  305. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/base.rb +0 -72
  306. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/check_nesting.rb +0 -173
  307. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/convert.rb +0 -351
  308. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/cssize.rb +0 -373
  309. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/deep_copy.rb +0 -107
  310. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/extend.rb +0 -70
  311. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/perform.rb +0 -564
  312. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/set_options.rb +0 -139
  313. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/to_css.rb +0 -409
  314. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/warn_node.rb +0 -18
  315. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/while_node.rb +0 -18
  316. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util.rb +0 -1375
  317. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/cross_platform_random.rb +0 -19
  318. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/multibyte_string_scanner.rb +0 -155
  319. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/normalized_map.rb +0 -129
  320. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/ordered_hash.rb +0 -192
  321. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/subset_map.rb +0 -109
  322. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/test.rb +0 -9
  323. data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/version.rb +0 -124
  324. data/bundle/ruby/2.5.0/gems/sass-3.4.25/rails/init.rb +0 -1
  325. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/CHANGELOG.md +0 -1
  326. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/CONTRIBUTING.md +0 -38
  327. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Gemfile +0 -20
  328. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Guardfile +0 -8
  329. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/LICENSE +0 -20
  330. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/README.md +0 -349
  331. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Rakefile +0 -5
  332. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Vagrantfile +0 -96
  333. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen.rb +0 -54
  334. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapter.rb +0 -327
  335. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/bsd.rb +0 -75
  336. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/darwin.rb +0 -48
  337. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/linux.rb +0 -81
  338. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/polling.rb +0 -58
  339. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/windows.rb +0 -91
  340. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/directory_record.rb +0 -406
  341. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/listener.rb +0 -323
  342. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/turnstile.rb +0 -32
  343. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/version.rb +0 -3
  344. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/listen.gemspec +0 -28
  345. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapter_spec.rb +0 -149
  346. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/bsd_spec.rb +0 -36
  347. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/darwin_spec.rb +0 -37
  348. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/linux_spec.rb +0 -47
  349. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/polling_spec.rb +0 -68
  350. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/windows_spec.rb +0 -30
  351. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/directory_record_spec.rb +0 -1250
  352. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/listener_spec.rb +0 -258
  353. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/turnstile_spec.rb +0 -56
  354. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen_spec.rb +0 -67
  355. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/spec_helper.rb +0 -25
  356. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/adapter_helper.rb +0 -666
  357. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/directory_record_helper.rb +0 -57
  358. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/fixtures_helper.rb +0 -29
  359. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/listeners_helper.rb +0 -179
  360. data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/platform_helper.rb +0 -15
  361. data/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/version.rb +0 -3
  362. data/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.1/data/display_width.marshal.gz +0 -0
@@ -1,26 +0,0 @@
1
- module Sass::Script::Tree
2
- # A SassScript node that will resolve to the current selector.
3
- class Selector < Node
4
- def initialize; end
5
-
6
- def children
7
- []
8
- end
9
-
10
- def to_sass(opts = {})
11
- '&'
12
- end
13
-
14
- def deep_copy
15
- dup
16
- end
17
-
18
- protected
19
-
20
- def _perform(environment)
21
- selector = environment.selector
22
- return opts(Sass::Script::Value::Null.new) unless selector
23
- opts(selector.to_sass_script)
24
- end
25
- end
26
- end
@@ -1,125 +0,0 @@
1
- module Sass::Script::Tree
2
- # A SassScript object representing `#{}` interpolation within a string.
3
- #
4
- # @see Interpolation
5
- class StringInterpolation < Node
6
- # @return [Literal] The string literal before this interpolation.
7
- attr_reader :before
8
-
9
- # @return [Node] The SassScript within the interpolation
10
- attr_reader :mid
11
-
12
- # @return [StringInterpolation, Literal]
13
- # The string literal or string interpolation before this interpolation.
14
- attr_reader :after
15
-
16
- # Whether this is a CSS string or a CSS identifier. The difference is that
17
- # strings are written with double-quotes, while identifiers aren't.
18
- #
19
- # String interpolations are only ever identifiers if they're quote-like
20
- # functions such as `url()`.
21
- #
22
- # @return [Symbol] `:string` or `:identifier`
23
- def type
24
- @before.value.type
25
- end
26
-
27
- # Returns the quote character that should be used to wrap a Sass
28
- # representation of this interpolation.
29
- def quote
30
- quote_for(self) || '"'
31
- end
32
-
33
- # Interpolation in a string is of the form `"before #{mid} after"`,
34
- # where `before` and `after` may include more interpolation.
35
- #
36
- # @param before [StringInterpolation, Literal] See {StringInterpolation#before}
37
- # @param mid [Node] See {StringInterpolation#mid}
38
- # @param after [Literal] See {StringInterpolation#after}
39
- def initialize(before, mid, after)
40
- @before = before
41
- @mid = mid
42
- @after = after
43
- end
44
-
45
- # @return [String] A human-readable s-expression representation of the interpolation
46
- def inspect
47
- "(string_interpolation #{@before.inspect} #{@mid.inspect} #{@after.inspect})"
48
- end
49
-
50
- # @see Node#to_sass
51
- def to_sass(opts = {})
52
- quote = type == :string ? opts[:quote] || quote_for(self) || '"' : :none
53
- opts = opts.merge(:quote => quote)
54
-
55
- res = ""
56
- res << quote if quote != :none
57
- res << _to_sass(before, opts)
58
- res << '#{' << @mid.to_sass(opts.merge(:quote => nil)) << '}'
59
- res << _to_sass(after, opts)
60
- res << quote if quote != :none
61
- res
62
- end
63
-
64
- # Returns the three components of the interpolation, `before`, `mid`, and `after`.
65
- #
66
- # @return [Array<Node>]
67
- # @see #initialize
68
- # @see Node#children
69
- def children
70
- [@before, @mid, @after].compact
71
- end
72
-
73
- # @see Node#deep_copy
74
- def deep_copy
75
- node = dup
76
- node.instance_variable_set('@before', @before.deep_copy) if @before
77
- node.instance_variable_set('@mid', @mid.deep_copy)
78
- node.instance_variable_set('@after', @after.deep_copy) if @after
79
- node
80
- end
81
-
82
- protected
83
-
84
- # Evaluates the interpolation.
85
- #
86
- # @param environment [Sass::Environment] The environment in which to evaluate the SassScript
87
- # @return [Sass::Script::Value::String]
88
- # The SassScript string that is the value of the interpolation
89
- def _perform(environment)
90
- res = ""
91
- before = @before.perform(environment)
92
- res << before.value
93
- mid = @mid.perform(environment)
94
- res << (mid.is_a?(Sass::Script::Value::String) ? mid.value : mid.to_s(:quote => :none))
95
- res << @after.perform(environment).value
96
- opts(Sass::Script::Value::String.new(res, before.type))
97
- end
98
-
99
- private
100
-
101
- def _to_sass(string_or_interp, opts)
102
- result = string_or_interp.to_sass(opts)
103
- opts[:quote] == :none ? result : result.slice(1...-1)
104
- end
105
-
106
- def quote_for(string_or_interp)
107
- if string_or_interp.is_a?(Sass::Script::Tree::Literal)
108
- return nil if string_or_interp.value.value.empty?
109
- return '"' if string_or_interp.value.value.include?("'")
110
- return "'" if string_or_interp.value.value.include?('"')
111
- return nil
112
- end
113
-
114
- # Double-quotes take precedence over single quotes.
115
- before_quote = quote_for(string_or_interp.before)
116
- return '"' if before_quote == '"'
117
- after_quote = quote_for(string_or_interp.after)
118
- return '"' if after_quote == '"'
119
-
120
- # Returns "'" if either or both insist on single quotes, and nil
121
- # otherwise.
122
- before_quote || after_quote
123
- end
124
- end
125
- end
@@ -1,69 +0,0 @@
1
- module Sass::Script::Tree
2
- # A SassScript parse node representing a unary operation,
3
- # such as `-$b` or `not true`.
4
- #
5
- # Currently only `-`, `/`, and `not` are unary operators.
6
- class UnaryOperation < Node
7
- # @return [Symbol] The operation to perform
8
- attr_reader :operator
9
-
10
- # @return [Script::Node] The parse-tree node for the object of the operator
11
- attr_reader :operand
12
-
13
- # @param operand [Script::Node] See \{#operand}
14
- # @param operator [Symbol] See \{#operator}
15
- def initialize(operand, operator)
16
- @operand = operand
17
- @operator = operator
18
- super()
19
- end
20
-
21
- # @return [String] A human-readable s-expression representation of the operation
22
- def inspect
23
- "(#{@operator.inspect} #{@operand.inspect})"
24
- end
25
-
26
- # @see Node#to_sass
27
- def to_sass(opts = {})
28
- operand = @operand.to_sass(opts)
29
- if @operand.is_a?(Operation) ||
30
- (@operator == :minus &&
31
- (operand =~ Sass::SCSS::RX::IDENT) == 0)
32
- operand = "(#{@operand.to_sass(opts)})"
33
- end
34
- op = Sass::Script::Lexer::OPERATORS_REVERSE[@operator]
35
- op + (op =~ /[a-z]/ ? " " : "") + operand
36
- end
37
-
38
- # Returns the operand of the operation.
39
- #
40
- # @return [Array<Node>]
41
- # @see Node#children
42
- def children
43
- [@operand]
44
- end
45
-
46
- # @see Node#deep_copy
47
- def deep_copy
48
- node = dup
49
- node.instance_variable_set('@operand', @operand.deep_copy)
50
- node
51
- end
52
-
53
- protected
54
-
55
- # Evaluates the operation.
56
- #
57
- # @param environment [Sass::Environment] The environment in which to evaluate the SassScript
58
- # @return [Sass::Script::Value] The SassScript object that is the value of the operation
59
- # @raise [Sass::SyntaxError] if the operation is undefined for the operand
60
- def _perform(environment)
61
- operator = "unary_#{@operator}"
62
- value = @operand.perform(environment)
63
- value.send(operator)
64
- rescue NoMethodError => e
65
- raise e unless e.name.to_s == operator.to_s
66
- raise Sass::SyntaxError.new("Undefined unary operation: \"#{@operator} #{value}\".")
67
- end
68
- end
69
- end
@@ -1,57 +0,0 @@
1
- module Sass::Script::Tree
2
- # A SassScript parse node representing a variable.
3
- class Variable < Node
4
- # The name of the variable.
5
- #
6
- # @return [String]
7
- attr_reader :name
8
-
9
- # The underscored name of the variable.
10
- #
11
- # @return [String]
12
- attr_reader :underscored_name
13
-
14
- # @param name [String] See \{#name}
15
- def initialize(name)
16
- @name = name
17
- @underscored_name = name.tr("-", "_")
18
- super()
19
- end
20
-
21
- # @return [String] A string representation of the variable
22
- def inspect(opts = {})
23
- "$#{dasherize(name, opts)}"
24
- end
25
- alias_method :to_sass, :inspect
26
-
27
- # Returns an empty array.
28
- #
29
- # @return [Array<Node>] empty
30
- # @see Node#children
31
- def children
32
- []
33
- end
34
-
35
- # @see Node#deep_copy
36
- def deep_copy
37
- dup
38
- end
39
-
40
- protected
41
-
42
- # Evaluates the variable.
43
- #
44
- # @param environment [Sass::Environment] The environment in which to evaluate the SassScript
45
- # @return [Sass::Script::Value] The SassScript object that is the value of the variable
46
- # @raise [Sass::SyntaxError] if the variable is undefined
47
- def _perform(environment)
48
- val = environment.var(name)
49
- raise Sass::SyntaxError.new("Undefined variable: \"$#{name}\".") unless val
50
- if val.is_a?(Sass::Script::Value::Number) && val.original
51
- val = val.dup
52
- val.original = nil
53
- end
54
- val
55
- end
56
- end
57
- end
@@ -1,11 +0,0 @@
1
- module Sass::Script::Value; end
2
-
3
- require 'sass/script/value/base'
4
- require 'sass/script/value/string'
5
- require 'sass/script/value/number'
6
- require 'sass/script/value/color'
7
- require 'sass/script/value/bool'
8
- require 'sass/script/value/null'
9
- require 'sass/script/value/list'
10
- require 'sass/script/value/arg_list'
11
- require 'sass/script/value/map'
@@ -1,36 +0,0 @@
1
- module Sass::Script::Value
2
- # A SassScript object representing a variable argument list. This works just
3
- # like a normal list, but can also contain keyword arguments.
4
- #
5
- # The keyword arguments attached to this list are unused except when this is
6
- # passed as a glob argument to a function or mixin.
7
- class ArgList < List
8
- # Whether \{#keywords} has been accessed. If so, we assume that all keywords
9
- # were valid for the function that created this ArgList.
10
- #
11
- # @return [Boolean]
12
- attr_accessor :keywords_accessed
13
-
14
- # Creates a new argument list.
15
- #
16
- # @param value [Array<Value>] See \{List#value}.
17
- # @param keywords [Hash<String, Value>, NormalizedMap<Value>] See \{#keywords}
18
- # @param separator [String] See \{List#separator}.
19
- def initialize(value, keywords, separator)
20
- super(value, separator)
21
- if keywords.is_a?(Sass::Util::NormalizedMap)
22
- @keywords = keywords
23
- else
24
- @keywords = Sass::Util::NormalizedMap.new(keywords)
25
- end
26
- end
27
-
28
- # The keyword arguments attached to this list.
29
- #
30
- # @return [NormalizedMap<Value>]
31
- def keywords
32
- @keywords_accessed = true
33
- @keywords
34
- end
35
- end
36
- end
@@ -1,241 +0,0 @@
1
- module Sass::Script::Value
2
- # The abstract superclass for SassScript objects.
3
- #
4
- # Many of these methods, especially the ones that correspond to SassScript operations,
5
- # are designed to be overridden by subclasses which may change the semantics somewhat.
6
- # The operations listed here are just the defaults.
7
- class Base
8
- # Returns the Ruby value of the value.
9
- # The type of this value varies based on the subclass.
10
- #
11
- # @return [Object]
12
- attr_reader :value
13
-
14
- # The source range in the document on which this node appeared.
15
- #
16
- # @return [Sass::Source::Range]
17
- attr_accessor :source_range
18
-
19
- # Creates a new value.
20
- #
21
- # @param value [Object] The object for \{#value}
22
- def initialize(value = nil)
23
- value.freeze unless value.nil? || value == true || value == false
24
- @value = value
25
- @options = nil
26
- end
27
-
28
- # Sets the options hash for this node,
29
- # as well as for all child nodes.
30
- # See {file:SASS_REFERENCE.md#Options the Sass options documentation}.
31
- #
32
- # @param options [{Symbol => Object}] The options
33
- attr_writer :options
34
-
35
- # Returns the options hash for this node.
36
- #
37
- # @return [{Symbol => Object}]
38
- # @raise [Sass::SyntaxError] if the options hash hasn't been set.
39
- # This should only happen when the value was created
40
- # outside of the parser and \{#to\_s} was called on it
41
- def options
42
- return @options if @options
43
- raise Sass::SyntaxError.new(<<MSG)
44
- The #options attribute is not set on this #{self.class}.
45
- This error is probably occurring because #to_s was called
46
- on this value within a custom Sass function without first
47
- setting the #options attribute.
48
- MSG
49
- end
50
-
51
- # The SassScript `==` operation.
52
- # **Note that this returns a {Sass::Script::Value::Bool} object,
53
- # not a Ruby boolean**.
54
- #
55
- # @param other [Value] The right-hand side of the operator
56
- # @return [Sass::Script::Value::Bool] True if this value is the same as the other,
57
- # false otherwise
58
- def eq(other)
59
- Sass::Script::Value::Bool.new(self.class == other.class && value == other.value)
60
- end
61
-
62
- # The SassScript `!=` operation.
63
- # **Note that this returns a {Sass::Script::Value::Bool} object,
64
- # not a Ruby boolean**.
65
- #
66
- # @param other [Value] The right-hand side of the operator
67
- # @return [Sass::Script::Value::Bool] False if this value is the same as the other,
68
- # true otherwise
69
- def neq(other)
70
- Sass::Script::Value::Bool.new(!eq(other).to_bool)
71
- end
72
-
73
- # The SassScript `==` operation.
74
- # **Note that this returns a {Sass::Script::Value::Bool} object,
75
- # not a Ruby boolean**.
76
- #
77
- # @param other [Value] The right-hand side of the operator
78
- # @return [Sass::Script::Value::Bool] True if this value is the same as the other,
79
- # false otherwise
80
- def unary_not
81
- Sass::Script::Value::Bool.new(!to_bool)
82
- end
83
-
84
- # The SassScript `=` operation
85
- # (used for proprietary MS syntax like `alpha(opacity=20)`).
86
- #
87
- # @param other [Value] The right-hand side of the operator
88
- # @return [Script::Value::String] A string containing both values
89
- # separated by `"="`
90
- def single_eq(other)
91
- Sass::Script::Value::String.new("#{self}=#{other}")
92
- end
93
-
94
- # The SassScript `+` operation.
95
- #
96
- # @param other [Value] The right-hand side of the operator
97
- # @return [Script::Value::String] A string containing both values
98
- # without any separation
99
- def plus(other)
100
- type = other.is_a?(Sass::Script::Value::String) ? other.type : :identifier
101
- Sass::Script::Value::String.new(to_s(:quote => :none) + other.to_s(:quote => :none), type)
102
- end
103
-
104
- # The SassScript `-` operation.
105
- #
106
- # @param other [Value] The right-hand side of the operator
107
- # @return [Script::Value::String] A string containing both values
108
- # separated by `"-"`
109
- def minus(other)
110
- Sass::Script::Value::String.new("#{self}-#{other}")
111
- end
112
-
113
- # The SassScript `/` operation.
114
- #
115
- # @param other [Value] The right-hand side of the operator
116
- # @return [Script::Value::String] A string containing both values
117
- # separated by `"/"`
118
- def div(other)
119
- Sass::Script::Value::String.new("#{self}/#{other}")
120
- end
121
-
122
- # The SassScript unary `+` operation (e.g. `+$a`).
123
- #
124
- # @param other [Value] The right-hand side of the operator
125
- # @return [Script::Value::String] A string containing the value
126
- # preceded by `"+"`
127
- def unary_plus
128
- Sass::Script::Value::String.new("+#{self}")
129
- end
130
-
131
- # The SassScript unary `-` operation (e.g. `-$a`).
132
- #
133
- # @param other [Value] The right-hand side of the operator
134
- # @return [Script::Value::String] A string containing the value
135
- # preceded by `"-"`
136
- def unary_minus
137
- Sass::Script::Value::String.new("-#{self}")
138
- end
139
-
140
- # The SassScript unary `/` operation (e.g. `/$a`).
141
- #
142
- # @param other [Value] The right-hand side of the operator
143
- # @return [Script::Value::String] A string containing the value
144
- # preceded by `"/"`
145
- def unary_div
146
- Sass::Script::Value::String.new("/#{self}")
147
- end
148
-
149
- # Returns the hash code of this value. Two objects' hash codes should be
150
- # equal if the objects are equal.
151
- #
152
- # @return [Integer for Ruby 2.4.0+, Fixnum for earlier Ruby versions] The hash code.
153
- def hash
154
- value.hash
155
- end
156
-
157
- def eql?(other)
158
- self == other
159
- end
160
-
161
- # @return [String] A readable representation of the value
162
- def inspect
163
- value.inspect
164
- end
165
-
166
- # @return [Boolean] `true` (the Ruby boolean value)
167
- def to_bool
168
- true
169
- end
170
-
171
- # Compares this object with another.
172
- #
173
- # @param other [Object] The object to compare with
174
- # @return [Boolean] Whether or not this value is equivalent to `other`
175
- def ==(other)
176
- eq(other).to_bool
177
- end
178
-
179
- # @return [Integer] The integer value of this value
180
- # @raise [Sass::SyntaxError] if this value isn't an integer
181
- def to_i
182
- raise Sass::SyntaxError.new("#{inspect} is not an integer.")
183
- end
184
-
185
- # @raise [Sass::SyntaxError] if this value isn't an integer
186
- def assert_int!; to_i; end
187
-
188
- # Returns the separator for this value. For non-list-like values or the
189
- # empty list, this will be `nil`. For lists or maps, it will be `:space` or
190
- # `:comma`.
191
- #
192
- # @return [Symbol]
193
- def separator; nil; end
194
-
195
- # Returns the value of this value as a list.
196
- # Single values are considered the same as single-element lists.
197
- #
198
- # @return [Array<Value>] This value as a list
199
- def to_a
200
- [self]
201
- end
202
-
203
- # Returns the value of this value as a hash. Most values don't have hash
204
- # representations, but [Map]s and empty [List]s do.
205
- #
206
- # @return [Hash<Value, Value>] This value as a hash
207
- # @raise [Sass::SyntaxError] if this value doesn't have a hash representation
208
- def to_h
209
- raise Sass::SyntaxError.new("#{inspect} is not a map.")
210
- end
211
-
212
- # Returns the string representation of this value
213
- # as it would be output to the CSS document.
214
- #
215
- # @options opts :quote [String]
216
- # The preferred quote style for quoted strings. If `:none`, strings are
217
- # always emitted unquoted.
218
- # @return [String]
219
- def to_s(opts = {})
220
- Sass::Util.abstract(self)
221
- end
222
- alias_method :to_sass, :to_s
223
-
224
- # Returns whether or not this object is null.
225
- #
226
- # @return [Boolean] `false`
227
- def null?
228
- false
229
- end
230
-
231
- protected
232
-
233
- # Evaluates the value.
234
- #
235
- # @param environment [Sass::Environment] The environment in which to evaluate the SassScript
236
- # @return [Value] This value
237
- def _perform(environment)
238
- self
239
- end
240
- end
241
- end