brakeman 5.2.2 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +153 -0
- data/README.md +9 -6
- data/bundle/load.rb +16 -15
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/LICENSE.txt +33 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/NEWS.md +1009 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/README.md +55 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/core_ext/array.rb +9 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/core_ext/string.rb +9 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/fields_converter.rb +96 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/input_record_separator.rb +18 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/parser.rb +1302 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/row.rb +757 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/table.rb +1055 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/version.rb +6 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/writer.rb +209 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv.rb +3017 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/CHANGELOG.md +1681 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/FAQ.md +147 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/Gemfile +34 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/MIT-LICENSE +20 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/README.md +205 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/REFERENCE.md +1309 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/exe/haml +6 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/haml.gemspec +45 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/ambles.rb +20 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_builder.rb +162 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_compiler.rb +133 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_parser.rb +116 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/cli.rb +154 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/children_compiler.rb +155 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/comment_compiler.rb +51 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/doctype_compiler.rb +52 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/script_compiler.rb +114 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/silent_script_compiler.rb +24 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/tag_compiler.rb +76 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler.rb +97 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/dynamic_merger.rb +67 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/engine.rb +59 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/error.rb +66 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/escape.rb +13 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/escape_any.rb +21 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/base.rb +12 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/cdata.rb +20 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/coffee.rb +17 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/css.rb +33 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/erb.rb +10 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/escaped.rb +22 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/javascript.rb +33 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/less.rb +20 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/markdown.rb +11 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/plain.rb +29 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/preserve.rb +22 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/ruby.rb +10 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/sass.rb +15 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/scss.rb +15 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/text_base.rb +25 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/tilt_base.rb +59 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters.rb +75 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/force_escape.rb +29 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/helpers.rb +15 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/html.rb +22 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/identity.rb +13 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/object_ref.rb +35 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/parser.rb +991 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/rails_helpers.rb +53 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/rails_template.rb +62 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/railtie.rb +10 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/ruby_expression.rb +32 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/string_splitter.rb +140 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/template.rb +20 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/temple_line_counter.rb +31 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/util.rb +262 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/version.rb +4 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/whitespace.rb +8 -0
- data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml.rb +13 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/Changelog.md +658 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/Gemfile +21 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/README.md +240 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/highline.gemspec +40 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/io_console_compatible.rb +37 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/list_renderer.rb +261 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/menu.rb +578 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/question/answer_converter.rb +100 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/question.rb +640 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/question_asker.rb +152 -0
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/style.rb +0 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/terminal/io_console.rb +36 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/terminal/unix_stty.rb +53 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/terminal.rb +192 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/version.rb +6 -0
- data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline.rb +676 -0
- data/bundle/ruby/3.1.0/gems/parallel-1.27.0/lib/parallel/version.rb +4 -0
- data/bundle/ruby/3.1.0/gems/parallel-1.27.0/lib/parallel.rb +708 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/COPYING +56 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/README.md +94 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/config.rb +378 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/face.rb +199 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/history.rb +76 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io/ansi.rb +322 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io/dumb.rb +120 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io/windows.rb +530 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io.rb +55 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/base.rb +37 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/composite.rb +17 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/emacs.rb +517 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/vi_command.rb +518 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/vi_insert.rb +517 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor.rb +8 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_stroke.rb +119 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/kill_ring.rb +125 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/line_editor.rb +2356 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/unicode/east_asian_width.rb +1292 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/unicode.rb +421 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/version.rb +3 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline.rb +527 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.2/license_of_rb-readline +25 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/LICENSE.txt +22 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/NEWS.md +843 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/README.md +57 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/attribute.rb +210 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/cdata.rb +68 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/child.rb +96 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/comment.rb +80 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/doctype.rb +306 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/document.rb +471 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/element.rb +2578 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/encoding.rb +48 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/entity.rb +142 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/formatters/pretty.rb +142 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/functions.rb +446 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/instruction.rb +79 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/namespace.rb +63 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/node.rb +80 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parseexception.rb +53 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/baseparser.rb +949 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/pullparser.rb +213 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/sax2parser.rb +270 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/streamparser.rb +67 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/treeparser.rb +89 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/xpathparser.rb +739 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/quickpath.rb +267 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/rexml.rb +39 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/security.rb +28 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/source.rb +388 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/text.rb +420 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/validation/relaxng.rb +540 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/validation/validation.rb +144 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/xpath.rb +70 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/xpath_parser.rb +980 -0
- data/bundle/ruby/3.1.0/gems/ruby2ruby-2.5.2/History.rdoc +463 -0
- data/bundle/ruby/3.1.0/gems/ruby2ruby-2.5.2/lib/ruby2ruby.rb +1448 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/History.rdoc +1345 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/Manifest.txt +48 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/README.rdoc +113 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/compare/normalize.rb +219 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby20_parser.rb +10956 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby20_parser.y +2707 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby21_parser.rb +10981 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby21_parser.y +2724 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby22_parser.rb +11122 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby22_parser.y +2735 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby23_parser.rb +11163 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby23_parser.y +2737 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby24_parser.rb +11212 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby24_parser.y +2745 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby25_parser.rb +11212 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby25_parser.y +2745 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby26_parser.rb +11234 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby26_parser.y +2760 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby27_parser.rb +12963 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby27_parser.y +3360 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby30_parser.rb +13316 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby30_parser.y +3508 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby31_parser.rb +13649 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby31_parser.y +3542 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.rb +13601 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.y +3543 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby3_parser.yy +3635 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_lexer.rb +1159 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_lexer.rex.rb +399 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_lexer_strings.rb +638 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_parser.rb +100 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_parser.yy +3501 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_parser_extras.rb +1878 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/tools/munge.rb +256 -0
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/tools/ripper.rb +46 -0
- data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/History.rdoc +493 -0
- data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/pt_testcase.rb +3137 -0
- data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/sexp.rb +397 -0
- data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/sexp_matcher.rb +1100 -0
- data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/sexp_processor.rb +754 -0
- data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/strict_sexp.rb +149 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/CHANGES +496 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/Gemfile +43 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/LICENSE +21 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/README.jp.md +1276 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/README.md +1313 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/code_attributes.rb +68 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/command.rb +122 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/controls.rb +61 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/do_inserter.rb +34 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/embedded.rb +248 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/end_inserter.rb +63 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/engine.rb +42 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/erb_converter.rb +15 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/filter.rb +31 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/grammar.rb +24 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/include.rb +58 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/interpolation.rb +36 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/logic_less/context.rb +126 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/logic_less/filter.rb +81 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/logic_less.rb +6 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/parser.rb +535 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/railtie.rb +19 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart/escaper.rb +42 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart/filter.rb +97 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart/parser.rb +35 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart.rb +9 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/splat/builder.rb +115 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/splat/filter.rb +93 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/template.rb +6 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/translator.rb +119 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/version.rb +6 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim.rb +16 -0
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/slim.gemspec +33 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/CHANGES +302 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/Gemfile +2 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/README.md +267 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/engine.rb +68 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/engine.rb +18 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/parser.rb +41 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/template.rb +12 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/trimming.rb +24 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/exceptions.rb +14 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filter.rb +10 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/ambles.rb +22 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/code_merger.rb +31 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/control_flow.rb +43 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/dynamic_inliner.rb +72 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/dynamic_merger.rb +69 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/encoding.rb +25 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/eraser.rb +23 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/escapable.rb +41 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/multi_flattener.rb +26 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/remove_bom.rb +14 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/static_analyzer.rb +31 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/static_merger.rb +38 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/string_splitter.rb +142 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/validator.rb +16 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generator.rb +91 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/array.rb +22 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/array_buffer.rb +30 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/erb.rb +33 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/rails_output_buffer.rb +35 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/string_buffer.rb +26 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/grammar.rb +58 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/attribute_merger.rb +43 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/attribute_remover.rb +36 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/attribute_sorter.rb +22 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/dispatcher.rb +32 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/fast.rb +131 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/filter.rb +22 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/pretty.rb +104 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/safe.rb +24 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/map.rb +106 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/dispatcher.rb +162 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/engine_dsl.rb +146 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/grammar_dsl.rb +172 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/options.rb +88 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/template.rb +29 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/parser.rb +9 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/static_analyzer.rb +78 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/templates/rails.rb +31 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/templates/tilt.rb +39 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/templates.rb +12 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/utils.rb +91 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/version.rb +4 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple.rb +70 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.4/temple.gemspec +27 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/History.rdoc +149 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/README.md +417 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/cell.rb +94 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/row.rb +66 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/separator.rb +66 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/style.rb +284 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/table.rb +374 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/util.rb +13 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/version.rb +5 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table.rb +26 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/terminal-table.gemspec +25 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/COPYING +19 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_emacs_org.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_handlebars.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_jbuilder.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_org.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/asciidoc.rb +15 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/babel.rb +8 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/builder.rb +42 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/cli.rb +134 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/coffee.rb +39 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/commonmarker.rb +95 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/creole.rb +16 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/csv.rb +53 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/erb.rb +65 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/erubi.rb +55 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/etanni.rb +28 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/haml.rb +94 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/kramdown.rb +13 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/liquid.rb +37 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/livescript.rb +11 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/mapping.rb +412 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/markaby.rb +43 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/nokogiri.rb +37 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/pandoc.rb +39 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/pipeline.rb +19 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/plain.rb +5 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/prawn.rb +28 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/radius.rb +41 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/rdiscount.rb +23 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/rdoc.rb +11 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/redcarpet.rb +31 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/redcloth.rb +13 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/rst-pandoc.rb +10 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/sass.rb +78 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/slim.rb +5 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/string.rb +27 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/template.rb +611 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/typescript.rb +19 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/yajl.rb +81 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt.rb +192 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/CHANGELOG.md +299 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/MIT-LICENSE.txt +22 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/README.md +194 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/constants.rb +10 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/emoji_support.rb +55 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/index.rb +34 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/no_string_ext.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/reline_ext.rb +14 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/string_ext.rb +9 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width.rb +247 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/CHANGELOG.md +196 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/CODE_OF_CONDUCT.md +74 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/Gemfile +7 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/Gemfile.lock +33 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/MIT-LICENSE.txt +20 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/README.md +205 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/data/emoji.marshal.gz +0 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/data/generate_constants.rb +344 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/constants.rb +49 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_basic.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_emoji_keycap.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_mqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_mqe_uqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_picto.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_picto_no_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_possible.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_component.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_modifier.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_modifier_base.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_text_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_valid.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_valid_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_well_formed.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_well_formed_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_basic.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_emoji_keycap.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_mqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_picto.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_picto_no_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_possible.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_component.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_modifier.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_modifier_base.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_text_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_valid.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_valid_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_well_formed.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_well_formed_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/index.rb +14 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/lazy_constants.rb +56 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/list.rb +13 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji.rb +111 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/unicode-emoji.gemspec +22 -0
- data/lib/brakeman/app_tree.rb +98 -19
- data/lib/brakeman/checks/base_check.rb +7 -5
- data/lib/brakeman/checks/check_basic_auth.rb +4 -2
- data/lib/brakeman/checks/check_basic_auth_timing_attack.rb +2 -1
- data/lib/brakeman/checks/check_content_tag.rb +16 -9
- data/lib/brakeman/checks/check_cookie_serialization.rb +2 -1
- data/lib/brakeman/checks/check_create_with.rb +4 -2
- data/lib/brakeman/checks/check_cross_site_scripting.rb +6 -3
- data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +2 -1
- data/lib/brakeman/checks/check_default_routes.rb +6 -3
- data/lib/brakeman/checks/check_deserialize.rb +6 -2
- data/lib/brakeman/checks/check_detailed_exceptions.rb +4 -2
- data/lib/brakeman/checks/check_digest_dos.rb +2 -1
- data/lib/brakeman/checks/check_divide_by_zero.rb +2 -1
- data/lib/brakeman/checks/check_dynamic_finders.rb +2 -1
- data/lib/brakeman/checks/check_eol_rails.rb +7 -0
- data/lib/brakeman/checks/check_eol_ruby.rb +5 -1
- data/lib/brakeman/checks/check_escape_function.rb +2 -1
- data/lib/brakeman/checks/check_evaluation.rb +45 -7
- data/lib/brakeman/checks/check_execute.rb +34 -3
- data/lib/brakeman/checks/check_file_access.rb +2 -1
- data/lib/brakeman/checks/check_file_disclosure.rb +2 -1
- data/lib/brakeman/checks/check_filter_skipping.rb +2 -1
- data/lib/brakeman/checks/check_force_ssl.rb +2 -1
- data/lib/brakeman/checks/check_forgery_setting.rb +4 -2
- data/lib/brakeman/checks/check_header_dos.rb +2 -1
- data/lib/brakeman/checks/check_i18n_xss.rb +2 -1
- data/lib/brakeman/checks/check_jruby_xml.rb +2 -1
- data/lib/brakeman/checks/check_json_encoding.rb +2 -1
- data/lib/brakeman/checks/check_json_entity_escape.rb +4 -2
- data/lib/brakeman/checks/check_json_parsing.rb +4 -2
- data/lib/brakeman/checks/check_link_to.rb +2 -1
- data/lib/brakeman/checks/check_link_to_href.rb +4 -2
- data/lib/brakeman/checks/check_mail_to.rb +2 -1
- data/lib/brakeman/checks/check_mass_assignment.rb +6 -3
- data/lib/brakeman/checks/check_mime_type_dos.rb +2 -1
- data/lib/brakeman/checks/check_model_attr_accessible.rb +3 -1
- data/lib/brakeman/checks/check_model_attributes.rb +4 -2
- data/lib/brakeman/checks/check_model_serialize.rb +2 -1
- data/lib/brakeman/checks/check_nested_attributes.rb +2 -1
- data/lib/brakeman/checks/check_nested_attributes_bypass.rb +2 -1
- data/lib/brakeman/checks/check_number_to_currency.rb +4 -2
- data/lib/brakeman/checks/check_page_caching_cve.rb +2 -1
- data/lib/brakeman/checks/check_pathname.rb +48 -0
- data/lib/brakeman/checks/check_permit_attributes.rb +2 -1
- data/lib/brakeman/checks/check_quote_table_name.rb +2 -1
- data/lib/brakeman/checks/check_ransack.rb +53 -0
- data/lib/brakeman/checks/check_redirect.rb +67 -31
- data/lib/brakeman/checks/check_regex_dos.rb +2 -1
- data/lib/brakeman/checks/check_render.rb +15 -3
- data/lib/brakeman/checks/check_render_dos.rb +2 -1
- data/lib/brakeman/checks/check_render_inline.rb +4 -2
- data/lib/brakeman/checks/check_response_splitting.rb +2 -1
- data/lib/brakeman/checks/check_reverse_tabnabbing.rb +2 -1
- data/lib/brakeman/checks/check_route_dos.rb +2 -1
- data/lib/brakeman/checks/check_safe_buffer_manipulation.rb +2 -1
- data/lib/brakeman/checks/check_sanitize_config_cve.rb +120 -0
- data/lib/brakeman/checks/check_sanitize_methods.rb +6 -3
- data/lib/brakeman/checks/check_secrets.rb +2 -1
- data/lib/brakeman/checks/check_select_tag.rb +2 -1
- data/lib/brakeman/checks/check_select_vulnerability.rb +2 -1
- data/lib/brakeman/checks/check_send.rb +2 -1
- data/lib/brakeman/checks/check_session_manipulation.rb +2 -1
- data/lib/brakeman/checks/check_session_settings.rb +8 -6
- data/lib/brakeman/checks/check_simple_format.rb +4 -2
- data/lib/brakeman/checks/check_single_quotes.rb +2 -1
- data/lib/brakeman/checks/check_skip_before_filter.rb +4 -2
- data/lib/brakeman/checks/check_sprockets_path_traversal.rb +2 -1
- data/lib/brakeman/checks/check_sql.rb +14 -5
- data/lib/brakeman/checks/check_sql_cves.rb +4 -2
- data/lib/brakeman/checks/check_ssl_verify.rb +2 -1
- data/lib/brakeman/checks/check_strip_tags.rb +6 -3
- data/lib/brakeman/checks/check_symbol_dos.rb +2 -1
- data/lib/brakeman/checks/check_symbol_dos_cve.rb +2 -1
- data/lib/brakeman/checks/check_template_injection.rb +2 -1
- data/lib/brakeman/checks/check_translate_bug.rb +2 -1
- data/lib/brakeman/checks/check_unsafe_reflection.rb +2 -1
- data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +2 -1
- data/lib/brakeman/checks/check_unscoped_find.rb +10 -1
- data/lib/brakeman/checks/check_validation_regex.rb +2 -1
- data/lib/brakeman/checks/check_verb_confusion.rb +2 -1
- data/lib/brakeman/checks/check_weak_hash.rb +6 -3
- data/lib/brakeman/checks/check_weak_rsa_key.rb +112 -0
- data/lib/brakeman/checks/check_without_protection.rb +2 -1
- data/lib/brakeman/checks/check_xml_dos.rb +2 -1
- data/lib/brakeman/checks/check_yaml_parsing.rb +4 -2
- data/lib/brakeman/checks/eol_check.rb +4 -2
- data/lib/brakeman/commandline.rb +5 -0
- data/lib/brakeman/file_parser.rb +35 -2
- data/lib/brakeman/file_path.rb +4 -0
- data/lib/brakeman/messages.rb +1 -1
- data/lib/brakeman/options.rb +50 -5
- data/lib/brakeman/parsers/erubis_patch.rb +11 -0
- data/lib/brakeman/parsers/haml6_embedded.rb +23 -0
- data/lib/brakeman/parsers/rails2_erubis.rb +3 -0
- data/lib/brakeman/parsers/rails2_xss_plugin_erubis.rb +4 -0
- data/lib/brakeman/parsers/rails3_erubis.rb +5 -1
- data/lib/brakeman/parsers/slim_embedded.rb +2 -0
- data/lib/brakeman/parsers/template_parser.rb +32 -7
- data/lib/brakeman/processor.rb +2 -0
- data/lib/brakeman/processors/alias_processor.rb +160 -44
- data/lib/brakeman/processors/base_processor.rb +2 -0
- data/lib/brakeman/processors/gem_processor.rb +2 -2
- data/lib/brakeman/processors/haml6_template_processor.rb +92 -0
- data/lib/brakeman/processors/haml_template_processor.rb +8 -2
- data/lib/brakeman/processors/lib/file_type_detector.rb +9 -7
- data/lib/brakeman/processors/lib/find_all_calls.rb +1 -0
- data/lib/brakeman/processors/lib/module_helper.rb +31 -1
- data/lib/brakeman/processors/lib/rails3_config_processor.rb +1 -1
- data/lib/brakeman/processors/lib/render_helper.rb +38 -1
- data/lib/brakeman/processors/library_processor.rb +6 -0
- data/lib/brakeman/processors/template_processor.rb +1 -1
- data/lib/brakeman/report/ignore/config.rb +0 -1
- data/lib/brakeman/report/ignore/interactive.rb +2 -2
- data/lib/brakeman/report/pager.rb +2 -2
- data/lib/brakeman/report/report_codeclimate.rb +1 -1
- data/lib/brakeman/report/report_csv.rb +2 -0
- data/lib/brakeman/report/report_github.rb +1 -1
- data/lib/brakeman/report/report_html.rb +1 -1
- data/lib/brakeman/report/report_junit.rb +6 -59
- data/lib/brakeman/report/report_markdown.rb +1 -1
- data/lib/brakeman/report/report_sarif.rb +122 -2
- data/lib/brakeman/report/report_table.rb +7 -7
- data/lib/brakeman/report/report_tabs.rb +0 -1
- data/lib/brakeman/report/report_text.rb +10 -1
- data/lib/brakeman/report/templates/controller_warnings.html.erb +2 -0
- data/lib/brakeman/report/templates/header.html.erb +8 -3
- data/lib/brakeman/report/templates/ignored_warnings.html.erb +5 -3
- data/lib/brakeman/report/templates/model_warnings.html.erb +2 -0
- data/lib/brakeman/report/templates/security_warnings.html.erb +2 -0
- data/lib/brakeman/report/templates/view_warnings.html.erb +2 -0
- data/lib/brakeman/rescanner.rb +40 -388
- data/lib/brakeman/scanner.rb +182 -88
- data/lib/brakeman/tracker/config.rb +89 -34
- data/lib/brakeman/tracker/controller.rb +14 -10
- data/lib/brakeman/tracker/file_cache.rb +83 -0
- data/lib/brakeman/tracker.rb +27 -4
- data/lib/brakeman/util.rb +21 -7
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman/warning.rb +6 -3
- data/lib/brakeman/warning_codes.rb +6 -0
- data/lib/brakeman.rb +33 -7
- data/lib/ruby_parser/bm_sexp.rb +5 -1
- metadata +515 -422
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/CHANGELOG.md +0 -1505
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/FAQ.md +0 -147
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/Gemfile +0 -16
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/MIT-LICENSE +0 -20
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/README.md +0 -216
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/REFERENCE.md +0 -1380
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/TODO +0 -24
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/haml.gemspec +0 -45
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_builder.rb +0 -219
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_compiler.rb +0 -237
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_parser.rb +0 -150
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/buffer.rb +0 -182
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/compiler.rb +0 -330
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/engine.rb +0 -238
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/error.rb +0 -65
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/escapable.rb +0 -77
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/exec.rb +0 -347
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/filters.rb +0 -399
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/generator.rb +0 -42
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/action_view_extensions.rb +0 -60
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/action_view_mods.rb +0 -132
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/action_view_xss_mods.rb +0 -60
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/safe_erubi_template.rb +0 -20
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/safe_erubis_template.rb +0 -33
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/xss_mods.rb +0 -114
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers.rb +0 -709
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/options.rb +0 -273
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/parser.rb +0 -856
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/plugin.rb +0 -54
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/railtie.rb +0 -53
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/sass_rails_filter.rb +0 -47
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template/options.rb +0 -27
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template.rb +0 -39
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/temple_engine.rb +0 -124
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/temple_line_counter.rb +0 -30
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/util.rb +0 -258
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/version.rb +0 -5
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml.rb +0 -25
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/yard/default/fulldoc/html/css/common.sass +0 -15
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/yard/default/layout/html/footer.erb +0 -12
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/Changelog.md +0 -620
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/Gemfile +0 -22
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/README.md +0 -202
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/appveyor.yml +0 -37
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/highline.gemspec +0 -35
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/io_console_compatible.rb +0 -37
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/list_renderer.rb +0 -261
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/menu.rb +0 -576
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/question/answer_converter.rb +0 -103
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/question.rb +0 -630
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/question_asker.rb +0 -150
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/terminal/io_console.rb +0 -36
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/terminal/unix_stty.rb +0 -51
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/terminal.rb +0 -190
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/version.rb +0 -6
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline.rb +0 -650
- data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/processor_count.rb +0 -44
- data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/version.rb +0 -4
- data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel.rb +0 -612
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md +0 -178
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/README.md +0 -48
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +0 -205
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +0 -68
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/child.rb +0 -97
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/comment.rb +0 -80
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +0 -311
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/document.rb +0 -451
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/element.rb +0 -2599
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +0 -51
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/entity.rb +0 -171
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +0 -142
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/functions.rb +0 -447
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +0 -79
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +0 -59
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/node.rb +0 -76
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +0 -52
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +0 -694
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +0 -197
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +0 -273
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +0 -61
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +0 -101
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +0 -689
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +0 -266
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +0 -37
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/security.rb +0 -28
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb +0 -298
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/text.rb +0 -424
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +0 -539
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +0 -144
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +0 -81
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +0 -974
- data/bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/History.rdoc +0 -435
- data/bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb +0 -1309
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/History.rdoc +0 -1297
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/Manifest.txt +0 -46
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/README.rdoc +0 -112
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/compare/normalize.rb +0 -218
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby20_parser.rb +0 -10973
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby20_parser.y +0 -2683
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby21_parser.rb +0 -10980
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby21_parser.y +0 -2700
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby22_parser.rb +0 -11123
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby22_parser.y +0 -2711
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby23_parser.rb +0 -11132
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby23_parser.y +0 -2713
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby24_parser.rb +0 -11231
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby24_parser.y +0 -2721
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby25_parser.rb +0 -11231
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby25_parser.y +0 -2721
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby26_parser.rb +0 -11253
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby26_parser.y +0 -2736
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby27_parser.rb +0 -12980
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby27_parser.y +0 -3324
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby30_parser.rb +0 -13242
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby30_parser.y +0 -3447
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.rb +0 -13622
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.y +0 -3481
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby3_parser.yy +0 -3536
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_lexer.rb +0 -1144
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_lexer.rex.rb +0 -399
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_lexer_strings.rb +0 -638
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_parser.rb +0 -98
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_parser.yy +0 -3465
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_parser_extras.rb +0 -1865
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/tools/munge.rb +0 -250
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/tools/ripper.rb +0 -44
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -6
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -19
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -54
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -5794
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -1909
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -6186
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -2117
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -1412
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -179
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +0 -323
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -30
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +0 -1388
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -5
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/CHANGES.md +0 -154
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/Gemfile +0 -11
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/LICENSE.txt +0 -22
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/README.md +0 -191
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -11
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -34
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -36
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -181
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -37
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -12
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -26
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -99
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -52
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -94
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -29
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -39
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -36
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -43
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -38
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -21
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -13
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -33
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -26
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -18
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -17
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -47
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -41
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -3
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -94
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -38
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -19
- data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/History.rdoc +0 -448
- data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/pt_testcase.rb +0 -3133
- data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/sexp.rb +0 -391
- data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/sexp_matcher.rb +0 -1100
- data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/sexp_processor.rb +0 -754
- data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/strict_sexp.rb +0 -148
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/CHANGES +0 -460
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/Gemfile +0 -70
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/LICENSE +0 -21
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/README.jp.md +0 -1289
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/README.md +0 -1290
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/code_attributes.rb +0 -67
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/command.rb +0 -128
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/controls.rb +0 -60
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/do_inserter.rb +0 -33
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/embedded.rb +0 -248
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/end_inserter.rb +0 -62
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/engine.rb +0 -39
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/erb_converter.rb +0 -14
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/filter.rb +0 -30
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/grammar.rb +0 -23
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/include.rb +0 -57
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/interpolation.rb +0 -35
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/logic_less/context.rb +0 -127
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/logic_less/filter.rb +0 -80
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/logic_less.rb +0 -5
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/parser.rb +0 -548
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart/escaper.rb +0 -42
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart/filter.rb +0 -96
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart/parser.rb +0 -34
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart.rb +0 -8
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/splat/builder.rb +0 -107
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/splat/filter.rb +0 -91
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/template.rb +0 -19
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/translator.rb +0 -118
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/version.rb +0 -5
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim.rb +0 -14
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/slim.gemspec +0 -24
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/CHANGES +0 -260
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/Gemfile +0 -3
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/README.md +0 -267
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/engine.rb +0 -67
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/engine.rb +0 -15
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/parser.rb +0 -40
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/template.rb +0 -11
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/trimming.rb +0 -23
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/exceptions.rb +0 -13
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filter.rb +0 -9
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/code_merger.rb +0 -30
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/control_flow.rb +0 -42
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/dynamic_inliner.rb +0 -71
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/encoding.rb +0 -24
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/eraser.rb +0 -22
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/escapable.rb +0 -40
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/multi_flattener.rb +0 -25
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/remove_bom.rb +0 -13
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/static_analyzer.rb +0 -30
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/static_merger.rb +0 -37
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/string_splitter.rb +0 -130
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/validator.rb +0 -15
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generator.rb +0 -88
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/array.rb +0 -21
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/array_buffer.rb +0 -29
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/erb.rb +0 -32
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/rails_output_buffer.rb +0 -35
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/string_buffer.rb +0 -25
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/grammar.rb +0 -57
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/attribute_merger.rb +0 -42
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/attribute_remover.rb +0 -35
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/attribute_sorter.rb +0 -21
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/dispatcher.rb +0 -31
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/fast.rb +0 -130
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/filter.rb +0 -21
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/pretty.rb +0 -103
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/safe.rb +0 -23
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/map.rb +0 -105
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/dispatcher.rb +0 -161
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/engine_dsl.rb +0 -145
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/grammar_dsl.rb +0 -170
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/options.rb +0 -87
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/template.rb +0 -28
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/parser.rb +0 -8
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/static_analyzer.rb +0 -77
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/templates/rails.rb +0 -26
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/templates/tilt.rb +0 -46
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/templates.rb +0 -11
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/utils.rb +0 -101
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/version.rb +0 -3
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple.rb +0 -67
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/temple.gemspec +0 -29
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/History.rdoc +0 -85
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/README.rdoc +0 -247
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/cell.rb +0 -94
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/row.rb +0 -52
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -14
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -79
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/table.rb +0 -343
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/version.rb +0 -5
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table.rb +0 -26
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/terminal-table.gemspec +0 -26
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/COPYING +0 -18
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/asciidoc.rb +0 -27
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/babel.rb +0 -16
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/bluecloth.rb +0 -24
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/builder.rb +0 -37
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/coffee.rb +0 -58
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/commonmarker.rb +0 -78
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/creole.rb +0 -25
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/csv.rb +0 -65
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/dummy.rb +0 -3
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erb.rb +0 -63
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubi.rb +0 -32
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubis.rb +0 -43
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/etanni.rb +0 -27
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/haml.rb +0 -86
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/kramdown.rb +0 -25
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/less.rb +0 -30
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/liquid.rb +0 -44
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/livescript.rb +0 -23
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/mapping.rb +0 -293
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/markaby.rb +0 -45
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/maruku.rb +0 -22
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/nokogiri.rb +0 -36
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/pandoc.rb +0 -49
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/plain.rb +0 -16
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/prawn.rb +0 -43
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/radius.rb +0 -48
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdiscount.rb +0 -39
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdoc.rb +0 -40
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcarpet.rb +0 -83
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcloth.rb +0 -23
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rst-pandoc.rb +0 -18
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sass.rb +0 -52
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sigil.rb +0 -34
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/string.rb +0 -21
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/template.rb +0 -297
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/typescript.rb +0 -26
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/wikicloth.rb +0 -22
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/yajl.rb +0 -87
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt.rb +0 -166
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/CHANGELOG.md +0 -137
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/MIT-LICENSE.txt +0 -22
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/README.md +0 -124
- 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.8.0/lib/unicode/display_width/constants.rb +0 -8
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/index.rb +0 -12
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/no_string_ext.rb +0 -7
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/string_ext.rb +0 -17
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb +0 -51
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/README.txt +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/setup.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/AUTHORS +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/COPYING +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/LICENSE +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/TODO +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/builtin_styles.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/color_scheme.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/compatibility.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/custom_errors.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/import.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/list.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/menu/item.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/paginator.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/simulate.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/statement.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/string.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/string_extensions.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/template_renderer.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/terminal/ncurses.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/wrapper.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/parallel-1.22.1 → 3.1.0/gems/parallel-1.27.0}/MIT-LICENSE.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5/LICENSE.txt → 3.1.0/gems/reline-0.6.2/BSDL} +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/attlistdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/attlistdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/dtd.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/elementdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/entitydecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/notationdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/formatters/default.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/formatters/transitive.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/light/node.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/output.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/parent.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/parsers/lightparser.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/parsers/ultralightparser.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/sax2listener.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/streamlistener.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/undefinednamespaceexception.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/validation/validationexception.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/xmldecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/xmltokens.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.2}/Manifest.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.2}/README.rdoc +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/debugging.md +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/gauntlet.md +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_extensions.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_stringscanner.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rex +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/Manifest.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/README.rdoc +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/lib/composite_sexp_processor.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/lib/unique.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.4}/EXPRESSIONS.md +0 -0
- /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.4}/LICENSE +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/Gemfile +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/LICENSE.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/Manifest +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/Todo.rdoc +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/lib/terminal-table/import.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/lib/terminal-table/table_helper.rb +0 -0
|
@@ -0,0 +1,949 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require_relative '../parseexception'
|
|
3
|
+
require_relative '../undefinednamespaceexception'
|
|
4
|
+
require_relative '../security'
|
|
5
|
+
require_relative '../source'
|
|
6
|
+
require 'set'
|
|
7
|
+
require "strscan"
|
|
8
|
+
|
|
9
|
+
module REXML
|
|
10
|
+
module Parsers
|
|
11
|
+
unless [].respond_to?(:tally)
|
|
12
|
+
module EnumerableTally
|
|
13
|
+
refine Enumerable do
|
|
14
|
+
def tally
|
|
15
|
+
counts = {}
|
|
16
|
+
each do |item|
|
|
17
|
+
counts[item] ||= 0
|
|
18
|
+
counts[item] += 1
|
|
19
|
+
end
|
|
20
|
+
counts
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
using EnumerableTally
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
if StringScanner::Version < "3.0.8"
|
|
28
|
+
module StringScannerCaptures
|
|
29
|
+
refine StringScanner do
|
|
30
|
+
def captures
|
|
31
|
+
values_at(*(1...size))
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
using StringScannerCaptures
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# = Using the Pull Parser
|
|
39
|
+
# <em>This API is experimental, and subject to change.</em>
|
|
40
|
+
# parser = PullParser.new( "<a>text<b att='val'/>txet</a>" )
|
|
41
|
+
# while parser.has_next?
|
|
42
|
+
# res = parser.next
|
|
43
|
+
# puts res[1]['att'] if res.start_tag? and res[0] == 'b'
|
|
44
|
+
# end
|
|
45
|
+
# See the PullEvent class for information on the content of the results.
|
|
46
|
+
# The data is identical to the arguments passed for the various events to
|
|
47
|
+
# the StreamListener API.
|
|
48
|
+
#
|
|
49
|
+
# Notice that:
|
|
50
|
+
# parser = PullParser.new( "<a>BAD DOCUMENT" )
|
|
51
|
+
# while parser.has_next?
|
|
52
|
+
# res = parser.next
|
|
53
|
+
# raise res[1] if res.error?
|
|
54
|
+
# end
|
|
55
|
+
#
|
|
56
|
+
# Nat Price gave me some good ideas for the API.
|
|
57
|
+
class BaseParser
|
|
58
|
+
LETTER = '[:alpha:]'
|
|
59
|
+
DIGIT = '[:digit:]'
|
|
60
|
+
|
|
61
|
+
COMBININGCHAR = '' # TODO
|
|
62
|
+
EXTENDER = '' # TODO
|
|
63
|
+
|
|
64
|
+
NCNAME_STR= "[#{LETTER}_][-[:alnum:]._#{COMBININGCHAR}#{EXTENDER}]*"
|
|
65
|
+
QNAME_STR= "(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})"
|
|
66
|
+
QNAME = /(#{QNAME_STR})/
|
|
67
|
+
|
|
68
|
+
# Just for backward compatibility. For example, kramdown uses this.
|
|
69
|
+
# It's not used in REXML.
|
|
70
|
+
UNAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}"
|
|
71
|
+
|
|
72
|
+
NAMECHAR = '[\-\w\.:]'
|
|
73
|
+
NAME = "([\\w:]#{NAMECHAR}*)"
|
|
74
|
+
NMTOKEN = "(?:#{NAMECHAR})+"
|
|
75
|
+
NMTOKENS = "#{NMTOKEN}(\\s+#{NMTOKEN})*"
|
|
76
|
+
REFERENCE = "&(?:#{NAME};|#\\d+;|#x[0-9a-fA-F]+;)"
|
|
77
|
+
REFERENCE_RE = /#{REFERENCE}/
|
|
78
|
+
|
|
79
|
+
DOCTYPE_START = /\A\s*<!DOCTYPE\s/um
|
|
80
|
+
DOCTYPE_END = /\A\s*\]\s*>/um
|
|
81
|
+
ATTRIBUTE_PATTERN = /\s*(#{QNAME_STR})\s*=\s*(["'])(.*?)\4/um
|
|
82
|
+
COMMENT_START = /\A<!--/u
|
|
83
|
+
COMMENT_PATTERN = /<!--(.*?)-->/um
|
|
84
|
+
CDATA_START = /\A<!\[CDATA\[/u
|
|
85
|
+
CDATA_END = /\A\s*\]\s*>/um
|
|
86
|
+
CDATA_PATTERN = /<!\[CDATA\[(.*?)\]\]>/um
|
|
87
|
+
XMLDECL_START = /\A<\?xml\s/u;
|
|
88
|
+
XMLDECL_PATTERN = /<\?xml\s+(.*?)\?>/um
|
|
89
|
+
INSTRUCTION_START = /\A<\?/u
|
|
90
|
+
INSTRUCTION_PATTERN = /<\?#{NAME}(\s+.*?)?\?>/um
|
|
91
|
+
TAG_MATCH = /\A<((?>#{QNAME_STR}))/um
|
|
92
|
+
CLOSE_MATCH = /\A\s*<\/(#{QNAME_STR})\s*>/um
|
|
93
|
+
|
|
94
|
+
VERSION = /\bversion\s*=\s*["'](.*?)['"]/um
|
|
95
|
+
ENCODING = /\bencoding\s*=\s*["'](.*?)['"]/um
|
|
96
|
+
STANDALONE = /\bstandalone\s*=\s*["'](.*?)['"]/um
|
|
97
|
+
|
|
98
|
+
ENTITY_START = /\A\s*<!ENTITY/
|
|
99
|
+
ELEMENTDECL_START = /\A\s*<!ELEMENT/um
|
|
100
|
+
ELEMENTDECL_PATTERN = /\A\s*(<!ELEMENT.*?)>/um
|
|
101
|
+
SYSTEMENTITY = /\A\s*(%.*?;)\s*$/um
|
|
102
|
+
ENUMERATION = "\\(\\s*#{NMTOKEN}(?:\\s*\\|\\s*#{NMTOKEN})*\\s*\\)"
|
|
103
|
+
NOTATIONTYPE = "NOTATION\\s+\\(\\s*#{NAME}(?:\\s*\\|\\s*#{NAME})*\\s*\\)"
|
|
104
|
+
ENUMERATEDTYPE = "(?:(?:#{NOTATIONTYPE})|(?:#{ENUMERATION}))"
|
|
105
|
+
ATTTYPE = "(CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS|#{ENUMERATEDTYPE})"
|
|
106
|
+
ATTVALUE = "(?:\"((?:[^<&\"]|#{REFERENCE})*)\")|(?:'((?:[^<&']|#{REFERENCE})*)')"
|
|
107
|
+
DEFAULTDECL = "(#REQUIRED|#IMPLIED|(?:(#FIXED\\s+)?#{ATTVALUE}))"
|
|
108
|
+
ATTDEF = "\\s+#{NAME}\\s+#{ATTTYPE}\\s+#{DEFAULTDECL}"
|
|
109
|
+
ATTDEF_RE = /#{ATTDEF}/
|
|
110
|
+
ATTLISTDECL_START = /\A\s*<!ATTLIST/um
|
|
111
|
+
ATTLISTDECL_PATTERN = /\A\s*<!ATTLIST\s+#{NAME}(?:#{ATTDEF})*\s*>/um
|
|
112
|
+
|
|
113
|
+
TEXT_PATTERN = /\A([^<]*)/um
|
|
114
|
+
|
|
115
|
+
# Entity constants
|
|
116
|
+
PUBIDCHAR = "\x20\x0D\x0Aa-zA-Z0-9\\-()+,./:=?;!*@$_%#"
|
|
117
|
+
SYSTEMLITERAL = %Q{((?:"[^"]*")|(?:'[^']*'))}
|
|
118
|
+
PUBIDLITERAL = %Q{("[#{PUBIDCHAR}']*"|'[#{PUBIDCHAR}]*')}
|
|
119
|
+
EXTERNALID = "(?:(?:(SYSTEM)\\s+#{SYSTEMLITERAL})|(?:(PUBLIC)\\s+#{PUBIDLITERAL}\\s+#{SYSTEMLITERAL}))"
|
|
120
|
+
NDATADECL = "\\s+NDATA\\s+#{NAME}"
|
|
121
|
+
PEREFERENCE = "%#{NAME};"
|
|
122
|
+
ENTITYVALUE = %Q{((?:"(?:[^%&"]|#{PEREFERENCE}|#{REFERENCE})*")|(?:'([^%&']|#{PEREFERENCE}|#{REFERENCE})*'))}
|
|
123
|
+
PEDEF = "(?:#{ENTITYVALUE}|#{EXTERNALID})"
|
|
124
|
+
ENTITYDEF = "(?:#{ENTITYVALUE}|(?:#{EXTERNALID}(#{NDATADECL})?))"
|
|
125
|
+
PEDECL = "<!ENTITY\\s+(%)\\s+#{NAME}\\s+#{PEDEF}\\s*>"
|
|
126
|
+
GEDECL = "<!ENTITY\\s+#{NAME}\\s+#{ENTITYDEF}\\s*>"
|
|
127
|
+
ENTITYDECL = /\s*(?:#{GEDECL})|\s*(?:#{PEDECL})/um
|
|
128
|
+
|
|
129
|
+
NOTATIONDECL_START = /\A\s*<!NOTATION/um
|
|
130
|
+
EXTERNAL_ID_PUBLIC = /\A\s*PUBLIC\s+#{PUBIDLITERAL}\s+#{SYSTEMLITERAL}\s*/um
|
|
131
|
+
EXTERNAL_ID_SYSTEM = /\A\s*SYSTEM\s+#{SYSTEMLITERAL}\s*/um
|
|
132
|
+
PUBLIC_ID = /\A\s*PUBLIC\s+#{PUBIDLITERAL}\s*/um
|
|
133
|
+
|
|
134
|
+
EREFERENCE = /&(?!#{NAME};)/
|
|
135
|
+
|
|
136
|
+
DEFAULT_ENTITIES = {
|
|
137
|
+
'gt' => [/>/, '>', '>', />/],
|
|
138
|
+
'lt' => [/</, '<', '<', /</],
|
|
139
|
+
'quot' => [/"/, '"', '"', /"/],
|
|
140
|
+
"apos" => [/'/, "'", "'", /'/]
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
module Private
|
|
144
|
+
PEREFERENCE_PATTERN = /#{PEREFERENCE}/um
|
|
145
|
+
TAG_PATTERN = /((?>#{QNAME_STR}))\s*/um
|
|
146
|
+
CLOSE_PATTERN = /(#{QNAME_STR})\s*>/um
|
|
147
|
+
EQUAL_PATTERN = /\s*=\s*/um
|
|
148
|
+
ATTLISTDECL_END = /\s+#{NAME}(?:#{ATTDEF})*\s*>/um
|
|
149
|
+
NAME_PATTERN = /#{NAME}/um
|
|
150
|
+
GEDECL_PATTERN = "\\s+#{NAME}\\s+#{ENTITYDEF}\\s*>"
|
|
151
|
+
PEDECL_PATTERN = "\\s+(%)\\s+#{NAME}\\s+#{PEDEF}\\s*>"
|
|
152
|
+
ENTITYDECL_PATTERN = /(?:#{GEDECL_PATTERN})|(?:#{PEDECL_PATTERN})/um
|
|
153
|
+
CARRIAGE_RETURN_NEWLINE_PATTERN = /\r\n?/
|
|
154
|
+
CHARACTER_REFERENCES = /&#((?:\d+)|(?:x[a-fA-F0-9]+));/
|
|
155
|
+
DEFAULT_ENTITIES_PATTERNS = {}
|
|
156
|
+
default_entities = ['gt', 'lt', 'quot', 'apos', 'amp']
|
|
157
|
+
default_entities.each do |term|
|
|
158
|
+
DEFAULT_ENTITIES_PATTERNS[term] = /&#{term};/
|
|
159
|
+
end
|
|
160
|
+
XML_PREFIXED_NAMESPACE = "http://www.w3.org/XML/1998/namespace"
|
|
161
|
+
end
|
|
162
|
+
private_constant :Private
|
|
163
|
+
|
|
164
|
+
def initialize( source )
|
|
165
|
+
self.stream = source
|
|
166
|
+
@listeners = []
|
|
167
|
+
@prefixes = Set.new
|
|
168
|
+
@entity_expansion_count = 0
|
|
169
|
+
@entity_expansion_limit = Security.entity_expansion_limit
|
|
170
|
+
@entity_expansion_text_limit = Security.entity_expansion_text_limit
|
|
171
|
+
@source.ensure_buffer
|
|
172
|
+
@version = nil
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
def add_listener( listener )
|
|
176
|
+
@listeners << listener
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
attr_reader :source
|
|
180
|
+
attr_reader :entity_expansion_count
|
|
181
|
+
attr_writer :entity_expansion_limit
|
|
182
|
+
attr_writer :entity_expansion_text_limit
|
|
183
|
+
|
|
184
|
+
def stream=( source )
|
|
185
|
+
@source = SourceFactory.create_from( source )
|
|
186
|
+
reset
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
def reset
|
|
190
|
+
@closed = nil
|
|
191
|
+
@have_root = false
|
|
192
|
+
@document_status = nil
|
|
193
|
+
@tags = []
|
|
194
|
+
@stack = []
|
|
195
|
+
@entities = []
|
|
196
|
+
@namespaces = {"xml" => Private::XML_PREFIXED_NAMESPACE}
|
|
197
|
+
@namespaces_restore_stack = []
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
def position
|
|
201
|
+
if @source.respond_to? :position
|
|
202
|
+
@source.position
|
|
203
|
+
else
|
|
204
|
+
# FIXME
|
|
205
|
+
0
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Returns true if there are no more events
|
|
210
|
+
def empty?
|
|
211
|
+
(@source.empty? and @stack.empty?)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Returns true if there are more events. Synonymous with !empty?
|
|
215
|
+
def has_next?
|
|
216
|
+
!(@source.empty? and @stack.empty?)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Push an event back on the head of the stream. This method
|
|
220
|
+
# has (theoretically) infinite depth.
|
|
221
|
+
def unshift token
|
|
222
|
+
@stack.unshift(token)
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Peek at the +depth+ event in the stack. The first element on the stack
|
|
226
|
+
# is at depth 0. If +depth+ is -1, will parse to the end of the input
|
|
227
|
+
# stream and return the last event, which is always :end_document.
|
|
228
|
+
# Be aware that this causes the stream to be parsed up to the +depth+
|
|
229
|
+
# event, so you can effectively pre-parse the entire document (pull the
|
|
230
|
+
# entire thing into memory) using this method.
|
|
231
|
+
def peek depth=0
|
|
232
|
+
raise %Q[Illegal argument "#{depth}"] if depth < -1
|
|
233
|
+
temp = []
|
|
234
|
+
if depth == -1
|
|
235
|
+
temp.push(pull()) until empty?
|
|
236
|
+
else
|
|
237
|
+
while @stack.size+temp.size < depth+1
|
|
238
|
+
temp.push(pull())
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
@stack += temp if temp.size > 0
|
|
242
|
+
@stack[depth]
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Returns the next event. This is a +PullEvent+ object.
|
|
246
|
+
def pull
|
|
247
|
+
@source.drop_parsed_content
|
|
248
|
+
|
|
249
|
+
pull_event.tap do |event|
|
|
250
|
+
@listeners.each do |listener|
|
|
251
|
+
listener.receive event
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
def pull_event
|
|
257
|
+
if @closed
|
|
258
|
+
x, @closed = @closed, nil
|
|
259
|
+
return [ :end_element, x ]
|
|
260
|
+
end
|
|
261
|
+
if empty?
|
|
262
|
+
if @document_status == :in_doctype
|
|
263
|
+
raise ParseException.new("Malformed DOCTYPE: unclosed", @source)
|
|
264
|
+
end
|
|
265
|
+
unless @tags.empty?
|
|
266
|
+
path = "/" + @tags.join("/")
|
|
267
|
+
raise ParseException.new("Missing end tag for '#{path}'", @source)
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
unless @document_status == :in_element
|
|
271
|
+
raise ParseException.new("Malformed XML: No root element", @source)
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
return [ :end_document ]
|
|
275
|
+
end
|
|
276
|
+
return @stack.shift if @stack.size > 0
|
|
277
|
+
#STDERR.puts @source.encoding
|
|
278
|
+
#STDERR.puts "BUFFER = #{@source.buffer.inspect}"
|
|
279
|
+
|
|
280
|
+
@source.ensure_buffer
|
|
281
|
+
if @document_status == nil
|
|
282
|
+
start_position = @source.position
|
|
283
|
+
if @source.match?("<?", true)
|
|
284
|
+
return process_instruction
|
|
285
|
+
elsif @source.match?("<!", true)
|
|
286
|
+
if @source.match?("--", true)
|
|
287
|
+
return [ :comment, process_comment ]
|
|
288
|
+
elsif @source.match?("DOCTYPE", true)
|
|
289
|
+
base_error_message = "Malformed DOCTYPE"
|
|
290
|
+
unless @source.skip_spaces
|
|
291
|
+
if @source.match?(">")
|
|
292
|
+
message = "#{base_error_message}: name is missing"
|
|
293
|
+
else
|
|
294
|
+
message = "#{base_error_message}: invalid name"
|
|
295
|
+
end
|
|
296
|
+
@source.position = start_position
|
|
297
|
+
raise REXML::ParseException.new(message, @source)
|
|
298
|
+
end
|
|
299
|
+
name = parse_name(base_error_message)
|
|
300
|
+
@source.skip_spaces
|
|
301
|
+
if @source.match?("[", true)
|
|
302
|
+
id = [nil, nil, nil]
|
|
303
|
+
@document_status = :in_doctype
|
|
304
|
+
elsif @source.match?(">", true)
|
|
305
|
+
id = [nil, nil, nil]
|
|
306
|
+
@document_status = :after_doctype
|
|
307
|
+
@source.ensure_buffer
|
|
308
|
+
else
|
|
309
|
+
id = parse_id(base_error_message,
|
|
310
|
+
accept_external_id: true,
|
|
311
|
+
accept_public_id: false)
|
|
312
|
+
if id[0] == "SYSTEM"
|
|
313
|
+
# For backward compatibility
|
|
314
|
+
id[1], id[2] = id[2], nil
|
|
315
|
+
end
|
|
316
|
+
@source.skip_spaces
|
|
317
|
+
if @source.match?("[", true)
|
|
318
|
+
@document_status = :in_doctype
|
|
319
|
+
elsif @source.match?(">", true)
|
|
320
|
+
@document_status = :after_doctype
|
|
321
|
+
@source.ensure_buffer
|
|
322
|
+
else
|
|
323
|
+
message = "#{base_error_message}: garbage after external ID"
|
|
324
|
+
raise REXML::ParseException.new(message, @source)
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
args = [:start_doctype, name, *id]
|
|
328
|
+
if @document_status == :after_doctype
|
|
329
|
+
@source.skip_spaces
|
|
330
|
+
@stack << [ :end_doctype ]
|
|
331
|
+
end
|
|
332
|
+
return args
|
|
333
|
+
else
|
|
334
|
+
message = "Invalid XML"
|
|
335
|
+
raise REXML::ParseException.new(message, @source)
|
|
336
|
+
end
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
if @document_status == :in_doctype
|
|
340
|
+
@source.skip_spaces
|
|
341
|
+
start_position = @source.position
|
|
342
|
+
if @source.match?("<!", true)
|
|
343
|
+
if @source.match?("ELEMENT", true)
|
|
344
|
+
md = @source.match(/(.*?)>/um, true)
|
|
345
|
+
raise REXML::ParseException.new( "Bad ELEMENT declaration!", @source ) if md.nil?
|
|
346
|
+
return [ :elementdecl, "<!ELEMENT" + md[1] ]
|
|
347
|
+
elsif @source.match?("ENTITY", true)
|
|
348
|
+
match_data = @source.match(Private::ENTITYDECL_PATTERN, true)
|
|
349
|
+
unless match_data
|
|
350
|
+
raise REXML::ParseException.new("Malformed entity declaration", @source)
|
|
351
|
+
end
|
|
352
|
+
match = [:entitydecl, *match_data.captures.compact]
|
|
353
|
+
ref = false
|
|
354
|
+
if match[1] == '%'
|
|
355
|
+
ref = true
|
|
356
|
+
match.delete_at 1
|
|
357
|
+
end
|
|
358
|
+
# Now we have to sort out what kind of entity reference this is
|
|
359
|
+
if match[2] == 'SYSTEM'
|
|
360
|
+
# External reference
|
|
361
|
+
match[3] = match[3][1..-2] # PUBID
|
|
362
|
+
match.delete_at(4) if match.size > 4 # Chop out NDATA decl
|
|
363
|
+
# match is [ :entity, name, SYSTEM, pubid(, ndata)? ]
|
|
364
|
+
elsif match[2] == 'PUBLIC'
|
|
365
|
+
# External reference
|
|
366
|
+
match[3] = match[3][1..-2] # PUBID
|
|
367
|
+
match[4] = match[4][1..-2] # HREF
|
|
368
|
+
match.delete_at(5) if match.size > 5 # Chop out NDATA decl
|
|
369
|
+
# match is [ :entity, name, PUBLIC, pubid, href(, ndata)? ]
|
|
370
|
+
elsif Private::PEREFERENCE_PATTERN.match?(match[2])
|
|
371
|
+
raise REXML::ParseException.new("Parameter entity references forbidden in internal subset: #{match[2]}", @source)
|
|
372
|
+
else
|
|
373
|
+
match[2] = match[2][1..-2]
|
|
374
|
+
match.pop if match.size == 4
|
|
375
|
+
# match is [ :entity, name, value ]
|
|
376
|
+
end
|
|
377
|
+
match << '%' if ref
|
|
378
|
+
return match
|
|
379
|
+
elsif @source.match?("ATTLIST", true)
|
|
380
|
+
md = @source.match(Private::ATTLISTDECL_END, true)
|
|
381
|
+
raise REXML::ParseException.new( "Bad ATTLIST declaration!", @source ) if md.nil?
|
|
382
|
+
element = md[1]
|
|
383
|
+
contents = "<!ATTLIST" + md[0]
|
|
384
|
+
|
|
385
|
+
pairs = {}
|
|
386
|
+
values = md[0].strip.scan( ATTDEF_RE )
|
|
387
|
+
values.each do |attdef|
|
|
388
|
+
unless attdef[3] == "#IMPLIED"
|
|
389
|
+
attdef.compact!
|
|
390
|
+
val = attdef[3]
|
|
391
|
+
val = attdef[4] if val == "#FIXED "
|
|
392
|
+
pairs[attdef[0]] = val
|
|
393
|
+
if attdef[0] =~ /^xmlns:(.*)/
|
|
394
|
+
@namespaces[$1] = val
|
|
395
|
+
end
|
|
396
|
+
end
|
|
397
|
+
end
|
|
398
|
+
return [ :attlistdecl, element, pairs, contents ]
|
|
399
|
+
elsif @source.match?("NOTATION", true)
|
|
400
|
+
base_error_message = "Malformed notation declaration"
|
|
401
|
+
unless @source.skip_spaces
|
|
402
|
+
if @source.match?(">")
|
|
403
|
+
message = "#{base_error_message}: name is missing"
|
|
404
|
+
else
|
|
405
|
+
message = "#{base_error_message}: invalid name"
|
|
406
|
+
end
|
|
407
|
+
@source.position = start_position
|
|
408
|
+
raise REXML::ParseException.new(message, @source)
|
|
409
|
+
end
|
|
410
|
+
name = parse_name(base_error_message)
|
|
411
|
+
id = parse_id(base_error_message,
|
|
412
|
+
accept_external_id: true,
|
|
413
|
+
accept_public_id: true)
|
|
414
|
+
@source.skip_spaces
|
|
415
|
+
unless @source.match?(">", true)
|
|
416
|
+
message = "#{base_error_message}: garbage before end >"
|
|
417
|
+
raise REXML::ParseException.new(message, @source)
|
|
418
|
+
end
|
|
419
|
+
return [:notationdecl, name, *id]
|
|
420
|
+
elsif @source.match?("--", true)
|
|
421
|
+
return [ :comment, process_comment ]
|
|
422
|
+
else
|
|
423
|
+
raise REXML::ParseException.new("Malformed node: Started with '<!' but not a comment nor ELEMENT,ENTITY,ATTLIST,NOTATION", @source)
|
|
424
|
+
end
|
|
425
|
+
elsif match = @source.match(/(%.*?;)\s*/um, true)
|
|
426
|
+
return [ :externalentity, match[1] ]
|
|
427
|
+
elsif @source.match?(/\]\s*>/um, true)
|
|
428
|
+
@document_status = :after_doctype
|
|
429
|
+
return [ :end_doctype ]
|
|
430
|
+
else
|
|
431
|
+
raise ParseException.new("Malformed DOCTYPE: invalid declaration", @source)
|
|
432
|
+
end
|
|
433
|
+
end
|
|
434
|
+
if @document_status == :after_doctype
|
|
435
|
+
@source.skip_spaces
|
|
436
|
+
end
|
|
437
|
+
begin
|
|
438
|
+
start_position = @source.position
|
|
439
|
+
if @source.match?("<", true)
|
|
440
|
+
# :text's read_until may remain only "<" in buffer. In the
|
|
441
|
+
# case, buffer is empty here. So we need to fill buffer
|
|
442
|
+
# here explicitly.
|
|
443
|
+
@source.ensure_buffer
|
|
444
|
+
if @source.match?("/", true)
|
|
445
|
+
@namespaces_restore_stack.pop
|
|
446
|
+
last_tag = @tags.pop
|
|
447
|
+
md = @source.match(Private::CLOSE_PATTERN, true)
|
|
448
|
+
if md and !last_tag
|
|
449
|
+
message = "Unexpected top-level end tag (got '#{md[1]}')"
|
|
450
|
+
raise REXML::ParseException.new(message, @source)
|
|
451
|
+
end
|
|
452
|
+
if md.nil? or last_tag != md[1]
|
|
453
|
+
message = "Missing end tag for '#{last_tag}'"
|
|
454
|
+
message += " (got '#{md[1]}')" if md
|
|
455
|
+
@source.position = start_position if md.nil?
|
|
456
|
+
raise REXML::ParseException.new(message, @source)
|
|
457
|
+
end
|
|
458
|
+
return [ :end_element, last_tag ]
|
|
459
|
+
elsif @source.match?("!", true)
|
|
460
|
+
#STDERR.puts "SOURCE BUFFER = #{source.buffer}, #{source.buffer.size}"
|
|
461
|
+
if @source.match?("--", true)
|
|
462
|
+
return [ :comment, process_comment ]
|
|
463
|
+
elsif @source.match?("[CDATA[", true)
|
|
464
|
+
text = @source.read_until("]]>")
|
|
465
|
+
if text.chomp!("]]>")
|
|
466
|
+
return [ :cdata, text ]
|
|
467
|
+
else
|
|
468
|
+
raise REXML::ParseException.new("Malformed CDATA: Missing end ']]>'", @source)
|
|
469
|
+
end
|
|
470
|
+
else
|
|
471
|
+
raise REXML::ParseException.new("Malformed node: Started with '<!' but not a comment nor CDATA", @source)
|
|
472
|
+
end
|
|
473
|
+
elsif @source.match?("?", true)
|
|
474
|
+
return process_instruction
|
|
475
|
+
else
|
|
476
|
+
# Get the next tag
|
|
477
|
+
md = @source.match(Private::TAG_PATTERN, true)
|
|
478
|
+
unless md
|
|
479
|
+
@source.position = start_position
|
|
480
|
+
raise REXML::ParseException.new("malformed XML: missing tag start", @source)
|
|
481
|
+
end
|
|
482
|
+
tag = md[1]
|
|
483
|
+
@document_status = :in_element
|
|
484
|
+
@prefixes.clear
|
|
485
|
+
@prefixes << md[2] if md[2]
|
|
486
|
+
push_namespaces_restore
|
|
487
|
+
attributes, closed = parse_attributes(@prefixes)
|
|
488
|
+
# Verify that all of the prefixes have been defined
|
|
489
|
+
for prefix in @prefixes
|
|
490
|
+
unless @namespaces.key?(prefix)
|
|
491
|
+
raise UndefinedNamespaceException.new(prefix,@source,self)
|
|
492
|
+
end
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
if closed
|
|
496
|
+
@closed = tag
|
|
497
|
+
pop_namespaces_restore
|
|
498
|
+
else
|
|
499
|
+
if @tags.empty? and @have_root
|
|
500
|
+
raise ParseException.new("Malformed XML: Extra tag at the end of the document (got '<#{tag}')", @source)
|
|
501
|
+
end
|
|
502
|
+
@tags.push( tag )
|
|
503
|
+
end
|
|
504
|
+
@have_root = true
|
|
505
|
+
return [ :start_element, tag, attributes ]
|
|
506
|
+
end
|
|
507
|
+
else
|
|
508
|
+
text = @source.read_until("<")
|
|
509
|
+
if text.chomp!("<")
|
|
510
|
+
@source.position -= "<".bytesize
|
|
511
|
+
end
|
|
512
|
+
if @tags.empty?
|
|
513
|
+
unless /\A\s*\z/.match?(text)
|
|
514
|
+
if @have_root
|
|
515
|
+
raise ParseException.new("Malformed XML: Extra content at the end of the document (got '#{text}')", @source)
|
|
516
|
+
else
|
|
517
|
+
raise ParseException.new("Malformed XML: Content at the start of the document (got '#{text}')", @source)
|
|
518
|
+
end
|
|
519
|
+
end
|
|
520
|
+
return pull_event if @have_root
|
|
521
|
+
end
|
|
522
|
+
return [ :text, text ]
|
|
523
|
+
end
|
|
524
|
+
rescue REXML::UndefinedNamespaceException
|
|
525
|
+
raise
|
|
526
|
+
rescue REXML::ParseException
|
|
527
|
+
raise
|
|
528
|
+
rescue => error
|
|
529
|
+
raise REXML::ParseException.new( "Exception parsing",
|
|
530
|
+
@source, self, (error ? error : $!) )
|
|
531
|
+
end
|
|
532
|
+
# NOTE: The end of the method never runs, because it is unreachable.
|
|
533
|
+
# All branches of code above have explicit unconditional return or raise statements.
|
|
534
|
+
end
|
|
535
|
+
private :pull_event
|
|
536
|
+
|
|
537
|
+
def entity( reference, entities )
|
|
538
|
+
return unless entities
|
|
539
|
+
|
|
540
|
+
value = entities[ reference ]
|
|
541
|
+
return if value.nil?
|
|
542
|
+
|
|
543
|
+
record_entity_expansion
|
|
544
|
+
unnormalize( value, entities )
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
# Escapes all possible entities
|
|
548
|
+
def normalize( input, entities=nil, entity_filter=nil )
|
|
549
|
+
copy = input.clone
|
|
550
|
+
# Doing it like this rather than in a loop improves the speed
|
|
551
|
+
copy.gsub!( EREFERENCE, '&' )
|
|
552
|
+
entities.each do |key, value|
|
|
553
|
+
copy.gsub!( value, "&#{key};" ) unless entity_filter and
|
|
554
|
+
entity_filter.include?(entity)
|
|
555
|
+
end if entities
|
|
556
|
+
copy.gsub!( EREFERENCE, '&' )
|
|
557
|
+
DEFAULT_ENTITIES.each do |key, value|
|
|
558
|
+
copy.gsub!( value[3], value[1] )
|
|
559
|
+
end
|
|
560
|
+
copy
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
# Unescapes all possible entities
|
|
564
|
+
def unnormalize( string, entities=nil, filter=nil )
|
|
565
|
+
if string.include?("\r")
|
|
566
|
+
rv = string.gsub( Private::CARRIAGE_RETURN_NEWLINE_PATTERN, "\n" )
|
|
567
|
+
else
|
|
568
|
+
rv = string.dup
|
|
569
|
+
end
|
|
570
|
+
matches = rv.scan( REFERENCE_RE )
|
|
571
|
+
return rv if matches.size == 0
|
|
572
|
+
rv.gsub!( Private::CHARACTER_REFERENCES ) {
|
|
573
|
+
m=$1
|
|
574
|
+
if m.start_with?("x")
|
|
575
|
+
code_point = Integer(m[1..-1], 16)
|
|
576
|
+
else
|
|
577
|
+
code_point = Integer(m, 10)
|
|
578
|
+
end
|
|
579
|
+
[code_point].pack('U*')
|
|
580
|
+
}
|
|
581
|
+
matches.collect!{|x|x[0]}.compact!
|
|
582
|
+
if filter
|
|
583
|
+
matches.reject! do |entity_reference|
|
|
584
|
+
filter.include?(entity_reference)
|
|
585
|
+
end
|
|
586
|
+
end
|
|
587
|
+
if matches.size > 0
|
|
588
|
+
matches.tally.each do |entity_reference, n|
|
|
589
|
+
entity_expansion_count_before = @entity_expansion_count
|
|
590
|
+
entity_value = entity( entity_reference, entities )
|
|
591
|
+
if entity_value
|
|
592
|
+
if n > 1
|
|
593
|
+
entity_expansion_count_delta =
|
|
594
|
+
@entity_expansion_count - entity_expansion_count_before
|
|
595
|
+
record_entity_expansion(entity_expansion_count_delta * (n - 1))
|
|
596
|
+
end
|
|
597
|
+
re = Private::DEFAULT_ENTITIES_PATTERNS[entity_reference] || /&#{entity_reference};/
|
|
598
|
+
rv.gsub!( re, entity_value )
|
|
599
|
+
if rv.bytesize > @entity_expansion_text_limit
|
|
600
|
+
raise "entity expansion has grown too large"
|
|
601
|
+
end
|
|
602
|
+
else
|
|
603
|
+
er = DEFAULT_ENTITIES[entity_reference]
|
|
604
|
+
rv.gsub!( er[0], er[2] ) if er
|
|
605
|
+
end
|
|
606
|
+
end
|
|
607
|
+
rv.gsub!( Private::DEFAULT_ENTITIES_PATTERNS['amp'], '&' )
|
|
608
|
+
end
|
|
609
|
+
rv
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
private
|
|
613
|
+
def add_namespace(prefix, uri)
|
|
614
|
+
@namespaces_restore_stack.last[prefix] = @namespaces[prefix]
|
|
615
|
+
if uri.nil?
|
|
616
|
+
@namespaces.delete(prefix)
|
|
617
|
+
else
|
|
618
|
+
@namespaces[prefix] = uri
|
|
619
|
+
end
|
|
620
|
+
end
|
|
621
|
+
|
|
622
|
+
def push_namespaces_restore
|
|
623
|
+
namespaces_restore = {}
|
|
624
|
+
@namespaces_restore_stack.push(namespaces_restore)
|
|
625
|
+
namespaces_restore
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
def pop_namespaces_restore
|
|
629
|
+
namespaces_restore = @namespaces_restore_stack.pop
|
|
630
|
+
namespaces_restore.each do |prefix, uri|
|
|
631
|
+
if uri.nil?
|
|
632
|
+
@namespaces.delete(prefix)
|
|
633
|
+
else
|
|
634
|
+
@namespaces[prefix] = uri
|
|
635
|
+
end
|
|
636
|
+
end
|
|
637
|
+
end
|
|
638
|
+
|
|
639
|
+
def record_entity_expansion(delta=1)
|
|
640
|
+
@entity_expansion_count += delta
|
|
641
|
+
if @entity_expansion_count > @entity_expansion_limit
|
|
642
|
+
raise "number of entity expansions exceeded, processing aborted."
|
|
643
|
+
end
|
|
644
|
+
end
|
|
645
|
+
|
|
646
|
+
def need_source_encoding_update?(xml_declaration_encoding)
|
|
647
|
+
return false if xml_declaration_encoding.nil?
|
|
648
|
+
return false if /\AUTF-16\z/i =~ xml_declaration_encoding
|
|
649
|
+
true
|
|
650
|
+
end
|
|
651
|
+
|
|
652
|
+
def normalize_xml_declaration_encoding(xml_declaration_encoding)
|
|
653
|
+
/\AUTF-16(?:BE|LE)\z/i.match?(xml_declaration_encoding) ? "UTF-16" : nil
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
def parse_name(base_error_message)
|
|
657
|
+
md = @source.match(Private::NAME_PATTERN, true)
|
|
658
|
+
unless md
|
|
659
|
+
if @source.match?(/\S/um)
|
|
660
|
+
message = "#{base_error_message}: invalid name"
|
|
661
|
+
else
|
|
662
|
+
message = "#{base_error_message}: name is missing"
|
|
663
|
+
end
|
|
664
|
+
raise REXML::ParseException.new(message, @source)
|
|
665
|
+
end
|
|
666
|
+
md[0]
|
|
667
|
+
end
|
|
668
|
+
|
|
669
|
+
def parse_id(base_error_message,
|
|
670
|
+
accept_external_id:,
|
|
671
|
+
accept_public_id:)
|
|
672
|
+
if accept_external_id and (md = @source.match(EXTERNAL_ID_PUBLIC, true))
|
|
673
|
+
pubid = system = nil
|
|
674
|
+
pubid_literal = md[1]
|
|
675
|
+
pubid = pubid_literal[1..-2] if pubid_literal # Remove quote
|
|
676
|
+
system_literal = md[2]
|
|
677
|
+
system = system_literal[1..-2] if system_literal # Remove quote
|
|
678
|
+
["PUBLIC", pubid, system]
|
|
679
|
+
elsif accept_public_id and (md = @source.match(PUBLIC_ID, true))
|
|
680
|
+
pubid = system = nil
|
|
681
|
+
pubid_literal = md[1]
|
|
682
|
+
pubid = pubid_literal[1..-2] if pubid_literal # Remove quote
|
|
683
|
+
["PUBLIC", pubid, nil]
|
|
684
|
+
elsif accept_external_id and (md = @source.match(EXTERNAL_ID_SYSTEM, true))
|
|
685
|
+
system = nil
|
|
686
|
+
system_literal = md[1]
|
|
687
|
+
system = system_literal[1..-2] if system_literal # Remove quote
|
|
688
|
+
["SYSTEM", nil, system]
|
|
689
|
+
else
|
|
690
|
+
details = parse_id_invalid_details(accept_external_id: accept_external_id,
|
|
691
|
+
accept_public_id: accept_public_id)
|
|
692
|
+
message = "#{base_error_message}: #{details}"
|
|
693
|
+
raise REXML::ParseException.new(message, @source)
|
|
694
|
+
end
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
def parse_id_invalid_details(accept_external_id:,
|
|
698
|
+
accept_public_id:)
|
|
699
|
+
public = /\A\s*PUBLIC/um
|
|
700
|
+
system = /\A\s*SYSTEM/um
|
|
701
|
+
if (accept_external_id or accept_public_id) and @source.match?(/#{public}/um)
|
|
702
|
+
if @source.match?(/#{public}(?:\s+[^'"]|\s*[\[>])/um)
|
|
703
|
+
return "public ID literal is missing"
|
|
704
|
+
end
|
|
705
|
+
unless @source.match?(/#{public}\s+#{PUBIDLITERAL}/um)
|
|
706
|
+
return "invalid public ID literal"
|
|
707
|
+
end
|
|
708
|
+
if accept_public_id
|
|
709
|
+
if @source.match?(/#{public}\s+#{PUBIDLITERAL}\s+[^'"]/um)
|
|
710
|
+
return "system ID literal is missing"
|
|
711
|
+
end
|
|
712
|
+
unless @source.match?(/#{public}\s+#{PUBIDLITERAL}\s+#{SYSTEMLITERAL}/um)
|
|
713
|
+
return "invalid system literal"
|
|
714
|
+
end
|
|
715
|
+
"garbage after system literal"
|
|
716
|
+
else
|
|
717
|
+
"garbage after public ID literal"
|
|
718
|
+
end
|
|
719
|
+
elsif accept_external_id and @source.match?(/#{system}/um)
|
|
720
|
+
if @source.match?(/#{system}(?:\s+[^'"]|\s*[\[>])/um)
|
|
721
|
+
return "system literal is missing"
|
|
722
|
+
end
|
|
723
|
+
unless @source.match?(/#{system}\s+#{SYSTEMLITERAL}/um)
|
|
724
|
+
return "invalid system literal"
|
|
725
|
+
end
|
|
726
|
+
"garbage after system literal"
|
|
727
|
+
else
|
|
728
|
+
unless @source.match?(/\A\s*(?:PUBLIC|SYSTEM)\s/um)
|
|
729
|
+
return "invalid ID type"
|
|
730
|
+
end
|
|
731
|
+
"ID type is missing"
|
|
732
|
+
end
|
|
733
|
+
end
|
|
734
|
+
|
|
735
|
+
def process_comment
|
|
736
|
+
text = @source.read_until("-->")
|
|
737
|
+
unless text.chomp!("-->")
|
|
738
|
+
raise REXML::ParseException.new("Unclosed comment: Missing end '-->'", @source)
|
|
739
|
+
end
|
|
740
|
+
|
|
741
|
+
if text.include? "--" or text.end_with?("-")
|
|
742
|
+
raise REXML::ParseException.new("Malformed comment", @source)
|
|
743
|
+
end
|
|
744
|
+
text
|
|
745
|
+
end
|
|
746
|
+
|
|
747
|
+
def process_instruction
|
|
748
|
+
name = parse_name("Malformed XML: Invalid processing instruction node")
|
|
749
|
+
if name == "xml"
|
|
750
|
+
xml_declaration
|
|
751
|
+
else # PITarget
|
|
752
|
+
if @source.skip_spaces # e.g. <?name content?>
|
|
753
|
+
start_position = @source.position
|
|
754
|
+
content = @source.read_until("?>")
|
|
755
|
+
unless content.chomp!("?>")
|
|
756
|
+
@source.position = start_position
|
|
757
|
+
raise ParseException.new("Malformed XML: Unclosed processing instruction: <#{name}>", @source)
|
|
758
|
+
end
|
|
759
|
+
else # e.g. <?name?>
|
|
760
|
+
content = nil
|
|
761
|
+
unless @source.match?("?>", true)
|
|
762
|
+
raise ParseException.new("Malformed XML: Unclosed processing instruction: <#{name}>", @source)
|
|
763
|
+
end
|
|
764
|
+
end
|
|
765
|
+
[:processing_instruction, name, content]
|
|
766
|
+
end
|
|
767
|
+
end
|
|
768
|
+
|
|
769
|
+
def xml_declaration
|
|
770
|
+
unless @version.nil?
|
|
771
|
+
raise ParseException.new("Malformed XML: XML declaration is duplicated", @source)
|
|
772
|
+
end
|
|
773
|
+
if @document_status
|
|
774
|
+
raise ParseException.new("Malformed XML: XML declaration is not at the start", @source)
|
|
775
|
+
end
|
|
776
|
+
unless @source.skip_spaces
|
|
777
|
+
raise ParseException.new("Malformed XML: XML declaration misses spaces before version", @source)
|
|
778
|
+
end
|
|
779
|
+
unless @source.match?("version", true)
|
|
780
|
+
raise ParseException.new("Malformed XML: XML declaration misses version", @source)
|
|
781
|
+
end
|
|
782
|
+
@version = parse_attribute_value_with_equal("xml")
|
|
783
|
+
unless @source.skip_spaces
|
|
784
|
+
unless @source.match?("?>", true)
|
|
785
|
+
raise ParseException.new("Malformed XML: Unclosed XML declaration", @source)
|
|
786
|
+
end
|
|
787
|
+
encoding = normalize_xml_declaration_encoding(@source.encoding)
|
|
788
|
+
return [ :xmldecl, @version, encoding, nil ] # e.g. <?xml version="1.0"?>
|
|
789
|
+
end
|
|
790
|
+
|
|
791
|
+
if @source.match?("encoding", true)
|
|
792
|
+
encoding = parse_attribute_value_with_equal("xml")
|
|
793
|
+
unless @source.skip_spaces
|
|
794
|
+
unless @source.match?("?>", true)
|
|
795
|
+
raise ParseException.new("Malformed XML: Unclosed XML declaration", @source)
|
|
796
|
+
end
|
|
797
|
+
if need_source_encoding_update?(encoding)
|
|
798
|
+
@source.encoding = encoding
|
|
799
|
+
end
|
|
800
|
+
encoding ||= normalize_xml_declaration_encoding(@source.encoding)
|
|
801
|
+
return [ :xmldecl, @version, encoding, nil ] # e.g. <?xml version="1.1" encoding="UTF-8"?>
|
|
802
|
+
end
|
|
803
|
+
end
|
|
804
|
+
|
|
805
|
+
if @source.match?("standalone", true)
|
|
806
|
+
standalone = parse_attribute_value_with_equal("xml")
|
|
807
|
+
case standalone
|
|
808
|
+
when "yes", "no"
|
|
809
|
+
else
|
|
810
|
+
raise ParseException.new("Malformed XML: XML declaration standalone is not yes or no : <#{standalone}>", @source)
|
|
811
|
+
end
|
|
812
|
+
end
|
|
813
|
+
@source.skip_spaces
|
|
814
|
+
unless @source.match?("?>", true)
|
|
815
|
+
raise ParseException.new("Malformed XML: Unclosed XML declaration", @source)
|
|
816
|
+
end
|
|
817
|
+
|
|
818
|
+
if need_source_encoding_update?(encoding)
|
|
819
|
+
@source.encoding = encoding
|
|
820
|
+
end
|
|
821
|
+
encoding ||= normalize_xml_declaration_encoding(@source.encoding)
|
|
822
|
+
|
|
823
|
+
# e.g. <?xml version="1.0" ?>
|
|
824
|
+
# <?xml version="1.1" encoding="UTF-8" ?>
|
|
825
|
+
# <?xml version="1.1" standalone="yes"?>
|
|
826
|
+
# <?xml version="1.1" encoding="UTF-8" standalone="yes" ?>
|
|
827
|
+
[ :xmldecl, @version, encoding, standalone ]
|
|
828
|
+
end
|
|
829
|
+
|
|
830
|
+
if StringScanner::Version < "3.1.1"
|
|
831
|
+
def scan_quote
|
|
832
|
+
@source.match(/(['"])/, true)&.[](1)
|
|
833
|
+
end
|
|
834
|
+
else
|
|
835
|
+
def scan_quote
|
|
836
|
+
case @source.peek_byte
|
|
837
|
+
when 34 # '"'.ord
|
|
838
|
+
@source.scan_byte
|
|
839
|
+
'"'
|
|
840
|
+
when 39 # "'".ord
|
|
841
|
+
@source.scan_byte
|
|
842
|
+
"'"
|
|
843
|
+
else
|
|
844
|
+
nil
|
|
845
|
+
end
|
|
846
|
+
end
|
|
847
|
+
end
|
|
848
|
+
|
|
849
|
+
def parse_attribute_value_with_equal(name)
|
|
850
|
+
unless @source.match?(Private::EQUAL_PATTERN, true)
|
|
851
|
+
message = "Missing attribute equal: <#{name}>"
|
|
852
|
+
raise REXML::ParseException.new(message, @source)
|
|
853
|
+
end
|
|
854
|
+
unless quote = scan_quote
|
|
855
|
+
message = "Missing attribute value start quote: <#{name}>"
|
|
856
|
+
raise REXML::ParseException.new(message, @source)
|
|
857
|
+
end
|
|
858
|
+
start_position = @source.position
|
|
859
|
+
value = @source.read_until(quote)
|
|
860
|
+
unless value.chomp!(quote)
|
|
861
|
+
@source.position = start_position
|
|
862
|
+
message = "Missing attribute value end quote: <#{name}>: <#{quote}>"
|
|
863
|
+
raise REXML::ParseException.new(message, @source)
|
|
864
|
+
end
|
|
865
|
+
value
|
|
866
|
+
end
|
|
867
|
+
|
|
868
|
+
def parse_attributes(prefixes)
|
|
869
|
+
attributes = {}
|
|
870
|
+
expanded_names = {}
|
|
871
|
+
closed = false
|
|
872
|
+
while true
|
|
873
|
+
if @source.match?(">", true)
|
|
874
|
+
return attributes, closed
|
|
875
|
+
elsif @source.match?("/>", true)
|
|
876
|
+
closed = true
|
|
877
|
+
return attributes, closed
|
|
878
|
+
elsif match = @source.match(QNAME, true)
|
|
879
|
+
name = match[1]
|
|
880
|
+
prefix = match[2]
|
|
881
|
+
local_part = match[3]
|
|
882
|
+
value = parse_attribute_value_with_equal(name)
|
|
883
|
+
@source.skip_spaces
|
|
884
|
+
if prefix == "xmlns"
|
|
885
|
+
if local_part == "xml"
|
|
886
|
+
if value != Private::XML_PREFIXED_NAMESPACE
|
|
887
|
+
msg = "The 'xml' prefix must not be bound to any other namespace "+
|
|
888
|
+
"(http://www.w3.org/TR/REC-xml-names/#ns-decl)"
|
|
889
|
+
raise REXML::ParseException.new( msg, @source, self )
|
|
890
|
+
end
|
|
891
|
+
elsif local_part == "xmlns"
|
|
892
|
+
msg = "The 'xmlns' prefix must not be declared "+
|
|
893
|
+
"(http://www.w3.org/TR/REC-xml-names/#ns-decl)"
|
|
894
|
+
raise REXML::ParseException.new( msg, @source, self)
|
|
895
|
+
end
|
|
896
|
+
add_namespace(local_part, value)
|
|
897
|
+
elsif prefix
|
|
898
|
+
prefixes << prefix unless prefix == "xml"
|
|
899
|
+
end
|
|
900
|
+
|
|
901
|
+
if attributes[name]
|
|
902
|
+
msg = "Duplicate attribute #{name.inspect}"
|
|
903
|
+
raise REXML::ParseException.new(msg, @source, self)
|
|
904
|
+
end
|
|
905
|
+
|
|
906
|
+
unless prefix == "xmlns"
|
|
907
|
+
uri = @namespaces[prefix]
|
|
908
|
+
expanded_name = [uri, local_part]
|
|
909
|
+
existing_prefix = expanded_names[expanded_name]
|
|
910
|
+
if existing_prefix
|
|
911
|
+
message = "Namespace conflict in adding attribute " +
|
|
912
|
+
"\"#{local_part}\": " +
|
|
913
|
+
"Prefix \"#{existing_prefix}\" = \"#{uri}\" and " +
|
|
914
|
+
"prefix \"#{prefix}\" = \"#{uri}\""
|
|
915
|
+
raise REXML::ParseException.new(message, @source, self)
|
|
916
|
+
end
|
|
917
|
+
expanded_names[expanded_name] = prefix
|
|
918
|
+
end
|
|
919
|
+
|
|
920
|
+
attributes[name] = value
|
|
921
|
+
else
|
|
922
|
+
message = "Invalid attribute name: <#{@source.buffer.split(%r{[/>\s]}).first}>"
|
|
923
|
+
raise REXML::ParseException.new(message, @source)
|
|
924
|
+
end
|
|
925
|
+
end
|
|
926
|
+
end
|
|
927
|
+
end
|
|
928
|
+
end
|
|
929
|
+
end
|
|
930
|
+
|
|
931
|
+
=begin
|
|
932
|
+
case event[0]
|
|
933
|
+
when :start_element
|
|
934
|
+
when :text
|
|
935
|
+
when :end_element
|
|
936
|
+
when :processing_instruction
|
|
937
|
+
when :cdata
|
|
938
|
+
when :comment
|
|
939
|
+
when :xmldecl
|
|
940
|
+
when :start_doctype
|
|
941
|
+
when :end_doctype
|
|
942
|
+
when :externalentity
|
|
943
|
+
when :elementdecl
|
|
944
|
+
when :entity
|
|
945
|
+
when :attlistdecl
|
|
946
|
+
when :notationdecl
|
|
947
|
+
when :end_doctype
|
|
948
|
+
end
|
|
949
|
+
=end
|