brakeman 4.8.0 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +144 -2
- data/README.md +23 -6
- data/bundle/load.rb +7 -5
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/CHANGELOG.md +24 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/FAQ.md +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/Gemfile +1 -4
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/MIT-LICENSE +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/README.md +21 -16
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/REFERENCE.md +39 -10
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/TODO +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/haml.gemspec +2 -1
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/attribute_builder.rb +58 -3
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/attribute_compiler.rb +45 -32
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/attribute_parser.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/buffer.rb +0 -56
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/compiler.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/engine.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/error.rb +0 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/escapable.rb +77 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/exec.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/filters.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/generator.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/helpers/action_view_extensions.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/helpers/action_view_mods.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/helpers/action_view_xss_mods.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/helpers/safe_erubi_template.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/helpers/safe_erubis_template.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/helpers/xss_mods.rb +6 -3
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/helpers.rb +7 -1
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/options.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/parser.rb +32 -4
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/plugin.rb +18 -1
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/railtie.rb +5 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/sass_rails_filter.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/template/options.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/template.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/temple_engine.rb +2 -1
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/temple_line_counter.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/util.rb +1 -1
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml/version.rb +1 -1
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/lib/haml.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/yard/default/fulldoc/html/css/common.sass +0 -0
- data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.2}/yard/default/layout/html/footer.erb +0 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/MIT-LICENSE.txt +20 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel/processor_count.rb +45 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel/version.rb +4 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel.rb +532 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/LICENSE.txt +22 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md +178 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/README.md +48 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attlistdecl.rb +63 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +205 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +68 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/child.rb +97 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/comment.rb +80 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +311 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/document.rb +451 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/attlistdecl.rb +11 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/dtd.rb +47 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/elementdecl.rb +18 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/entitydecl.rb +57 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/notationdecl.rb +40 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/element.rb +2599 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +51 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/entity.rb +171 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/default.rb +116 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +142 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/transitive.rb +58 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/functions.rb +447 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +79 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/light/node.rb +188 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +59 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/node.rb +76 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/output.rb +30 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parent.rb +166 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +52 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +694 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/lightparser.rb +59 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +197 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +273 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +61 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +101 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/ultralightparser.rb +57 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +689 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +266 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +37 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/sax2listener.rb +98 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/security.rb +28 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb +298 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/streamlistener.rb +93 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/text.rb +424 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/undefinednamespaceexception.rb +9 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +539 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +144 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validationexception.rb +10 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmldecl.rb +130 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmltokens.rb +85 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +81 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +974 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml.rb +3 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/History.rdoc +148 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/Manifest.txt +7 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/README.rdoc +1 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/compare/normalize.rb +51 -6
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/debugging.md +190 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/gauntlet.md +106 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/lib/rp_extensions.rb +15 -36
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/rp_stringscanner.rb +33 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby20_parser.rb +7128 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/lib/ruby20_parser.y +420 -296
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby21_parser.rb +7182 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/lib/ruby21_parser.y +415 -293
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby22_parser.rb +7228 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/lib/ruby22_parser.y +419 -295
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby23_parser.rb +7237 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/lib/ruby23_parser.y +419 -295
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby24_parser.rb +7268 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/lib/ruby24_parser.y +419 -295
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby25_parser.rb +7268 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2/lib/ruby26_parser.y → ruby_parser-3.18.1/lib/ruby25_parser.y} +418 -308
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby26_parser.rb +7287 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2/lib/ruby_parser.yy → ruby_parser-3.18.1/lib/ruby26_parser.y} +419 -399
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby27_parser.rb +8517 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2/lib/ruby25_parser.y → ruby_parser-3.18.1/lib/ruby27_parser.y} +1030 -294
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby30_parser.rb +8751 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby30_parser.y +3472 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby3_parser.yy +3476 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/lib/ruby_lexer.rb +308 -605
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/lib/ruby_lexer.rex +33 -27
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/lib/ruby_lexer.rex.rb +65 -31
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby_lexer_strings.rb +638 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/lib/ruby_parser.rb +4 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby_parser.yy +3487 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/lib/ruby_parser_extras.rb +341 -127
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/tools/munge.rb +43 -10
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.14.2 → ruby_parser-3.18.1}/tools/ripper.rb +15 -10
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/History.rdoc +39 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/Manifest.txt +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/README.rdoc +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/lib/composite_sexp_processor.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/lib/pt_testcase.rb +9 -4
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/lib/sexp.rb +19 -9
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/lib/sexp_matcher.rb +4 -7
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/lib/strict_sexp.rb +25 -3
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/lib/unique.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/CHANGES +4 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/Gemfile +12 -13
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/LICENSE +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/README.jp.md +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/README.md +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/code_attributes.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/command.rb +13 -13
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/controls.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/do_inserter.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/embedded.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/end_inserter.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/engine.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/erb_converter.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/filter.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/grammar.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/include.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/interpolation.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/logic_less/context.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/logic_less/filter.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/logic_less.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/parser.rb +1 -1
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/smart/escaper.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/smart/filter.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/smart/parser.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/smart.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/splat/builder.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/splat/filter.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/template.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/translator.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim/version.rb +1 -1
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/lib/slim.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{slim-4.0.1 → slim-4.1.0}/slim.gemspec +0 -0
- data/bundle/ruby/2.7.0/gems/{unicode-display_width-1.6.1 → unicode-display_width-1.8.0}/CHANGELOG.md +8 -0
- data/bundle/ruby/2.7.0/gems/{unicode-display_width-1.6.1 → unicode-display_width-1.8.0}/MIT-LICENSE.txt +0 -0
- data/bundle/ruby/2.7.0/gems/{unicode-display_width-1.6.1 → unicode-display_width-1.8.0}/README.md +1 -1
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/2.7.0/gems/{unicode-display_width-1.6.1 → unicode-display_width-1.8.0}/lib/unicode/display_width/constants.rb +2 -2
- data/bundle/ruby/2.7.0/gems/{unicode-display_width-1.6.1 → unicode-display_width-1.8.0}/lib/unicode/display_width/index.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{unicode-display_width-1.6.1 → unicode-display_width-1.8.0}/lib/unicode/display_width/no_string_ext.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{unicode-display_width-1.6.1 → unicode-display_width-1.8.0}/lib/unicode/display_width/string_ext.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{unicode-display_width-1.6.1 → unicode-display_width-1.8.0}/lib/unicode/display_width.rb +0 -0
- data/lib/brakeman/app_tree.rb +37 -4
- data/lib/brakeman/checks/base_check.rb +18 -2
- data/lib/brakeman/checks/check_basic_auth.rb +2 -0
- data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +28 -0
- data/lib/brakeman/checks/check_deserialize.rb +21 -1
- data/lib/brakeman/checks/check_detailed_exceptions.rb +1 -1
- data/lib/brakeman/checks/check_eol_rails.rb +23 -0
- data/lib/brakeman/checks/check_eol_ruby.rb +26 -0
- data/lib/brakeman/checks/check_evaluation.rb +1 -1
- data/lib/brakeman/checks/check_execute.rb +12 -1
- data/lib/brakeman/checks/check_json_entity_escape.rb +38 -0
- data/lib/brakeman/checks/check_json_parsing.rb +1 -1
- data/lib/brakeman/checks/check_mass_assignment.rb +37 -9
- data/lib/brakeman/checks/check_model_attr_accessible.rb +1 -1
- data/lib/brakeman/checks/check_model_attributes.rb +1 -1
- data/lib/brakeman/checks/check_page_caching_cve.rb +37 -0
- data/lib/brakeman/checks/check_permit_attributes.rb +1 -1
- data/lib/brakeman/checks/check_regex_dos.rb +1 -1
- data/lib/brakeman/checks/check_render.rb +15 -1
- data/lib/brakeman/checks/check_sanitize_methods.rb +2 -1
- data/lib/brakeman/checks/check_skip_before_filter.rb +4 -4
- data/lib/brakeman/checks/check_sql.rb +60 -9
- data/lib/brakeman/checks/check_symbol_dos.rb +1 -1
- data/lib/brakeman/checks/check_template_injection.rb +32 -0
- data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +68 -0
- data/lib/brakeman/checks/check_verb_confusion.rb +75 -0
- data/lib/brakeman/checks/eol_check.rb +47 -0
- data/lib/brakeman/commandline.rb +25 -1
- data/lib/brakeman/file_parser.rb +58 -22
- data/lib/brakeman/options.rb +39 -2
- data/lib/brakeman/parsers/template_parser.rb +26 -3
- data/lib/brakeman/processors/alias_processor.rb +132 -24
- data/lib/brakeman/processors/base_processor.rb +4 -4
- data/lib/brakeman/processors/controller_alias_processor.rb +6 -43
- data/lib/brakeman/processors/controller_processor.rb +1 -1
- data/lib/brakeman/processors/gem_processor.rb +3 -0
- data/lib/brakeman/processors/haml_template_processor.rb +17 -1
- data/lib/brakeman/processors/lib/call_conversion_helper.rb +13 -7
- data/lib/brakeman/processors/lib/file_type_detector.rb +64 -0
- data/lib/brakeman/processors/lib/find_all_calls.rb +28 -13
- data/lib/brakeman/processors/lib/rails3_config_processor.rb +16 -16
- data/lib/brakeman/processors/lib/rails3_route_processor.rb +2 -0
- data/lib/brakeman/processors/lib/rails4_config_processor.rb +2 -1
- data/lib/brakeman/processors/lib/render_helper.rb +3 -1
- data/lib/brakeman/processors/library_processor.rb +9 -0
- data/lib/brakeman/processors/model_processor.rb +32 -0
- data/lib/brakeman/processors/output_processor.rb +1 -1
- data/lib/brakeman/processors/template_alias_processor.rb +5 -0
- data/lib/brakeman/report/ignore/config.rb +5 -1
- data/lib/brakeman/report/ignore/interactive.rb +1 -1
- data/lib/brakeman/report/report_base.rb +0 -2
- data/lib/brakeman/report/report_csv.rb +37 -60
- data/lib/brakeman/report/report_github.rb +31 -0
- data/lib/brakeman/report/report_junit.rb +2 -2
- data/lib/brakeman/report/report_sarif.rb +133 -0
- data/lib/brakeman/report/report_sonar.rb +38 -0
- data/lib/brakeman/report/report_tabs.rb +1 -1
- data/lib/brakeman/report/report_text.rb +38 -17
- data/lib/brakeman/report.rb +19 -1
- data/lib/brakeman/rescanner.rb +7 -5
- data/lib/brakeman/scanner.rb +65 -31
- data/lib/brakeman/tracker/collection.rb +57 -7
- data/lib/brakeman/tracker/config.rb +87 -5
- data/lib/brakeman/tracker/constants.rb +8 -7
- data/lib/brakeman/tracker/controller.rb +1 -1
- data/lib/brakeman/tracker/method_info.rb +70 -0
- data/lib/brakeman/tracker.rb +42 -5
- data/lib/brakeman/util.rb +58 -21
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman/warning.rb +10 -2
- data/lib/brakeman/warning_codes.rb +13 -0
- data/lib/brakeman.rb +45 -6
- data/lib/ruby_parser/bm_sexp.rb +33 -9
- metadata +201 -123
- data/bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/escapable.rb +0 -50
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.14.2/debugging.md +0 -18
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.14.2/lib/rp_stringscanner.rb +0 -64
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.14.2/lib/ruby20_parser.rb +0 -7042
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.14.2/lib/ruby21_parser.rb +0 -7113
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.14.2/lib/ruby22_parser.rb +0 -7146
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.14.2/lib/ruby23_parser.rb +0 -7163
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.14.2/lib/ruby24_parser.rb +0 -7175
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.14.2/lib/ruby25_parser.rb +0 -7175
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.14.2/lib/ruby26_parser.rb +0 -7195
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.6.1/data/display_width.marshal.gz +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
#!/usr/bin/ruby -ws
|
1
|
+
#!/usr/bin/env ruby -ws
|
2
2
|
|
3
3
|
$v ||= false
|
4
4
|
|
@@ -76,12 +76,31 @@ def munge s
|
|
76
76
|
|
77
77
|
# other
|
78
78
|
|
79
|
+
'kTERMINATOR', "tSTRING_END",
|
80
|
+
'"kTERMINATOR"', "tSTRING_END",
|
81
|
+
'kTRCURLY', "tSTRING_DEND",
|
82
|
+
|
83
|
+
'"symbol literal"', "tSYMBEG",
|
84
|
+
'"string literal"', "tSTRING_BEG",
|
85
|
+
'"backtick literal"', "tXSTRING_BEG",
|
86
|
+
'"regexp literal"', "tREGEXP_BEG",
|
87
|
+
'"word list"', "tWORDS_BEG",
|
88
|
+
'"verbatim word list"', "tQWORDS_BEG",
|
89
|
+
'"symbol list"', "tSYMBOLS_BEG",
|
90
|
+
'"verbatim symbol list"', "tQSYMBOLS_BEG",
|
91
|
+
'"terminator"', "tSTRING_END",
|
92
|
+
'"\'}\'"', "tSTRING_DEND",
|
93
|
+
|
94
|
+
'"string literal"',"tSTRING_BEG",
|
95
|
+
'"literal content"', "tSTRING_CONTENT",
|
96
|
+
/\$/, "", # try to remove these lumps?
|
97
|
+
|
79
98
|
'tLBRACK2', "tLBRACK", # HACK
|
80
99
|
|
81
100
|
"' '", "tSPACE", # needs to be later to avoid bad hits
|
82
101
|
|
83
102
|
"/* empty */", "none",
|
84
|
-
/^\s*$/, "
|
103
|
+
/^\s*$/, "",
|
85
104
|
|
86
105
|
"keyword_BEGIN", "klBEGIN",
|
87
106
|
"keyword_END", "klEND",
|
@@ -89,6 +108,7 @@ def munge s
|
|
89
108
|
/\bk_([a-z_]+)/, proc { "k#{$1.upcase}" },
|
90
109
|
/modifier_(\w+)/, proc { "k#{$1.upcase}_MOD" },
|
91
110
|
"kVARIABLE", "keyword_variable", # ugh
|
111
|
+
"tCONST", "kCONST",
|
92
112
|
|
93
113
|
# 2.6 collapses klBEGIN to kBEGIN
|
94
114
|
"klBEGIN", "kBEGIN",
|
@@ -112,12 +132,16 @@ def munge s
|
|
112
132
|
'"do (for condition)"', "kDO_COND",
|
113
133
|
'"do (for lambda)"', "kDO_LAMBDA",
|
114
134
|
'"do (for block)"', "kDO_BLOCK",
|
135
|
+
'"local variable or method"', "tIDENTIFIER",
|
115
136
|
|
116
137
|
/\"(\w+) \(modifier\)\"/, proc { |x| "k#{$1.upcase}_MOD" },
|
117
138
|
/\"(\w+)\"/, proc { |x| "k#{$1.upcase}" },
|
139
|
+
/\"`(\w+)'\"/, proc { |x| "k#{$1.upcase}" },
|
118
140
|
|
119
141
|
/@(\d+)(\s+|$)/, "",
|
120
142
|
/\$?@(\d+) */, "", # TODO: remove?
|
143
|
+
|
144
|
+
/_EXPR/, "",
|
121
145
|
]
|
122
146
|
|
123
147
|
renames.each_slice(2) do |(a, b)|
|
@@ -128,7 +152,11 @@ def munge s
|
|
128
152
|
end
|
129
153
|
end
|
130
154
|
|
131
|
-
s.
|
155
|
+
if s.empty? then
|
156
|
+
nil
|
157
|
+
else
|
158
|
+
s.strip.squeeze " "
|
159
|
+
end
|
132
160
|
end
|
133
161
|
|
134
162
|
ARGF.each_line do |line|
|
@@ -142,19 +170,19 @@ ARGF.each_line do |line|
|
|
142
170
|
when /^Reading a token: Next token is token (.*?) \(\)/ then
|
143
171
|
token = munge $1
|
144
172
|
next if last_token == token
|
145
|
-
puts "next token is %p
|
173
|
+
puts "next token is %p" % [token]
|
146
174
|
last_token = token
|
147
175
|
when /^Reading a token: / then
|
148
176
|
next # skip
|
149
177
|
when /^read\s+:(\w+)/ then # read :tNL(tNL) nil
|
150
178
|
token = munge $1
|
151
179
|
next if last_token == token
|
152
|
-
puts "next token is %p
|
180
|
+
puts "next token is %p" % [token]
|
153
181
|
last_token = token
|
154
182
|
when /^Next token is token ("[^"]+"|\S+)/ then
|
155
183
|
token = munge $1
|
156
184
|
next if last_token == token
|
157
|
-
puts "next token is %p
|
185
|
+
puts "next token is %p" % [token]
|
158
186
|
last_token = token
|
159
187
|
when /^read\s+false/ then # read false($end) "$end"
|
160
188
|
puts "next token is EOF"
|
@@ -162,6 +190,8 @@ ARGF.each_line do |line|
|
|
162
190
|
# do nothing
|
163
191
|
when /^.:scan=>\["([^"]+)"/ then
|
164
192
|
puts "scan = %p" % [$1]
|
193
|
+
when /^.:getch=>\["([^"]+)/ then
|
194
|
+
puts "SCAN = %p" % [$1]
|
165
195
|
when /^Reducing stack by rule (\d+) \(line (\d+)\):/ then
|
166
196
|
reduce_line = $2.to_i
|
167
197
|
when /^ \$\d+ = (?:token|nterm) (.+) \(.*\)/ then
|
@@ -170,7 +200,7 @@ ARGF.each_line do |line|
|
|
170
200
|
when /^-> \$\$ = (?:token|nterm) (.+) \(.*\)/ then
|
171
201
|
stack << "none" if stack.empty?
|
172
202
|
item = munge $1
|
173
|
-
x = stack.map { |s| s.strip }.join " "
|
203
|
+
x = stack.compact.map { |s| munge s.strip }.compact.join " "
|
174
204
|
if x != item then # prevent kdef -> kdef
|
175
205
|
if $v && reduce_line then
|
176
206
|
puts "reduce #{x} --> #{item} at #{reduce_line}".squeeze " "
|
@@ -194,10 +224,13 @@ ARGF.each_line do |line|
|
|
194
224
|
# TODO: make pretty, but still informative w/ line numbers etc
|
195
225
|
puts line.gsub("true", "1").gsub("false", "0")
|
196
226
|
when /^lex_state: :?([\w|]+) -> :?([\w|]+)(?: (?:at|from) (.*))?/ then
|
197
|
-
|
198
|
-
|
227
|
+
a, b, c = $1.upcase, $2.upcase, $3
|
228
|
+
a.gsub!(/EXPR_/, "")
|
229
|
+
b.gsub!(/EXPR_/, "")
|
230
|
+
if c && $v then
|
231
|
+
puts "lex_state: #{a} -> #{b} at #{c}"
|
199
232
|
else
|
200
|
-
puts "lex_state: #{
|
233
|
+
puts "lex_state: #{a} -> #{b}"
|
201
234
|
end
|
202
235
|
when /debug|FUCK/ then
|
203
236
|
puts line.chomp
|
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby -ws
|
2
2
|
|
3
|
-
$
|
4
|
-
$
|
3
|
+
$b ||= false # bug mode -- ripper is buggy, use Ripper.sexp
|
4
|
+
$d ||= false # debug -- turn on yydebug
|
5
|
+
$p ||= false # Use pp
|
5
6
|
|
6
7
|
require "ripper/sexp"
|
7
8
|
require "pp" if $p
|
@@ -19,15 +20,19 @@ end
|
|
19
20
|
|
20
21
|
ARGV.each do |path|
|
21
22
|
src = path == "-" ? $stdin.read : File.read(path)
|
22
|
-
rip = MySexpBuilder.new src
|
23
|
-
rip.yydebug = $d
|
24
23
|
|
25
|
-
sexp =
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
sexp = if $b then
|
25
|
+
Ripper.sexp src
|
26
|
+
else
|
27
|
+
rip = MySexpBuilder.new src
|
28
|
+
rip.yydebug = $d
|
29
|
+
rip.parse
|
30
|
+
|
31
|
+
if rip.error? then
|
32
|
+
warn "skipping"
|
33
|
+
next
|
34
|
+
end
|
35
|
+
end
|
31
36
|
|
32
37
|
puts "accept"
|
33
38
|
|
@@ -1,3 +1,42 @@
|
|
1
|
+
=== 4.16.0 / 2021-10-27
|
2
|
+
|
3
|
+
* 4 minor enhancements:
|
4
|
+
|
5
|
+
* Added Sexp#value (pushed up from ruby_parser).
|
6
|
+
* Aliased Sexp#concat to #_concat and use that so it can be overridden.
|
7
|
+
* Cache the #hash result.
|
8
|
+
* StrictSexp mode (4) now covers concat.
|
9
|
+
|
10
|
+
* 3 bug fixes:
|
11
|
+
|
12
|
+
* Fix some doco on each_sexp to clarify that it is not recursive.
|
13
|
+
* Fixed a bug calling enum_for when using each_of_type w/ no block.
|
14
|
+
* Minor fixes to pt_testcase.rb for custom timeouts and better error handling.
|
15
|
+
|
16
|
+
=== 4.15.3 / 2021-05-15
|
17
|
+
|
18
|
+
* 1 minor enhancement:
|
19
|
+
|
20
|
+
* Added 3.0 to pt_testcase.rb
|
21
|
+
|
22
|
+
=== 4.15.2 / 2021-01-10
|
23
|
+
|
24
|
+
* 1 bug fix:
|
25
|
+
|
26
|
+
* Bumped ruby version to include < 4 (trunk).
|
27
|
+
|
28
|
+
=== 4.15.1 / 2020-08-31
|
29
|
+
|
30
|
+
* 1 bug fix:
|
31
|
+
|
32
|
+
* Bumped ruby version to include 3.0 (trunk).
|
33
|
+
|
34
|
+
=== 4.15.0 / 2020-06-09
|
35
|
+
|
36
|
+
* 1 minor enhancement:
|
37
|
+
|
38
|
+
* Added `child` and `include` to Sexp::Matcher.parse language.
|
39
|
+
|
1
40
|
=== 4.14.1 / 2020-02-09
|
2
41
|
|
3
42
|
* 2 bug fixes:
|
File without changes
|
File without changes
|
File without changes
|
data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/lib/pt_testcase.rb
RENAMED
@@ -77,7 +77,7 @@ class ParseTreeTestCase < Minitest::Test
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def self.add_19tests name, hash
|
80
|
-
add_tests "#{name}
|
80
|
+
add_tests "#{name}__19_20_21_22_23_24_25_26_27_30", hash # HACK?
|
81
81
|
end
|
82
82
|
|
83
83
|
def self.add_19edgecases ruby, sexp, cases
|
@@ -102,7 +102,7 @@ class ParseTreeTestCase < Minitest::Test
|
|
102
102
|
testcases[verbose][klass] = testcases[nonverbose][klass]
|
103
103
|
end
|
104
104
|
|
105
|
-
VER_RE = "(1[89]|2[
|
105
|
+
VER_RE = "(1[89]|2[01234567]|3[0])"
|
106
106
|
|
107
107
|
def self.generate_test klass, node, data, input_name, output_name
|
108
108
|
klass.send :define_method, "test_#{node}" do
|
@@ -150,7 +150,8 @@ class ParseTreeTestCase < Minitest::Test
|
|
150
150
|
|
151
151
|
before_process_hook klass, node, data, input_name, output_name
|
152
152
|
refute_nil data[input_name], "testcase does not exist?"
|
153
|
-
|
153
|
+
timeout = (ENV["RP_TIMEOUT"] || 10).to_i
|
154
|
+
@result = processor.process input, "(string)", timeout
|
154
155
|
assert_equal(expected, @result,
|
155
156
|
"failed on input: #{data[input_name].inspect}")
|
156
157
|
after_process_hook klass, node, data, input_name, output_name
|
@@ -158,7 +159,11 @@ class ParseTreeTestCase < Minitest::Test
|
|
158
159
|
extra_input.each do |extra|
|
159
160
|
processor.process(extra)
|
160
161
|
end
|
161
|
-
extra = processor.extra_methods
|
162
|
+
extra = if processor.respond_to?(:extra_methods) then
|
163
|
+
processor.extra_methods
|
164
|
+
else
|
165
|
+
[]
|
166
|
+
end
|
162
167
|
assert_equal extra_expected, extra
|
163
168
|
end
|
164
169
|
end
|
@@ -31,13 +31,15 @@ class Sexp < Array # ZenTest FULL
|
|
31
31
|
super(args)
|
32
32
|
end
|
33
33
|
|
34
|
+
alias _concat concat
|
35
|
+
|
34
36
|
##
|
35
37
|
# Creates a new Sexp from Array +a+.
|
36
38
|
|
37
39
|
def self.from_array a
|
38
40
|
ary = Array === a ? a : [a]
|
39
41
|
|
40
|
-
self.new.
|
42
|
+
self.new._concat(ary.map { |x|
|
41
43
|
case x
|
42
44
|
when Sexp
|
43
45
|
x
|
@@ -54,7 +56,7 @@ class Sexp < Array # ZenTest FULL
|
|
54
56
|
# same +file+, +line+, and +comment+ as self.
|
55
57
|
|
56
58
|
def new(*body)
|
57
|
-
r = self.class.new.
|
59
|
+
r = self.class.new._concat(body) # ensures a sexp from map
|
58
60
|
r.file = self.file if self.file
|
59
61
|
r.line = self.line if self.line
|
60
62
|
r.comments = self.comments if self.comments
|
@@ -62,7 +64,7 @@ class Sexp < Array # ZenTest FULL
|
|
62
64
|
end
|
63
65
|
|
64
66
|
def map &blk # :nodoc:
|
65
|
-
self.new.
|
67
|
+
self.new._concat(super(&blk)) # ensures a sexp from map
|
66
68
|
end
|
67
69
|
|
68
70
|
def == obj # :nodoc:
|
@@ -74,7 +76,7 @@ class Sexp < Array # ZenTest FULL
|
|
74
76
|
end
|
75
77
|
|
76
78
|
def hash
|
77
|
-
[self.class, *self].hash
|
79
|
+
@hash ||= [self.class, *self].hash
|
78
80
|
end
|
79
81
|
|
80
82
|
##
|
@@ -93,7 +95,7 @@ class Sexp < Array # ZenTest FULL
|
|
93
95
|
end
|
94
96
|
|
95
97
|
##
|
96
|
-
# Recursively enumerates the sexp yielding to +block+ for every
|
98
|
+
# Recursively enumerates the sexp yielding to +block+ for every sub-Sexp.
|
97
99
|
#
|
98
100
|
# Returning :skip will stop traversing that subtree:
|
99
101
|
#
|
@@ -122,7 +124,7 @@ class Sexp < Array # ZenTest FULL
|
|
122
124
|
# Enumeratates the sexp yielding to +b+ when the node_type == +t+.
|
123
125
|
|
124
126
|
def each_of_type t, &b
|
125
|
-
return enum_for(:each_of_type) unless block_given?
|
127
|
+
return enum_for(:each_of_type, t) unless block_given?
|
126
128
|
|
127
129
|
each_sexp do | sexp |
|
128
130
|
sexp.each_of_type(t, &b)
|
@@ -131,7 +133,7 @@ class Sexp < Array # ZenTest FULL
|
|
131
133
|
end
|
132
134
|
|
133
135
|
##
|
134
|
-
#
|
136
|
+
# Enumerates all sub-sexps skipping non-Sexp elements.
|
135
137
|
|
136
138
|
def each_sexp
|
137
139
|
return enum_for(:each_sexp) unless block_given?
|
@@ -289,11 +291,11 @@ class Sexp < Array # ZenTest FULL
|
|
289
291
|
# the values without the node type.
|
290
292
|
|
291
293
|
def sexp_body from = 1
|
292
|
-
self.new.
|
294
|
+
self.new._concat(self[from..-1] || [])
|
293
295
|
end
|
294
296
|
|
295
297
|
##
|
296
|
-
#
|
298
|
+
# Sets the Sexp body to new content.
|
297
299
|
|
298
300
|
def sexp_body= v
|
299
301
|
self[1..-1] = v
|
@@ -362,6 +364,14 @@ class Sexp < Array # ZenTest FULL
|
|
362
364
|
end
|
363
365
|
|
364
366
|
alias to_s inspect # :nodoc:
|
367
|
+
|
368
|
+
##
|
369
|
+
# Return the value (last item) of a single element sexp (eg `s(:lit, 42)`).
|
370
|
+
|
371
|
+
def value
|
372
|
+
raise "multi item sexp" if size > 2
|
373
|
+
last
|
374
|
+
end
|
365
375
|
end
|
366
376
|
|
367
377
|
##
|
data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/lib/sexp_matcher.rb
RENAMED
@@ -455,7 +455,7 @@ class Sexp #:nodoc:
|
|
455
455
|
# | NAME:name => name.to_sym
|
456
456
|
# UP_NAME: /[A-Z]\w*/
|
457
457
|
# NAME : /:?[\w?!=~-]+/
|
458
|
-
# CMD :
|
458
|
+
# CMD : t | k | m | atom | not? | - | any | child | include
|
459
459
|
|
460
460
|
def parse_sexp
|
461
461
|
token = next_token
|
@@ -505,7 +505,7 @@ class Sexp #:nodoc:
|
|
505
505
|
##
|
506
506
|
# A collection of allowed commands to convert into matchers.
|
507
507
|
|
508
|
-
ALLOWED = [:t, :m, :k, :atom, :not?, :-, :any].freeze
|
508
|
+
ALLOWED = [:t, :m, :k, :atom, :not?, :-, :any, :child, :include].freeze
|
509
509
|
|
510
510
|
##
|
511
511
|
# Parses a balanced command. A command is denoted by square
|
@@ -760,11 +760,8 @@ class Sexp #:nodoc:
|
|
760
760
|
# +child+.
|
761
761
|
|
762
762
|
def satisfy? o
|
763
|
-
|
764
|
-
|
765
|
-
elsif o.kind_of? Sexp
|
766
|
-
o.search_each(child).any?
|
767
|
-
end
|
763
|
+
child.satisfy?(o) ||
|
764
|
+
(o.kind_of?(Sexp) && o.search_each(child).any?)
|
768
765
|
end
|
769
766
|
|
770
767
|
def == o # :nodoc:
|
data/bundle/ruby/2.7.0/gems/{sexp_processor-4.14.1 → sexp_processor-4.16.0}/lib/strict_sexp.rb
RENAMED
@@ -36,6 +36,7 @@
|
|
36
36
|
# 4 = sexp << => no
|
37
37
|
|
38
38
|
class Sexp
|
39
|
+
# alias :_concat :concat in sexp.rb so we have access to the original
|
39
40
|
alias :safe_idx :[]
|
40
41
|
alias :safe_asgn :[]=
|
41
42
|
alias :sexp_type= :sexp_type=
|
@@ -43,9 +44,10 @@ class Sexp
|
|
43
44
|
alias :shift :shift
|
44
45
|
|
45
46
|
def self.nuke_method name, level
|
47
|
+
return unless __strict >= level
|
46
48
|
define_method name do |*args|
|
47
49
|
raise "no mutation allowed on sexps: %s.%s %s" % [self, name, args]
|
48
|
-
end
|
50
|
+
end
|
49
51
|
end
|
50
52
|
|
51
53
|
def self.__strict
|
@@ -87,7 +89,7 @@ class Sexp
|
|
87
89
|
|
88
90
|
nuke_method :collect!, 4
|
89
91
|
nuke_method :compact!, 4
|
90
|
-
|
92
|
+
nuke_method :concat, 4 # HACK: using self.class.new.concat(...) for speed
|
91
93
|
nuke_method :flatten!, 4
|
92
94
|
nuke_method :map!, 4
|
93
95
|
nuke_method :pop, 4
|
@@ -111,7 +113,7 @@ class Sexp
|
|
111
113
|
end
|
112
114
|
|
113
115
|
def sexp_body from = 1
|
114
|
-
self.new.
|
116
|
+
self.new._concat(safe_idx(from..-1) || [])
|
115
117
|
end
|
116
118
|
|
117
119
|
def sexp_type= v
|
@@ -123,4 +125,24 @@ class Sexp
|
|
123
125
|
end
|
124
126
|
end unless Sexp.new.respond_to? :safe_asgn if ENV["STRICT_SEXP"]
|
125
127
|
|
128
|
+
if ENV["SP_DEBUG"] && !ENV["STRICT_SEXP"] then
|
129
|
+
class Sexp
|
130
|
+
mutators = %i[
|
131
|
+
[]= clear collect! compact! concat delete delete_at
|
132
|
+
delete_if drop drop_while fill flatten! replace insert
|
133
|
+
keep_if map! pop push reject! reverse! rotate! select!
|
134
|
+
shift shuffle! slice! sort! sort_by! transpose uniq!
|
135
|
+
unshift
|
136
|
+
]
|
137
|
+
|
138
|
+
mutators.each do |method|
|
139
|
+
define_method method do |*|
|
140
|
+
warn "Sexp modified by %p at %s" % [__method__, caller.first] if
|
141
|
+
$VERBOSE or (defined?(@hash) and @hash)
|
142
|
+
super
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
126
148
|
# :startdoc:
|
File without changes
|
@@ -7,6 +7,12 @@ group :test do
|
|
7
7
|
gem 'rack-test'
|
8
8
|
end
|
9
9
|
|
10
|
+
group :perf do
|
11
|
+
gem 'benchmark-ips'
|
12
|
+
gem 'erubis'
|
13
|
+
gem 'haml'
|
14
|
+
end
|
15
|
+
|
10
16
|
if ENV['TRAVIS']
|
11
17
|
gem 'rails-controller-testing'
|
12
18
|
end
|
@@ -30,19 +36,12 @@ if ENV['RAILS']
|
|
30
36
|
else
|
31
37
|
gem 'rails', "= #{ENV['RAILS']}"
|
32
38
|
end
|
33
|
-
end
|
34
39
|
|
35
|
-
|
36
|
-
if (ENV['SINATRA'] && ENV['SINATRA'] < '1.4.6') || (ENV['RAILS'] && ENV['RAILS'].match(/^(3|4\.0)/))
|
37
|
-
gem 'minitest', '~> 4.7.4'
|
38
|
-
else
|
39
|
-
gem 'minitest', '~> 5.1'
|
40
|
+
gem 'slim-rails', require: false
|
40
41
|
end
|
41
42
|
|
42
|
-
|
43
|
-
|
44
|
-
gem 'test-unit', platforms: :mri
|
45
|
-
end
|
43
|
+
gem 'test-unit', '~> 3.3', '>= 3.3.5'
|
44
|
+
gem 'minitest', '~> 5.14'
|
46
45
|
|
47
46
|
if RUBY_ENGINE == 'rbx' && !ENV['TRAVIS']
|
48
47
|
gem 'psych'
|
@@ -56,9 +55,9 @@ if ENV['SINATRA']
|
|
56
55
|
end
|
57
56
|
end
|
58
57
|
|
59
|
-
gem 'rake', '>= 0.
|
60
|
-
gem '
|
61
|
-
gem 'kramdown'
|
58
|
+
gem 'rake', '~> 13.0', '>= 13.0.1'
|
59
|
+
gem 'sassc', '~> 2.2', '>= 2.2.1'
|
60
|
+
gem 'kramdown', '~> 2.1'
|
62
61
|
|
63
62
|
if ENV['TASK'] == 'bench'
|
64
63
|
gem 'benchmark-ips'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -110,19 +110,19 @@ module Slim
|
|
110
110
|
Template.new(@options[:file]) { @options[:input].read }.render(nil, locals)
|
111
111
|
end
|
112
112
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
113
|
+
rescue Exception => ex
|
114
|
+
raise ex if @options[:trace] || SystemExit === ex
|
115
|
+
$stderr.print "#{ex.class}: " if ex.class != RuntimeError
|
116
|
+
$stderr.puts ex.message
|
117
|
+
$stderr.puts ' Use --trace for backtrace.'
|
118
|
+
exit 1
|
119
|
+
else
|
120
|
+
unless @options[:output]
|
121
|
+
file = args.shift
|
122
|
+
@options[:output] = file ? File.open(file, 'w') : $stdout
|
123
|
+
end
|
124
|
+
@options[:output].puts(result)
|
125
|
+
exit 0
|
126
126
|
end
|
127
127
|
end
|
128
128
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -70,7 +70,7 @@ module Slim
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
keys = Regexp.union @attr_shortcut.keys.sort_by {|k| -k.size }
|
73
|
-
@attr_shortcut_re = /\A(#{keys}+)((?:\p{Word}|-)*)/
|
73
|
+
@attr_shortcut_re = /\A(#{keys}+)((?:\p{Word}|-|\/\d+|:(\w|-)+)*)/
|
74
74
|
keys = Regexp.union @tag_shortcut.keys.sort_by {|k| -k.size }
|
75
75
|
@tag_re = /\A(?:#{keys}|\*(?=[^\s]+)|(\p{Word}(?:\p{Word}|:|-)*\p{Word}|\p{Word}+))/
|
76
76
|
keys = Regexp.escape @code_attr_delims.keys.join
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|