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.
- checksums.yaml +4 -4
- data/CHANGES.md +17 -0
- data/bundle/load.rb +7 -8
- data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/History.rdoc +8 -0
- data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/Manifest.txt +0 -0
- data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/README.rdoc +0 -0
- data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/lib/ruby2ruby.rb +34 -36
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/History.rdoc +47 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/Manifest.txt +5 -4
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/README.rdoc +0 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/compare/normalize.rb +29 -2
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/debugging.md +18 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/rp_extensions.rb +0 -7
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/rp_stringscanner.rb +0 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby20_parser.rb +6874 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby20_parser.y +284 -201
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby21_parser.rb +6952 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby21_parser.y +281 -197
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby22_parser.rb +6983 -0
- 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
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby23_parser.rb +6982 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby23_parser.y +282 -203
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby24_parser.rb +6982 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby24_parser.y +282 -203
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby25_parser.rb +6981 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby25_parser.y +282 -203
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby26_parser.rb +6999 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby26_parser.y +2469 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_lexer.rb +116 -118
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_lexer.rex +10 -8
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_lexer.rex.rb +8 -8
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_parser.rb +5 -7
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby_parser.yy +2571 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby_parser_extras.rb +1360 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/tools/munge.rb +216 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/tools/ripper.rb +23 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/History.rdoc +6 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt +19 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/README.rdoc +54 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +5 -0
- 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
- 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
- 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
- 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
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +1412 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +179 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +323 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +30 -0
- 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
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/CHANGES.md +5 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/Gemfile +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/LICENSE.txt +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/README.md +0 -0
- 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
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/deep.rb +0 -0
- 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
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/load.rb +0 -0
- 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
- 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
- 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
- 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
- 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
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/resolver.rb +0 -0
- 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
- data/bundle/ruby/2.5.0/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +39 -0
- 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
- 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
- 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
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform.rb +0 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/version.rb +1 -1
- 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
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/safe_yaml.gemspec +0 -0
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/History.rdoc +8 -0
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/Manifest.txt +0 -0
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/README.rdoc +0 -0
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/composite_sexp_processor.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/pt_testcase.rb +2 -2
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/sexp.rb +4 -4
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/strict_sexp.rb +3 -3
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/unique.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/CHANGES +6 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/EXPRESSIONS.md +1 -1
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/Gemfile +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/LICENSE +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/README.md +1 -1
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/engine.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/engine.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/parser.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/template.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/trimming.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/exceptions.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filter.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/code_merger.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/control_flow.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/dynamic_inliner.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/encoding.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/eraser.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/escapable.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/multi_flattener.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/remove_bom.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/static_analyzer.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/static_merger.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/string_splitter.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/validator.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generator.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/array.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/array_buffer.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/erb.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/rails_output_buffer.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/string_buffer.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/grammar.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/attribute_merger.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/attribute_remover.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/attribute_sorter.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/dispatcher.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/fast.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/filter.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/pretty.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/safe.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/map.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/dispatcher.rb +2 -1
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/engine_dsl.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/grammar_dsl.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/options.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/template.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/parser.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/static_analyzer.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/templates.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/templates/rails.rb +2 -2
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/templates/tilt.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/utils.rb +0 -0
- data/bundle/ruby/2.5.0/gems/temple-0.8.1/lib/temple/version.rb +3 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/temple.gemspec +0 -0
- data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/CHANGELOG.md +4 -0
- data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/MIT-LICENSE.txt +1 -1
- data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/README.md +10 -10
- data/bundle/ruby/2.5.0/gems/unicode-display_width-1.5.0/data/display_width.marshal.gz +0 -0
- 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
- 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
- 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
- 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
- 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
- data/lib/brakeman/checks/base_check.rb +16 -0
- data/lib/brakeman/checks/check_content_tag.rb +12 -0
- data/lib/brakeman/checks/check_cross_site_scripting.rb +6 -6
- data/lib/brakeman/checks/check_evaluation.rb +0 -1
- data/lib/brakeman/checks/check_execute.rb +18 -0
- data/lib/brakeman/checks/check_send.rb +0 -1
- data/lib/brakeman/checks/check_session_manipulation.rb +0 -1
- data/lib/brakeman/checks/check_sql.rb +12 -3
- data/lib/brakeman/file_parser.rb +8 -4
- data/lib/brakeman/parsers/haml_embedded.rb +44 -0
- data/lib/brakeman/parsers/slim_embedded.rb +44 -0
- data/lib/brakeman/parsers/template_parser.rb +2 -4
- data/lib/brakeman/processors/alias_processor.rb +23 -1
- data/lib/brakeman/processors/lib/call_conversion_helper.rb +4 -0
- data/lib/brakeman/processors/slim_template_processor.rb +16 -0
- data/lib/brakeman/processors/template_alias_processor.rb +2 -2
- data/lib/brakeman/scanner.rb +11 -10
- data/lib/brakeman/tracker.rb +5 -1
- data/lib/brakeman/tracker/config.rb +32 -7
- data/lib/brakeman/util.rb +17 -0
- data/lib/brakeman/version.rb +1 -1
- metadata +157 -320
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby20_parser.rb +0 -6687
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby21_parser.rb +0 -6767
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby22_parser.rb +0 -6803
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby22_parser.y +0 -2376
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby23_parser.rb +0 -6818
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby24_parser.rb +0 -6818
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby25_parser.rb +0 -6818
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/CODE_OF_CONDUCT.md +0 -10
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/CONTRIBUTING.md +0 -148
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/MIT-LICENSE +0 -20
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/README.md +0 -227
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/REVISION +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/VERSION +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/VERSION_DATE +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/VERSION_NAME +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/extra/sass-spec-ref.sh +0 -32
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/extra/update_watch.rb +0 -13
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/init.rb +0 -18
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass.rb +0 -109
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores.rb +0 -15
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/base.rb +0 -88
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/chain.rb +0 -34
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/filesystem.rb +0 -60
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/memory.rb +0 -46
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/null.rb +0 -25
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/callbacks.rb +0 -67
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/css.rb +0 -408
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/deprecation.rb +0 -55
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/engine.rb +0 -1226
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/environment.rb +0 -215
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/error.rb +0 -198
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec.rb +0 -9
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec/base.rb +0 -199
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec/sass_convert.rb +0 -283
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec/sass_scss.rb +0 -440
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/features.rb +0 -47
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers.rb +0 -23
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers/base.rb +0 -182
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers/deprecated_path.rb +0 -51
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers/filesystem.rb +0 -219
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger.rb +0 -17
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger/base.rb +0 -36
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger/delayed.rb +0 -50
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger/log_level.rb +0 -45
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/media.rb +0 -210
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin.rb +0 -134
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb +0 -582
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/configuration.rb +0 -134
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/generic.rb +0 -15
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/merb.rb +0 -48
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/rack.rb +0 -60
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/rails.rb +0 -47
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/staleness_checker.rb +0 -199
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/railtie.rb +0 -10
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/repl.rb +0 -57
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/root.rb +0 -7
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script.rb +0 -66
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/css_lexer.rb +0 -33
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/css_parser.rb +0 -33
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/css_variable_warning.rb +0 -52
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/functions.rb +0 -2693
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/lexer.rb +0 -464
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/parser.rb +0 -832
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree.rb +0 -16
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/funcall.rb +0 -313
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/interpolation.rb +0 -223
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/list_literal.rb +0 -104
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/literal.rb +0 -49
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/map_literal.rb +0 -64
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/node.rb +0 -127
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/operation.rb +0 -156
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/selector.rb +0 -26
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/string_interpolation.rb +0 -125
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/unary_operation.rb +0 -69
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/variable.rb +0 -57
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value.rb +0 -11
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/arg_list.rb +0 -36
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/base.rb +0 -241
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/bool.rb +0 -35
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/color.rb +0 -698
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/helpers.rb +0 -272
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/list.rb +0 -113
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/map.rb +0 -70
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/null.rb +0 -44
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/number.rb +0 -563
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/string.rb +0 -138
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss.rb +0 -14
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/css_parser.rb +0 -56
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/parser.rb +0 -1254
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/rx.rb +0 -140
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/static_parser.rb +0 -373
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector.rb +0 -323
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/abstract_sequence.rb +0 -111
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/comma_sequence.rb +0 -191
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/pseudo.rb +0 -266
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/sequence.rb +0 -636
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/simple.rb +0 -117
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/simple_sequence.rb +0 -344
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/shared.rb +0 -76
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/source/map.rb +0 -213
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/source/position.rb +0 -39
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/source/range.rb +0 -41
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/stack.rb +0 -120
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/supports.rb +0 -225
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/at_root_node.rb +0 -83
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/charset_node.rb +0 -22
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/comment_node.rb +0 -82
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/content_node.rb +0 -9
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/css_import_node.rb +0 -68
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/debug_node.rb +0 -18
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/directive_node.rb +0 -59
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/each_node.rb +0 -24
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/error_node.rb +0 -18
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/extend_node.rb +0 -43
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/for_node.rb +0 -36
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/function_node.rb +0 -44
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/if_node.rb +0 -52
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/import_node.rb +0 -75
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/keyframe_rule_node.rb +0 -15
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/media_node.rb +0 -48
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/mixin_def_node.rb +0 -38
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/mixin_node.rb +0 -52
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/node.rb +0 -240
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/prop_node.rb +0 -170
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/return_node.rb +0 -19
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/root_node.rb +0 -44
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/rule_node.rb +0 -155
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/supports_node.rb +0 -38
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/trace_node.rb +0 -33
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/variable_node.rb +0 -36
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/base.rb +0 -72
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/check_nesting.rb +0 -173
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/convert.rb +0 -351
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/cssize.rb +0 -373
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/deep_copy.rb +0 -107
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/extend.rb +0 -70
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/perform.rb +0 -564
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/set_options.rb +0 -139
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/to_css.rb +0 -409
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/warn_node.rb +0 -18
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/while_node.rb +0 -18
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util.rb +0 -1375
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/cross_platform_random.rb +0 -19
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/multibyte_string_scanner.rb +0 -155
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/normalized_map.rb +0 -129
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/ordered_hash.rb +0 -192
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/subset_map.rb +0 -109
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/test.rb +0 -9
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/version.rb +0 -124
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/rails/init.rb +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/CHANGELOG.md +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/CONTRIBUTING.md +0 -38
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Gemfile +0 -20
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Guardfile +0 -8
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/LICENSE +0 -20
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/README.md +0 -349
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Rakefile +0 -5
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Vagrantfile +0 -96
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen.rb +0 -54
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapter.rb +0 -327
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/bsd.rb +0 -75
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/darwin.rb +0 -48
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/linux.rb +0 -81
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/polling.rb +0 -58
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/windows.rb +0 -91
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/directory_record.rb +0 -406
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/listener.rb +0 -323
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/turnstile.rb +0 -32
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/version.rb +0 -3
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/listen.gemspec +0 -28
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapter_spec.rb +0 -149
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/bsd_spec.rb +0 -36
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/darwin_spec.rb +0 -37
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/linux_spec.rb +0 -47
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/polling_spec.rb +0 -68
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/windows_spec.rb +0 -30
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/directory_record_spec.rb +0 -1250
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/listener_spec.rb +0 -258
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/turnstile_spec.rb +0 -56
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen_spec.rb +0 -67
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/spec_helper.rb +0 -25
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/adapter_helper.rb +0 -666
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/directory_record_helper.rb +0 -57
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/fixtures_helper.rb +0 -29
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/listeners_helper.rb +0 -179
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/platform_helper.rb +0 -15
- data/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/version.rb +0 -3
- data/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.1/data/display_width.marshal.gz +0 -0
@@ -1,47 +0,0 @@
|
|
1
|
-
require 'set'
|
2
|
-
module Sass
|
3
|
-
# Provides `Sass.has_feature?` which allows for simple feature detection
|
4
|
-
# by providing a feature name.
|
5
|
-
module Features
|
6
|
-
# This is the set of features that can be detected.
|
7
|
-
#
|
8
|
-
# When this is updated, the documentation of `feature-exists()` should be
|
9
|
-
# updated as well.
|
10
|
-
KNOWN_FEATURES = Set[*%w(
|
11
|
-
global-variable-shadowing
|
12
|
-
extend-selector-pseudoclass
|
13
|
-
units-level-3
|
14
|
-
at-error
|
15
|
-
)]
|
16
|
-
|
17
|
-
# Check if a feature exists by name. This is used to implement
|
18
|
-
# the Sass function `feature-exists($feature)`
|
19
|
-
#
|
20
|
-
# @param feature_name [String] The case sensitive name of the feature to
|
21
|
-
# check if it exists in this version of Sass.
|
22
|
-
# @return [Boolean] whether the feature of that name exists.
|
23
|
-
def has_feature?(feature_name)
|
24
|
-
KNOWN_FEATURES.include?(feature_name)
|
25
|
-
end
|
26
|
-
|
27
|
-
# Add a feature to Sass. Plugins can use this to easily expose their
|
28
|
-
# availability to end users. Plugins must prefix their feature
|
29
|
-
# names with a dash to distinguish them from official features.
|
30
|
-
#
|
31
|
-
# @example
|
32
|
-
# Sass.add_feature("-import-globbing")
|
33
|
-
# Sass.add_feature("-math-cos")
|
34
|
-
#
|
35
|
-
#
|
36
|
-
# @param feature_name [String] The case sensitive name of the feature to
|
37
|
-
# to add to Sass. Must begin with a dash.
|
38
|
-
def add_feature(feature_name)
|
39
|
-
unless feature_name[0] == ?-
|
40
|
-
raise ArgumentError.new("Plugin feature names must begin with a dash")
|
41
|
-
end
|
42
|
-
KNOWN_FEATURES << feature_name
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
extend Features
|
47
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module Sass
|
2
|
-
# Sass importers are in charge of taking paths passed to `@import`
|
3
|
-
# and finding the appropriate Sass code for those paths.
|
4
|
-
# By default, this code is always loaded from the filesystem,
|
5
|
-
# but importers could be added to load from a database or over HTTP.
|
6
|
-
#
|
7
|
-
# Each importer is in charge of a single load path
|
8
|
-
# (or whatever the corresponding notion is for the backend).
|
9
|
-
# Importers can be placed in the {file:SASS_REFERENCE.md#load_paths-option `:load_paths` array}
|
10
|
-
# alongside normal filesystem paths.
|
11
|
-
#
|
12
|
-
# When resolving an `@import`, Sass will go through the load paths
|
13
|
-
# looking for an importer that successfully imports the path.
|
14
|
-
# Once one is found, the imported file is used.
|
15
|
-
#
|
16
|
-
# User-created importers must inherit from {Importers::Base}.
|
17
|
-
module Importers
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
require 'sass/importers/base'
|
22
|
-
require 'sass/importers/filesystem'
|
23
|
-
require 'sass/importers/deprecated_path'
|
@@ -1,182 +0,0 @@
|
|
1
|
-
module Sass
|
2
|
-
module Importers
|
3
|
-
# The abstract base class for Sass importers.
|
4
|
-
# All importers should inherit from this.
|
5
|
-
#
|
6
|
-
# At the most basic level, an importer is given a string
|
7
|
-
# and must return a {Sass::Engine} containing some Sass code.
|
8
|
-
# This string can be interpreted however the importer wants;
|
9
|
-
# however, subclasses are encouraged to use the URI format
|
10
|
-
# for pathnames.
|
11
|
-
#
|
12
|
-
# Importers that have some notion of "relative imports"
|
13
|
-
# should take a single load path in their constructor,
|
14
|
-
# and interpret paths as relative to that.
|
15
|
-
# They should also implement the \{#find\_relative} method.
|
16
|
-
#
|
17
|
-
# Importers should be serializable via `Marshal.dump`.
|
18
|
-
#
|
19
|
-
# @abstract
|
20
|
-
class Base
|
21
|
-
# Find a Sass file relative to another file.
|
22
|
-
# Importers without a notion of "relative paths"
|
23
|
-
# should just return nil here.
|
24
|
-
#
|
25
|
-
# If the importer does have a notion of "relative paths",
|
26
|
-
# it should ignore its load path during this method.
|
27
|
-
#
|
28
|
-
# See \{#find} for important information on how this method should behave.
|
29
|
-
#
|
30
|
-
# The `:filename` option passed to the returned {Sass::Engine}
|
31
|
-
# should be of a format that could be passed to \{#find}.
|
32
|
-
#
|
33
|
-
# @param uri [String] The URI to import. This is not necessarily relative,
|
34
|
-
# but this method should only return true if it is.
|
35
|
-
# @param base [String] The base filename. If `uri` is relative,
|
36
|
-
# it should be interpreted as relative to `base`.
|
37
|
-
# `base` is guaranteed to be in a format importable by this importer.
|
38
|
-
# @param options [{Symbol => Object}] Options for the Sass file
|
39
|
-
# containing the `@import` that's currently being resolved.
|
40
|
-
# @return [Sass::Engine, nil] An Engine containing the imported file,
|
41
|
-
# or nil if it couldn't be found or was in the wrong format.
|
42
|
-
def find_relative(uri, base, options)
|
43
|
-
Sass::Util.abstract(self)
|
44
|
-
end
|
45
|
-
|
46
|
-
# Find a Sass file, if it exists.
|
47
|
-
#
|
48
|
-
# This is the primary entry point of the Importer.
|
49
|
-
# It corresponds directly to an `@import` statement in Sass.
|
50
|
-
# It should do three basic things:
|
51
|
-
#
|
52
|
-
# * Determine if the URI is in this importer's format.
|
53
|
-
# If not, return nil.
|
54
|
-
# * Determine if the file indicated by the URI actually exists and is readable.
|
55
|
-
# If not, return nil.
|
56
|
-
# * Read the file and place the contents in a {Sass::Engine}.
|
57
|
-
# Return that engine.
|
58
|
-
#
|
59
|
-
# If this importer's format allows for file extensions,
|
60
|
-
# it should treat them the same way as the default {Filesystem} importer.
|
61
|
-
# If the URI explicitly has a `.sass` or `.scss` filename,
|
62
|
-
# the importer should look for that exact file
|
63
|
-
# and import it as the syntax indicated.
|
64
|
-
# If it doesn't exist, the importer should return nil.
|
65
|
-
#
|
66
|
-
# If the URI doesn't have either of these extensions,
|
67
|
-
# the importer should look for files with the extensions.
|
68
|
-
# If no such files exist, it should return nil.
|
69
|
-
#
|
70
|
-
# The {Sass::Engine} to be returned should be passed `options`,
|
71
|
-
# with a few modifications. `:syntax` should be set appropriately,
|
72
|
-
# `:filename` should be set to `uri`,
|
73
|
-
# and `:importer` should be set to this importer.
|
74
|
-
#
|
75
|
-
# @param uri [String] The URI to import.
|
76
|
-
# @param options [{Symbol => Object}] Options for the Sass file
|
77
|
-
# containing the `@import` that's currently being resolved.
|
78
|
-
# This is safe for subclasses to modify destructively.
|
79
|
-
# Callers should only pass in a value they don't mind being destructively modified.
|
80
|
-
# @return [Sass::Engine, nil] An Engine containing the imported file,
|
81
|
-
# or nil if it couldn't be found or was in the wrong format.
|
82
|
-
def find(uri, options)
|
83
|
-
Sass::Util.abstract(self)
|
84
|
-
end
|
85
|
-
|
86
|
-
# Returns the time the given Sass file was last modified.
|
87
|
-
#
|
88
|
-
# If the given file has been deleted or the time can't be accessed
|
89
|
-
# for some other reason, this should return nil.
|
90
|
-
#
|
91
|
-
# @param uri [String] The URI of the file to check.
|
92
|
-
# Comes from a `:filename` option set on an engine returned by this importer.
|
93
|
-
# @param options [{Symbol => Object}] Options for the Sass file
|
94
|
-
# containing the `@import` currently being checked.
|
95
|
-
# @return [Time, nil]
|
96
|
-
def mtime(uri, options)
|
97
|
-
Sass::Util.abstract(self)
|
98
|
-
end
|
99
|
-
|
100
|
-
# Get the cache key pair for the given Sass URI.
|
101
|
-
# The URI need not be checked for validity.
|
102
|
-
#
|
103
|
-
# The only strict requirement is that the returned pair of strings
|
104
|
-
# uniquely identify the file at the given URI.
|
105
|
-
# However, the first component generally corresponds roughly to the directory,
|
106
|
-
# and the second to the basename, of the URI.
|
107
|
-
#
|
108
|
-
# Note that keys must be unique *across importers*.
|
109
|
-
# Thus it's probably a good idea to include the importer name
|
110
|
-
# at the beginning of the first component.
|
111
|
-
#
|
112
|
-
# @param uri [String] A URI known to be valid for this importer.
|
113
|
-
# @param options [{Symbol => Object}] Options for the Sass file
|
114
|
-
# containing the `@import` currently being checked.
|
115
|
-
# @return [(String, String)] The key pair which uniquely identifies
|
116
|
-
# the file at the given URI.
|
117
|
-
def key(uri, options)
|
118
|
-
Sass::Util.abstract(self)
|
119
|
-
end
|
120
|
-
|
121
|
-
# Get the publicly-visible URL for an imported file. This URL is used by
|
122
|
-
# source maps to link to the source stylesheet. This may return `nil` to
|
123
|
-
# indicate that no public URL is available; however, this will cause
|
124
|
-
# sourcemap generation to fail if any CSS is generated from files imported
|
125
|
-
# from this importer.
|
126
|
-
#
|
127
|
-
# If an absolute "file:" URI can be produced for an imported file, that
|
128
|
-
# should be preferred to returning `nil`. However, a URL relative to
|
129
|
-
# `sourcemap_directory` should be preferred over an absolute "file:" URI.
|
130
|
-
#
|
131
|
-
# @param uri [String] A URI known to be valid for this importer.
|
132
|
-
# @param sourcemap_directory [String, NilClass] The absolute path to a
|
133
|
-
# directory on disk where the sourcemap will be saved. If uri refers to
|
134
|
-
# a file on disk that's accessible relative to sourcemap_directory, this
|
135
|
-
# may return a relative URL. This may be `nil` if the sourcemap's
|
136
|
-
# eventual location is unknown.
|
137
|
-
# @return [String?] The publicly-visible URL for this file, or `nil`
|
138
|
-
# indicating that no publicly-visible URL exists. This should be
|
139
|
-
# appropriately URL-escaped.
|
140
|
-
def public_url(uri, sourcemap_directory)
|
141
|
-
return if @public_url_warning_issued
|
142
|
-
@public_url_warning_issued = true
|
143
|
-
Sass::Util.sass_warn <<WARNING
|
144
|
-
WARNING: #{self.class.name} should define the #public_url method.
|
145
|
-
WARNING
|
146
|
-
nil
|
147
|
-
end
|
148
|
-
|
149
|
-
# A string representation of the importer.
|
150
|
-
# Should be overridden by subclasses.
|
151
|
-
#
|
152
|
-
# This is used to help debugging,
|
153
|
-
# and should usually just show the load path encapsulated by this importer.
|
154
|
-
#
|
155
|
-
# @return [String]
|
156
|
-
def to_s
|
157
|
-
Sass::Util.abstract(self)
|
158
|
-
end
|
159
|
-
|
160
|
-
# If the importer is based on files on the local filesystem
|
161
|
-
# this method should return folders which should be watched
|
162
|
-
# for changes.
|
163
|
-
#
|
164
|
-
# @return [Array<String>] List of absolute paths of directories to watch
|
165
|
-
def directories_to_watch
|
166
|
-
[]
|
167
|
-
end
|
168
|
-
|
169
|
-
# If this importer is based on files on the local filesystem This method
|
170
|
-
# should return true if the file, when changed, should trigger a
|
171
|
-
# recompile.
|
172
|
-
#
|
173
|
-
# It is acceptable for non-sass files to be watched and trigger a recompile.
|
174
|
-
#
|
175
|
-
# @param filename [String] The absolute filename for a file that has changed.
|
176
|
-
# @return [Boolean] When the file changed should cause a recompile.
|
177
|
-
def watched_file?(filename)
|
178
|
-
false
|
179
|
-
end
|
180
|
-
end
|
181
|
-
end
|
182
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
module Sass
|
2
|
-
module Importers
|
3
|
-
# This importer emits a deprecation warning the first time it is used to
|
4
|
-
# import a file. It is used to deprecate the current working
|
5
|
-
# directory from the list of automatic sass load paths.
|
6
|
-
class DeprecatedPath < Filesystem
|
7
|
-
# @param root [String] The absolute, expanded path to the folder that is deprecated.
|
8
|
-
def initialize(root)
|
9
|
-
@specified_root = root
|
10
|
-
@warning_given = false
|
11
|
-
super
|
12
|
-
end
|
13
|
-
|
14
|
-
# @see Sass::Importers::Base#find
|
15
|
-
def find(*args)
|
16
|
-
found = super
|
17
|
-
if found && !@warning_given
|
18
|
-
@warning_given = true
|
19
|
-
Sass::Util.sass_warn deprecation_warning
|
20
|
-
end
|
21
|
-
found
|
22
|
-
end
|
23
|
-
|
24
|
-
# @see Base#directories_to_watch
|
25
|
-
def directories_to_watch
|
26
|
-
# The current working directory was not watched in Sass 3.2,
|
27
|
-
# so we continue not to watch it while it's deprecated.
|
28
|
-
[]
|
29
|
-
end
|
30
|
-
|
31
|
-
# @see Sass::Importers::Base#to_s
|
32
|
-
def to_s
|
33
|
-
"#{@root} (DEPRECATED)"
|
34
|
-
end
|
35
|
-
|
36
|
-
protected
|
37
|
-
|
38
|
-
# @return [String] The deprecation warning that will be printed the first
|
39
|
-
# time an import occurs.
|
40
|
-
def deprecation_warning
|
41
|
-
path = @specified_root == "." ? "the current working directory" : @specified_root
|
42
|
-
<<WARNING
|
43
|
-
DEPRECATION WARNING: Importing from #{path} will not be
|
44
|
-
automatic in future versions of Sass. To avoid future errors, you can add it
|
45
|
-
to your environment explicitly by setting `SASS_PATH=#{@specified_root}`, by using the -I command
|
46
|
-
line option, or by changing your Sass configuration options.
|
47
|
-
WARNING
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
@@ -1,219 +0,0 @@
|
|
1
|
-
require 'set'
|
2
|
-
|
3
|
-
module Sass
|
4
|
-
module Importers
|
5
|
-
# The default importer, used for any strings found in the load path.
|
6
|
-
# Simply loads Sass files from the filesystem using the default logic.
|
7
|
-
class Filesystem < Base
|
8
|
-
attr_accessor :root
|
9
|
-
|
10
|
-
# Creates a new filesystem importer that imports files relative to a given path.
|
11
|
-
#
|
12
|
-
# @param root [String] The root path.
|
13
|
-
# This importer will import files relative to this path.
|
14
|
-
def initialize(root)
|
15
|
-
@root = File.expand_path(root)
|
16
|
-
@real_root = Sass::Util.realpath(@root).to_s
|
17
|
-
@same_name_warnings = Set.new
|
18
|
-
end
|
19
|
-
|
20
|
-
# @see Base#find_relative
|
21
|
-
def find_relative(name, base, options)
|
22
|
-
_find(File.dirname(base), name, options)
|
23
|
-
end
|
24
|
-
|
25
|
-
# @see Base#find
|
26
|
-
def find(name, options)
|
27
|
-
_find(@root, name, options)
|
28
|
-
end
|
29
|
-
|
30
|
-
# @see Base#mtime
|
31
|
-
def mtime(name, options)
|
32
|
-
file, _ = Sass::Util.destructure(find_real_file(@root, name, options))
|
33
|
-
File.mtime(file) if file
|
34
|
-
rescue Errno::ENOENT
|
35
|
-
nil
|
36
|
-
end
|
37
|
-
|
38
|
-
# @see Base#key
|
39
|
-
def key(name, options)
|
40
|
-
[self.class.name + ":" + File.dirname(File.expand_path(name)),
|
41
|
-
File.basename(name)]
|
42
|
-
end
|
43
|
-
|
44
|
-
# @see Base#to_s
|
45
|
-
def to_s
|
46
|
-
@root
|
47
|
-
end
|
48
|
-
|
49
|
-
def hash
|
50
|
-
@root.hash
|
51
|
-
end
|
52
|
-
|
53
|
-
def eql?(other)
|
54
|
-
!other.nil? && other.respond_to?(:root) && root.eql?(other.root)
|
55
|
-
end
|
56
|
-
|
57
|
-
# @see Base#directories_to_watch
|
58
|
-
def directories_to_watch
|
59
|
-
[root]
|
60
|
-
end
|
61
|
-
|
62
|
-
# @see Base#watched_file?
|
63
|
-
def watched_file?(filename)
|
64
|
-
# Check against the root with symlinks resolved, since Listen
|
65
|
-
# returns fully-resolved paths.
|
66
|
-
filename =~ /\.s[ac]ss$/ && filename.start_with?(@real_root + File::SEPARATOR)
|
67
|
-
end
|
68
|
-
|
69
|
-
def public_url(name, sourcemap_directory)
|
70
|
-
file_pathname = Sass::Util.cleanpath(Sass::Util.absolute_path(name, @root))
|
71
|
-
return Sass::Util.file_uri_from_path(file_pathname) if sourcemap_directory.nil?
|
72
|
-
|
73
|
-
sourcemap_pathname = Sass::Util.cleanpath(sourcemap_directory)
|
74
|
-
begin
|
75
|
-
Sass::Util.file_uri_from_path(
|
76
|
-
Sass::Util.relative_path_from(file_pathname, sourcemap_pathname))
|
77
|
-
rescue ArgumentError # when a relative path cannot be constructed
|
78
|
-
Sass::Util.file_uri_from_path(file_pathname)
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
protected
|
83
|
-
|
84
|
-
# If a full uri is passed, this removes the root from it
|
85
|
-
# otherwise returns the name unchanged
|
86
|
-
def remove_root(name)
|
87
|
-
if name.index(@root + "/") == 0
|
88
|
-
name[(@root.length + 1)..-1]
|
89
|
-
else
|
90
|
-
name
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
# A hash from file extensions to the syntaxes for those extensions.
|
95
|
-
# The syntaxes must be `:sass` or `:scss`.
|
96
|
-
#
|
97
|
-
# This can be overridden by subclasses that want normal filesystem importing
|
98
|
-
# with unusual extensions.
|
99
|
-
#
|
100
|
-
# @return [{String => Symbol}]
|
101
|
-
def extensions
|
102
|
-
{'sass' => :sass, 'scss' => :scss}
|
103
|
-
end
|
104
|
-
|
105
|
-
# Given an `@import`ed path, returns an array of possible
|
106
|
-
# on-disk filenames and their corresponding syntaxes for that path.
|
107
|
-
#
|
108
|
-
# @param name [String] The filename.
|
109
|
-
# @return [Array(String, Symbol)] An array of pairs.
|
110
|
-
# The first element of each pair is a filename to look for;
|
111
|
-
# the second element is the syntax that file would be in (`:sass` or `:scss`).
|
112
|
-
def possible_files(name)
|
113
|
-
name = escape_glob_characters(name)
|
114
|
-
dirname, basename, extname = split(name)
|
115
|
-
sorted_exts = extensions.sort
|
116
|
-
syntax = extensions[extname]
|
117
|
-
|
118
|
-
if syntax
|
119
|
-
ret = [["#{dirname}/{_,}#{basename}.#{extensions.invert[syntax]}", syntax]]
|
120
|
-
else
|
121
|
-
ret = sorted_exts.map {|ext, syn| ["#{dirname}/{_,}#{basename}.#{ext}", syn]}
|
122
|
-
end
|
123
|
-
|
124
|
-
# JRuby chokes when trying to import files from JARs when the path starts with './'.
|
125
|
-
ret.map {|f, s| [f.sub(%r{^\./}, ''), s]}
|
126
|
-
end
|
127
|
-
|
128
|
-
def escape_glob_characters(name)
|
129
|
-
name.gsub(/[\*\[\]\{\}\?]/) do |char|
|
130
|
-
"\\#{char}"
|
131
|
-
end
|
132
|
-
end
|
133
|
-
|
134
|
-
REDUNDANT_DIRECTORY = /#{Regexp.escape(File::SEPARATOR)}\.#{Regexp.escape(File::SEPARATOR)}/
|
135
|
-
# Given a base directory and an `@import`ed name,
|
136
|
-
# finds an existant file that matches the name.
|
137
|
-
#
|
138
|
-
# @param dir [String] The directory relative to which to search.
|
139
|
-
# @param name [String] The filename to search for.
|
140
|
-
# @return [(String, Symbol)] A filename-syntax pair.
|
141
|
-
def find_real_file(dir, name, options)
|
142
|
-
# On windows 'dir' or 'name' can be in native File::ALT_SEPARATOR form.
|
143
|
-
dir = dir.gsub(File::ALT_SEPARATOR, File::SEPARATOR) unless File::ALT_SEPARATOR.nil?
|
144
|
-
name = name.gsub(File::ALT_SEPARATOR, File::SEPARATOR) unless File::ALT_SEPARATOR.nil?
|
145
|
-
|
146
|
-
found = possible_files(remove_root(name)).map do |f, s|
|
147
|
-
path = if dir == "." || Sass::Util.pathname(f).absolute?
|
148
|
-
f
|
149
|
-
else
|
150
|
-
"#{escape_glob_characters(dir)}/#{f}"
|
151
|
-
end
|
152
|
-
Dir[path].map do |full_path|
|
153
|
-
full_path.gsub!(REDUNDANT_DIRECTORY, File::SEPARATOR)
|
154
|
-
[Sass::Util.cleanpath(full_path).to_s, s]
|
155
|
-
end
|
156
|
-
end.flatten(1)
|
157
|
-
return if found.empty?
|
158
|
-
|
159
|
-
if found.size > 1 && !@same_name_warnings.include?(found.first.first)
|
160
|
-
found.each {|(f, _)| @same_name_warnings << f}
|
161
|
-
relative_to = Sass::Util.pathname(dir)
|
162
|
-
if options[:_from_import_node]
|
163
|
-
# If _line exists, we're here due to an actual import in an
|
164
|
-
# import_node and we want to print a warning for a user writing an
|
165
|
-
# ambiguous import.
|
166
|
-
candidates = found.map do |(f, _)|
|
167
|
-
" " + Sass::Util.pathname(f).relative_path_from(relative_to).to_s
|
168
|
-
end.join("\n")
|
169
|
-
raise Sass::SyntaxError.new(<<MESSAGE)
|
170
|
-
It's not clear which file to import for '@import "#{name}"'.
|
171
|
-
Candidates:
|
172
|
-
#{candidates}
|
173
|
-
Please delete or rename all but one of these files.
|
174
|
-
MESSAGE
|
175
|
-
else
|
176
|
-
# Otherwise, we're here via StalenessChecker, and we want to print a
|
177
|
-
# warning for a user running `sass --watch` with two ambiguous files.
|
178
|
-
candidates = found.map {|(f, _)| " " + File.basename(f)}.join("\n")
|
179
|
-
Sass::Util.sass_warn <<WARNING
|
180
|
-
WARNING: In #{File.dirname(name)}:
|
181
|
-
There are multiple files that match the name "#{File.basename(name)}":
|
182
|
-
#{candidates}
|
183
|
-
WARNING
|
184
|
-
end
|
185
|
-
end
|
186
|
-
found.first
|
187
|
-
end
|
188
|
-
|
189
|
-
# Splits a filename into three parts, a directory part, a basename, and an extension
|
190
|
-
# Only the known extensions returned from the extensions method will be recognized as such.
|
191
|
-
def split(name)
|
192
|
-
extension = nil
|
193
|
-
dirname, basename = File.dirname(name), File.basename(name)
|
194
|
-
if basename =~ /^(.*)\.(#{extensions.keys.map {|e| Regexp.escape(e)}.join('|')})$/
|
195
|
-
basename = $1
|
196
|
-
extension = $2
|
197
|
-
end
|
198
|
-
[dirname, basename, extension]
|
199
|
-
end
|
200
|
-
|
201
|
-
private
|
202
|
-
|
203
|
-
def _find(dir, name, options)
|
204
|
-
full_filename, syntax = Sass::Util.destructure(find_real_file(dir, name, options))
|
205
|
-
return unless full_filename && File.readable?(full_filename)
|
206
|
-
|
207
|
-
# TODO: this preserves historical behavior, but it's possible
|
208
|
-
# :filename should be either normalized to the native format
|
209
|
-
# or consistently URI-format.
|
210
|
-
full_filename = full_filename.tr("\\", "/") if Sass::Util.windows?
|
211
|
-
|
212
|
-
options[:syntax] = syntax
|
213
|
-
options[:filename] = full_filename
|
214
|
-
options[:importer] = self
|
215
|
-
Sass::Engine.new(File.read(full_filename), options)
|
216
|
-
end
|
217
|
-
end
|
218
|
-
end
|
219
|
-
end
|