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
|
@@ -1,974 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: false
|
|
2
|
-
|
|
3
|
-
require "pp"
|
|
4
|
-
|
|
5
|
-
require_relative 'namespace'
|
|
6
|
-
require_relative 'xmltokens'
|
|
7
|
-
require_relative 'attribute'
|
|
8
|
-
require_relative 'parsers/xpathparser'
|
|
9
|
-
|
|
10
|
-
module REXML
|
|
11
|
-
module DClonable
|
|
12
|
-
refine Object do
|
|
13
|
-
# provides a unified +clone+ operation, for REXML::XPathParser
|
|
14
|
-
# to use across multiple Object types
|
|
15
|
-
def dclone
|
|
16
|
-
clone
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
refine Symbol do
|
|
20
|
-
# provides a unified +clone+ operation, for REXML::XPathParser
|
|
21
|
-
# to use across multiple Object types
|
|
22
|
-
def dclone ; self ; end
|
|
23
|
-
end
|
|
24
|
-
refine Integer do
|
|
25
|
-
# provides a unified +clone+ operation, for REXML::XPathParser
|
|
26
|
-
# to use across multiple Object types
|
|
27
|
-
def dclone ; self ; end
|
|
28
|
-
end
|
|
29
|
-
refine Float do
|
|
30
|
-
# provides a unified +clone+ operation, for REXML::XPathParser
|
|
31
|
-
# to use across multiple Object types
|
|
32
|
-
def dclone ; self ; end
|
|
33
|
-
end
|
|
34
|
-
refine Array do
|
|
35
|
-
# provides a unified +clone+ operation, for REXML::XPathParser
|
|
36
|
-
# to use across multiple Object+ types
|
|
37
|
-
def dclone
|
|
38
|
-
klone = self.clone
|
|
39
|
-
klone.clear
|
|
40
|
-
self.each{|v| klone << v.dclone}
|
|
41
|
-
klone
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
using REXML::DClonable
|
|
48
|
-
|
|
49
|
-
module REXML
|
|
50
|
-
# You don't want to use this class. Really. Use XPath, which is a wrapper
|
|
51
|
-
# for this class. Believe me. You don't want to poke around in here.
|
|
52
|
-
# There is strange, dark magic at work in this code. Beware. Go back! Go
|
|
53
|
-
# back while you still can!
|
|
54
|
-
class XPathParser
|
|
55
|
-
include XMLTokens
|
|
56
|
-
LITERAL = /^'([^']*)'|^"([^"]*)"/u
|
|
57
|
-
|
|
58
|
-
DEBUG = (ENV["REXML_XPATH_PARSER_DEBUG"] == "true")
|
|
59
|
-
|
|
60
|
-
def initialize(strict: false)
|
|
61
|
-
@debug = DEBUG
|
|
62
|
-
@parser = REXML::Parsers::XPathParser.new
|
|
63
|
-
@namespaces = nil
|
|
64
|
-
@variables = {}
|
|
65
|
-
@nest = 0
|
|
66
|
-
@strict = strict
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def namespaces=( namespaces={} )
|
|
70
|
-
Functions::namespace_context = namespaces
|
|
71
|
-
@namespaces = namespaces
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
def variables=( vars={} )
|
|
75
|
-
Functions::variables = vars
|
|
76
|
-
@variables = vars
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
def parse path, nodeset
|
|
80
|
-
path_stack = @parser.parse( path )
|
|
81
|
-
match( path_stack, nodeset )
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
def get_first path, nodeset
|
|
85
|
-
path_stack = @parser.parse( path )
|
|
86
|
-
first( path_stack, nodeset )
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
def predicate path, nodeset
|
|
90
|
-
path_stack = @parser.parse( path )
|
|
91
|
-
match( path_stack, nodeset )
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
def []=( variable_name, value )
|
|
95
|
-
@variables[ variable_name ] = value
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
# Performs a depth-first (document order) XPath search, and returns the
|
|
100
|
-
# first match. This is the fastest, lightest way to return a single result.
|
|
101
|
-
#
|
|
102
|
-
# FIXME: This method is incomplete!
|
|
103
|
-
def first( path_stack, node )
|
|
104
|
-
return nil if path.size == 0
|
|
105
|
-
|
|
106
|
-
case path[0]
|
|
107
|
-
when :document
|
|
108
|
-
# do nothing
|
|
109
|
-
return first( path[1..-1], node )
|
|
110
|
-
when :child
|
|
111
|
-
for c in node.children
|
|
112
|
-
r = first( path[1..-1], c )
|
|
113
|
-
return r if r
|
|
114
|
-
end
|
|
115
|
-
when :qname
|
|
116
|
-
name = path[2]
|
|
117
|
-
if node.name == name
|
|
118
|
-
return node if path.size == 3
|
|
119
|
-
return first( path[3..-1], node )
|
|
120
|
-
else
|
|
121
|
-
return nil
|
|
122
|
-
end
|
|
123
|
-
when :descendant_or_self
|
|
124
|
-
r = first( path[1..-1], node )
|
|
125
|
-
return r if r
|
|
126
|
-
for c in node.children
|
|
127
|
-
r = first( path, c )
|
|
128
|
-
return r if r
|
|
129
|
-
end
|
|
130
|
-
when :node
|
|
131
|
-
return first( path[1..-1], node )
|
|
132
|
-
when :any
|
|
133
|
-
return first( path[1..-1], node )
|
|
134
|
-
end
|
|
135
|
-
return nil
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
def match(path_stack, nodeset)
|
|
140
|
-
nodeset = nodeset.collect.with_index do |node, i|
|
|
141
|
-
position = i + 1
|
|
142
|
-
XPathNode.new(node, position: position)
|
|
143
|
-
end
|
|
144
|
-
result = expr(path_stack, nodeset)
|
|
145
|
-
case result
|
|
146
|
-
when Array # nodeset
|
|
147
|
-
unnode(result)
|
|
148
|
-
else
|
|
149
|
-
[result]
|
|
150
|
-
end
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
private
|
|
154
|
-
def strict?
|
|
155
|
-
@strict
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
# Returns a String namespace for a node, given a prefix
|
|
159
|
-
# The rules are:
|
|
160
|
-
#
|
|
161
|
-
# 1. Use the supplied namespace mapping first.
|
|
162
|
-
# 2. If no mapping was supplied, use the context node to look up the namespace
|
|
163
|
-
def get_namespace( node, prefix )
|
|
164
|
-
if @namespaces
|
|
165
|
-
return @namespaces[prefix] || ''
|
|
166
|
-
else
|
|
167
|
-
return node.namespace( prefix ) if node.node_type == :element
|
|
168
|
-
return ''
|
|
169
|
-
end
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
# Expr takes a stack of path elements and a set of nodes (either a Parent
|
|
174
|
-
# or an Array and returns an Array of matching nodes
|
|
175
|
-
def expr( path_stack, nodeset, context=nil )
|
|
176
|
-
enter(:expr, path_stack, nodeset) if @debug
|
|
177
|
-
return nodeset if path_stack.length == 0 || nodeset.length == 0
|
|
178
|
-
while path_stack.length > 0
|
|
179
|
-
trace(:while, path_stack, nodeset) if @debug
|
|
180
|
-
if nodeset.length == 0
|
|
181
|
-
path_stack.clear
|
|
182
|
-
return []
|
|
183
|
-
end
|
|
184
|
-
op = path_stack.shift
|
|
185
|
-
case op
|
|
186
|
-
when :document
|
|
187
|
-
first_raw_node = nodeset.first.raw_node
|
|
188
|
-
nodeset = [XPathNode.new(first_raw_node.root_node, position: 1)]
|
|
189
|
-
when :self
|
|
190
|
-
nodeset = step(path_stack) do
|
|
191
|
-
[nodeset]
|
|
192
|
-
end
|
|
193
|
-
when :child
|
|
194
|
-
nodeset = step(path_stack) do
|
|
195
|
-
child(nodeset)
|
|
196
|
-
end
|
|
197
|
-
when :literal
|
|
198
|
-
trace(:literal, path_stack, nodeset) if @debug
|
|
199
|
-
return path_stack.shift
|
|
200
|
-
when :attribute
|
|
201
|
-
nodeset = step(path_stack, any_type: :attribute) do
|
|
202
|
-
nodesets = []
|
|
203
|
-
nodeset.each do |node|
|
|
204
|
-
raw_node = node.raw_node
|
|
205
|
-
next unless raw_node.node_type == :element
|
|
206
|
-
attributes = raw_node.attributes
|
|
207
|
-
next if attributes.empty?
|
|
208
|
-
nodesets << attributes.each_attribute.collect.with_index do |attribute, i|
|
|
209
|
-
XPathNode.new(attribute, position: i + 1)
|
|
210
|
-
end
|
|
211
|
-
end
|
|
212
|
-
nodesets
|
|
213
|
-
end
|
|
214
|
-
when :namespace
|
|
215
|
-
pre_defined_namespaces = {
|
|
216
|
-
"xml" => "http://www.w3.org/XML/1998/namespace",
|
|
217
|
-
}
|
|
218
|
-
nodeset = step(path_stack, any_type: :namespace) do
|
|
219
|
-
nodesets = []
|
|
220
|
-
nodeset.each do |node|
|
|
221
|
-
raw_node = node.raw_node
|
|
222
|
-
case raw_node.node_type
|
|
223
|
-
when :element
|
|
224
|
-
if @namespaces
|
|
225
|
-
nodesets << pre_defined_namespaces.merge(@namespaces)
|
|
226
|
-
else
|
|
227
|
-
nodesets << pre_defined_namespaces.merge(raw_node.namespaces)
|
|
228
|
-
end
|
|
229
|
-
when :attribute
|
|
230
|
-
if @namespaces
|
|
231
|
-
nodesets << pre_defined_namespaces.merge(@namespaces)
|
|
232
|
-
else
|
|
233
|
-
nodesets << pre_defined_namespaces.merge(raw_node.element.namespaces)
|
|
234
|
-
end
|
|
235
|
-
end
|
|
236
|
-
end
|
|
237
|
-
nodesets
|
|
238
|
-
end
|
|
239
|
-
when :parent
|
|
240
|
-
nodeset = step(path_stack) do
|
|
241
|
-
nodesets = []
|
|
242
|
-
nodeset.each do |node|
|
|
243
|
-
raw_node = node.raw_node
|
|
244
|
-
if raw_node.node_type == :attribute
|
|
245
|
-
parent = raw_node.element
|
|
246
|
-
else
|
|
247
|
-
parent = raw_node.parent
|
|
248
|
-
end
|
|
249
|
-
nodesets << [XPathNode.new(parent, position: 1)] if parent
|
|
250
|
-
end
|
|
251
|
-
nodesets
|
|
252
|
-
end
|
|
253
|
-
when :ancestor
|
|
254
|
-
nodeset = step(path_stack) do
|
|
255
|
-
nodesets = []
|
|
256
|
-
# new_nodes = {}
|
|
257
|
-
nodeset.each do |node|
|
|
258
|
-
raw_node = node.raw_node
|
|
259
|
-
new_nodeset = []
|
|
260
|
-
while raw_node.parent
|
|
261
|
-
raw_node = raw_node.parent
|
|
262
|
-
# next if new_nodes.key?(node)
|
|
263
|
-
new_nodeset << XPathNode.new(raw_node,
|
|
264
|
-
position: new_nodeset.size + 1)
|
|
265
|
-
# new_nodes[node] = true
|
|
266
|
-
end
|
|
267
|
-
nodesets << new_nodeset unless new_nodeset.empty?
|
|
268
|
-
end
|
|
269
|
-
nodesets
|
|
270
|
-
end
|
|
271
|
-
when :ancestor_or_self
|
|
272
|
-
nodeset = step(path_stack) do
|
|
273
|
-
nodesets = []
|
|
274
|
-
# new_nodes = {}
|
|
275
|
-
nodeset.each do |node|
|
|
276
|
-
raw_node = node.raw_node
|
|
277
|
-
next unless raw_node.node_type == :element
|
|
278
|
-
new_nodeset = [XPathNode.new(raw_node, position: 1)]
|
|
279
|
-
# new_nodes[node] = true
|
|
280
|
-
while raw_node.parent
|
|
281
|
-
raw_node = raw_node.parent
|
|
282
|
-
# next if new_nodes.key?(node)
|
|
283
|
-
new_nodeset << XPathNode.new(raw_node,
|
|
284
|
-
position: new_nodeset.size + 1)
|
|
285
|
-
# new_nodes[node] = true
|
|
286
|
-
end
|
|
287
|
-
nodesets << new_nodeset unless new_nodeset.empty?
|
|
288
|
-
end
|
|
289
|
-
nodesets
|
|
290
|
-
end
|
|
291
|
-
when :descendant_or_self
|
|
292
|
-
nodeset = step(path_stack) do
|
|
293
|
-
descendant(nodeset, true)
|
|
294
|
-
end
|
|
295
|
-
when :descendant
|
|
296
|
-
nodeset = step(path_stack) do
|
|
297
|
-
descendant(nodeset, false)
|
|
298
|
-
end
|
|
299
|
-
when :following_sibling
|
|
300
|
-
nodeset = step(path_stack) do
|
|
301
|
-
nodesets = []
|
|
302
|
-
nodeset.each do |node|
|
|
303
|
-
raw_node = node.raw_node
|
|
304
|
-
next unless raw_node.respond_to?(:parent)
|
|
305
|
-
next if raw_node.parent.nil?
|
|
306
|
-
all_siblings = raw_node.parent.children
|
|
307
|
-
current_index = all_siblings.index(raw_node)
|
|
308
|
-
following_siblings = all_siblings[(current_index + 1)..-1]
|
|
309
|
-
next if following_siblings.empty?
|
|
310
|
-
nodesets << following_siblings.collect.with_index do |sibling, i|
|
|
311
|
-
XPathNode.new(sibling, position: i + 1)
|
|
312
|
-
end
|
|
313
|
-
end
|
|
314
|
-
nodesets
|
|
315
|
-
end
|
|
316
|
-
when :preceding_sibling
|
|
317
|
-
nodeset = step(path_stack, order: :reverse) do
|
|
318
|
-
nodesets = []
|
|
319
|
-
nodeset.each do |node|
|
|
320
|
-
raw_node = node.raw_node
|
|
321
|
-
next unless raw_node.respond_to?(:parent)
|
|
322
|
-
next if raw_node.parent.nil?
|
|
323
|
-
all_siblings = raw_node.parent.children
|
|
324
|
-
current_index = all_siblings.index(raw_node)
|
|
325
|
-
preceding_siblings = all_siblings[0, current_index].reverse
|
|
326
|
-
next if preceding_siblings.empty?
|
|
327
|
-
nodesets << preceding_siblings.collect.with_index do |sibling, i|
|
|
328
|
-
XPathNode.new(sibling, position: i + 1)
|
|
329
|
-
end
|
|
330
|
-
end
|
|
331
|
-
nodesets
|
|
332
|
-
end
|
|
333
|
-
when :preceding
|
|
334
|
-
nodeset = step(path_stack, order: :reverse) do
|
|
335
|
-
unnode(nodeset) do |node|
|
|
336
|
-
preceding(node)
|
|
337
|
-
end
|
|
338
|
-
end
|
|
339
|
-
when :following
|
|
340
|
-
nodeset = step(path_stack) do
|
|
341
|
-
unnode(nodeset) do |node|
|
|
342
|
-
following(node)
|
|
343
|
-
end
|
|
344
|
-
end
|
|
345
|
-
when :variable
|
|
346
|
-
var_name = path_stack.shift
|
|
347
|
-
return [@variables[var_name]]
|
|
348
|
-
|
|
349
|
-
when :eq, :neq, :lt, :lteq, :gt, :gteq
|
|
350
|
-
left = expr( path_stack.shift, nodeset.dup, context )
|
|
351
|
-
right = expr( path_stack.shift, nodeset.dup, context )
|
|
352
|
-
res = equality_relational_compare( left, op, right )
|
|
353
|
-
trace(op, left, right, res) if @debug
|
|
354
|
-
return res
|
|
355
|
-
|
|
356
|
-
when :or
|
|
357
|
-
left = expr(path_stack.shift, nodeset.dup, context)
|
|
358
|
-
return true if Functions.boolean(left)
|
|
359
|
-
right = expr(path_stack.shift, nodeset.dup, context)
|
|
360
|
-
return Functions.boolean(right)
|
|
361
|
-
|
|
362
|
-
when :and
|
|
363
|
-
left = expr(path_stack.shift, nodeset.dup, context)
|
|
364
|
-
return false unless Functions.boolean(left)
|
|
365
|
-
right = expr(path_stack.shift, nodeset.dup, context)
|
|
366
|
-
return Functions.boolean(right)
|
|
367
|
-
|
|
368
|
-
when :div, :mod, :mult, :plus, :minus
|
|
369
|
-
left = expr(path_stack.shift, nodeset, context)
|
|
370
|
-
right = expr(path_stack.shift, nodeset, context)
|
|
371
|
-
left = unnode(left) if left.is_a?(Array)
|
|
372
|
-
right = unnode(right) if right.is_a?(Array)
|
|
373
|
-
left = Functions::number(left)
|
|
374
|
-
right = Functions::number(right)
|
|
375
|
-
case op
|
|
376
|
-
when :div
|
|
377
|
-
return left / right
|
|
378
|
-
when :mod
|
|
379
|
-
return left % right
|
|
380
|
-
when :mult
|
|
381
|
-
return left * right
|
|
382
|
-
when :plus
|
|
383
|
-
return left + right
|
|
384
|
-
when :minus
|
|
385
|
-
return left - right
|
|
386
|
-
else
|
|
387
|
-
raise "[BUG] Unexpected operator: <#{op.inspect}>"
|
|
388
|
-
end
|
|
389
|
-
when :union
|
|
390
|
-
left = expr( path_stack.shift, nodeset, context )
|
|
391
|
-
right = expr( path_stack.shift, nodeset, context )
|
|
392
|
-
left = unnode(left) if left.is_a?(Array)
|
|
393
|
-
right = unnode(right) if right.is_a?(Array)
|
|
394
|
-
return (left | right)
|
|
395
|
-
when :neg
|
|
396
|
-
res = expr( path_stack, nodeset, context )
|
|
397
|
-
res = unnode(res) if res.is_a?(Array)
|
|
398
|
-
return -Functions.number(res)
|
|
399
|
-
when :not
|
|
400
|
-
when :function
|
|
401
|
-
func_name = path_stack.shift.tr('-','_')
|
|
402
|
-
arguments = path_stack.shift
|
|
403
|
-
|
|
404
|
-
if nodeset.size != 1
|
|
405
|
-
message = "[BUG] Node set size must be 1 for function call: "
|
|
406
|
-
message += "<#{func_name}>: <#{nodeset.inspect}>: "
|
|
407
|
-
message += "<#{arguments.inspect}>"
|
|
408
|
-
raise message
|
|
409
|
-
end
|
|
410
|
-
|
|
411
|
-
node = nodeset.first
|
|
412
|
-
if context
|
|
413
|
-
target_context = context
|
|
414
|
-
else
|
|
415
|
-
target_context = {:size => nodeset.size}
|
|
416
|
-
if node.is_a?(XPathNode)
|
|
417
|
-
target_context[:node] = node.raw_node
|
|
418
|
-
target_context[:index] = node.position
|
|
419
|
-
else
|
|
420
|
-
target_context[:node] = node
|
|
421
|
-
target_context[:index] = 1
|
|
422
|
-
end
|
|
423
|
-
end
|
|
424
|
-
args = arguments.dclone.collect do |arg|
|
|
425
|
-
result = expr(arg, nodeset, target_context)
|
|
426
|
-
result = unnode(result) if result.is_a?(Array)
|
|
427
|
-
result
|
|
428
|
-
end
|
|
429
|
-
Functions.context = target_context
|
|
430
|
-
return Functions.send(func_name, *args)
|
|
431
|
-
|
|
432
|
-
else
|
|
433
|
-
raise "[BUG] Unexpected path: <#{op.inspect}>: <#{path_stack.inspect}>"
|
|
434
|
-
end
|
|
435
|
-
end # while
|
|
436
|
-
return nodeset
|
|
437
|
-
ensure
|
|
438
|
-
leave(:expr, path_stack, nodeset) if @debug
|
|
439
|
-
end
|
|
440
|
-
|
|
441
|
-
def step(path_stack, any_type: :element, order: :forward)
|
|
442
|
-
nodesets = yield
|
|
443
|
-
begin
|
|
444
|
-
enter(:step, path_stack, nodesets) if @debug
|
|
445
|
-
nodesets = node_test(path_stack, nodesets, any_type: any_type)
|
|
446
|
-
while path_stack[0] == :predicate
|
|
447
|
-
path_stack.shift # :predicate
|
|
448
|
-
predicate_expression = path_stack.shift.dclone
|
|
449
|
-
nodesets = evaluate_predicate(predicate_expression, nodesets)
|
|
450
|
-
end
|
|
451
|
-
if nodesets.size == 1
|
|
452
|
-
ordered_nodeset = nodesets[0]
|
|
453
|
-
else
|
|
454
|
-
raw_nodes = []
|
|
455
|
-
nodesets.each do |nodeset|
|
|
456
|
-
nodeset.each do |node|
|
|
457
|
-
if node.respond_to?(:raw_node)
|
|
458
|
-
raw_nodes << node.raw_node
|
|
459
|
-
else
|
|
460
|
-
raw_nodes << node
|
|
461
|
-
end
|
|
462
|
-
end
|
|
463
|
-
end
|
|
464
|
-
ordered_nodeset = sort(raw_nodes, order)
|
|
465
|
-
end
|
|
466
|
-
new_nodeset = []
|
|
467
|
-
ordered_nodeset.each do |node|
|
|
468
|
-
# TODO: Remove duplicated
|
|
469
|
-
new_nodeset << XPathNode.new(node, position: new_nodeset.size + 1)
|
|
470
|
-
end
|
|
471
|
-
new_nodeset
|
|
472
|
-
ensure
|
|
473
|
-
leave(:step, path_stack, new_nodeset) if @debug
|
|
474
|
-
end
|
|
475
|
-
end
|
|
476
|
-
|
|
477
|
-
def node_test(path_stack, nodesets, any_type: :element)
|
|
478
|
-
enter(:node_test, path_stack, nodesets) if @debug
|
|
479
|
-
operator = path_stack.shift
|
|
480
|
-
case operator
|
|
481
|
-
when :qname
|
|
482
|
-
prefix = path_stack.shift
|
|
483
|
-
name = path_stack.shift
|
|
484
|
-
new_nodesets = nodesets.collect do |nodeset|
|
|
485
|
-
filter_nodeset(nodeset) do |node|
|
|
486
|
-
raw_node = node.raw_node
|
|
487
|
-
case raw_node.node_type
|
|
488
|
-
when :element
|
|
489
|
-
if prefix.nil?
|
|
490
|
-
raw_node.name == name
|
|
491
|
-
elsif prefix.empty?
|
|
492
|
-
if strict?
|
|
493
|
-
raw_node.name == name and raw_node.namespace == ""
|
|
494
|
-
else
|
|
495
|
-
# FIXME: This DOUBLES the time XPath searches take
|
|
496
|
-
ns = get_namespace(raw_node, prefix)
|
|
497
|
-
raw_node.name == name and raw_node.namespace == ns
|
|
498
|
-
end
|
|
499
|
-
else
|
|
500
|
-
# FIXME: This DOUBLES the time XPath searches take
|
|
501
|
-
ns = get_namespace(raw_node, prefix)
|
|
502
|
-
raw_node.name == name and raw_node.namespace == ns
|
|
503
|
-
end
|
|
504
|
-
when :attribute
|
|
505
|
-
if prefix.nil?
|
|
506
|
-
raw_node.name == name
|
|
507
|
-
elsif prefix.empty?
|
|
508
|
-
raw_node.name == name and raw_node.namespace == ""
|
|
509
|
-
else
|
|
510
|
-
# FIXME: This DOUBLES the time XPath searches take
|
|
511
|
-
ns = get_namespace(raw_node.element, prefix)
|
|
512
|
-
raw_node.name == name and raw_node.namespace == ns
|
|
513
|
-
end
|
|
514
|
-
else
|
|
515
|
-
false
|
|
516
|
-
end
|
|
517
|
-
end
|
|
518
|
-
end
|
|
519
|
-
when :namespace
|
|
520
|
-
prefix = path_stack.shift
|
|
521
|
-
new_nodesets = nodesets.collect do |nodeset|
|
|
522
|
-
filter_nodeset(nodeset) do |node|
|
|
523
|
-
raw_node = node.raw_node
|
|
524
|
-
case raw_node.node_type
|
|
525
|
-
when :element
|
|
526
|
-
namespaces = @namespaces || raw_node.namespaces
|
|
527
|
-
raw_node.namespace == namespaces[prefix]
|
|
528
|
-
when :attribute
|
|
529
|
-
namespaces = @namespaces || raw_node.element.namespaces
|
|
530
|
-
raw_node.namespace == namespaces[prefix]
|
|
531
|
-
else
|
|
532
|
-
false
|
|
533
|
-
end
|
|
534
|
-
end
|
|
535
|
-
end
|
|
536
|
-
when :any
|
|
537
|
-
new_nodesets = nodesets.collect do |nodeset|
|
|
538
|
-
filter_nodeset(nodeset) do |node|
|
|
539
|
-
raw_node = node.raw_node
|
|
540
|
-
raw_node.node_type == any_type
|
|
541
|
-
end
|
|
542
|
-
end
|
|
543
|
-
when :comment
|
|
544
|
-
new_nodesets = nodesets.collect do |nodeset|
|
|
545
|
-
filter_nodeset(nodeset) do |node|
|
|
546
|
-
raw_node = node.raw_node
|
|
547
|
-
raw_node.node_type == :comment
|
|
548
|
-
end
|
|
549
|
-
end
|
|
550
|
-
when :text
|
|
551
|
-
new_nodesets = nodesets.collect do |nodeset|
|
|
552
|
-
filter_nodeset(nodeset) do |node|
|
|
553
|
-
raw_node = node.raw_node
|
|
554
|
-
raw_node.node_type == :text
|
|
555
|
-
end
|
|
556
|
-
end
|
|
557
|
-
when :processing_instruction
|
|
558
|
-
target = path_stack.shift
|
|
559
|
-
new_nodesets = nodesets.collect do |nodeset|
|
|
560
|
-
filter_nodeset(nodeset) do |node|
|
|
561
|
-
raw_node = node.raw_node
|
|
562
|
-
(raw_node.node_type == :processing_instruction) and
|
|
563
|
-
(target.empty? or (raw_node.target == target))
|
|
564
|
-
end
|
|
565
|
-
end
|
|
566
|
-
when :node
|
|
567
|
-
new_nodesets = nodesets.collect do |nodeset|
|
|
568
|
-
filter_nodeset(nodeset) do |node|
|
|
569
|
-
true
|
|
570
|
-
end
|
|
571
|
-
end
|
|
572
|
-
else
|
|
573
|
-
message = "[BUG] Unexpected node test: " +
|
|
574
|
-
"<#{operator.inspect}>: <#{path_stack.inspect}>"
|
|
575
|
-
raise message
|
|
576
|
-
end
|
|
577
|
-
new_nodesets
|
|
578
|
-
ensure
|
|
579
|
-
leave(:node_test, path_stack, new_nodesets) if @debug
|
|
580
|
-
end
|
|
581
|
-
|
|
582
|
-
def filter_nodeset(nodeset)
|
|
583
|
-
new_nodeset = []
|
|
584
|
-
nodeset.each do |node|
|
|
585
|
-
next unless yield(node)
|
|
586
|
-
new_nodeset << XPathNode.new(node, position: new_nodeset.size + 1)
|
|
587
|
-
end
|
|
588
|
-
new_nodeset
|
|
589
|
-
end
|
|
590
|
-
|
|
591
|
-
def evaluate_predicate(expression, nodesets)
|
|
592
|
-
enter(:predicate, expression, nodesets) if @debug
|
|
593
|
-
new_nodesets = nodesets.collect do |nodeset|
|
|
594
|
-
new_nodeset = []
|
|
595
|
-
subcontext = { :size => nodeset.size }
|
|
596
|
-
nodeset.each_with_index do |node, index|
|
|
597
|
-
if node.is_a?(XPathNode)
|
|
598
|
-
subcontext[:node] = node.raw_node
|
|
599
|
-
subcontext[:index] = node.position
|
|
600
|
-
else
|
|
601
|
-
subcontext[:node] = node
|
|
602
|
-
subcontext[:index] = index + 1
|
|
603
|
-
end
|
|
604
|
-
result = expr(expression.dclone, [node], subcontext)
|
|
605
|
-
trace(:predicate_evaluate, expression, node, subcontext, result) if @debug
|
|
606
|
-
result = result[0] if result.kind_of? Array and result.length == 1
|
|
607
|
-
if result.kind_of? Numeric
|
|
608
|
-
if result == node.position
|
|
609
|
-
new_nodeset << XPathNode.new(node, position: new_nodeset.size + 1)
|
|
610
|
-
end
|
|
611
|
-
elsif result.instance_of? Array
|
|
612
|
-
if result.size > 0 and result.inject(false) {|k,s| s or k}
|
|
613
|
-
if result.size > 0
|
|
614
|
-
new_nodeset << XPathNode.new(node, position: new_nodeset.size + 1)
|
|
615
|
-
end
|
|
616
|
-
end
|
|
617
|
-
else
|
|
618
|
-
if result
|
|
619
|
-
new_nodeset << XPathNode.new(node, position: new_nodeset.size + 1)
|
|
620
|
-
end
|
|
621
|
-
end
|
|
622
|
-
end
|
|
623
|
-
new_nodeset
|
|
624
|
-
end
|
|
625
|
-
new_nodesets
|
|
626
|
-
ensure
|
|
627
|
-
leave(:predicate, new_nodesets) if @debug
|
|
628
|
-
end
|
|
629
|
-
|
|
630
|
-
def trace(*args)
|
|
631
|
-
indent = " " * @nest
|
|
632
|
-
PP.pp(args, "").each_line do |line|
|
|
633
|
-
puts("#{indent}#{line}")
|
|
634
|
-
end
|
|
635
|
-
end
|
|
636
|
-
|
|
637
|
-
def enter(tag, *args)
|
|
638
|
-
trace(:enter, tag, *args)
|
|
639
|
-
@nest += 1
|
|
640
|
-
end
|
|
641
|
-
|
|
642
|
-
def leave(tag, *args)
|
|
643
|
-
@nest -= 1
|
|
644
|
-
trace(:leave, tag, *args)
|
|
645
|
-
end
|
|
646
|
-
|
|
647
|
-
# Reorders an array of nodes so that they are in document order
|
|
648
|
-
# It tries to do this efficiently.
|
|
649
|
-
#
|
|
650
|
-
# FIXME: I need to get rid of this, but the issue is that most of the XPath
|
|
651
|
-
# interpreter functions as a filter, which means that we lose context going
|
|
652
|
-
# in and out of function calls. If I knew what the index of the nodes was,
|
|
653
|
-
# I wouldn't have to do this. Maybe add a document IDX for each node?
|
|
654
|
-
# Problems with mutable documents. Or, rewrite everything.
|
|
655
|
-
def sort(array_of_nodes, order)
|
|
656
|
-
new_arry = []
|
|
657
|
-
array_of_nodes.each { |node|
|
|
658
|
-
node_idx = []
|
|
659
|
-
np = node.node_type == :attribute ? node.element : node
|
|
660
|
-
while np.parent and np.parent.node_type == :element
|
|
661
|
-
node_idx << np.parent.index( np )
|
|
662
|
-
np = np.parent
|
|
663
|
-
end
|
|
664
|
-
new_arry << [ node_idx.reverse, node ]
|
|
665
|
-
}
|
|
666
|
-
ordered = new_arry.sort_by do |index, node|
|
|
667
|
-
if order == :forward
|
|
668
|
-
index
|
|
669
|
-
else
|
|
670
|
-
-index
|
|
671
|
-
end
|
|
672
|
-
end
|
|
673
|
-
ordered.collect do |_index, node|
|
|
674
|
-
node
|
|
675
|
-
end
|
|
676
|
-
end
|
|
677
|
-
|
|
678
|
-
def descendant(nodeset, include_self)
|
|
679
|
-
nodesets = []
|
|
680
|
-
nodeset.each do |node|
|
|
681
|
-
new_nodeset = []
|
|
682
|
-
new_nodes = {}
|
|
683
|
-
descendant_recursive(node.raw_node, new_nodeset, new_nodes, include_self)
|
|
684
|
-
nodesets << new_nodeset unless new_nodeset.empty?
|
|
685
|
-
end
|
|
686
|
-
nodesets
|
|
687
|
-
end
|
|
688
|
-
|
|
689
|
-
def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self)
|
|
690
|
-
if include_self
|
|
691
|
-
return if new_nodes.key?(raw_node)
|
|
692
|
-
new_nodeset << XPathNode.new(raw_node, position: new_nodeset.size + 1)
|
|
693
|
-
new_nodes[raw_node] = true
|
|
694
|
-
end
|
|
695
|
-
|
|
696
|
-
node_type = raw_node.node_type
|
|
697
|
-
if node_type == :element or node_type == :document
|
|
698
|
-
raw_node.children.each do |child|
|
|
699
|
-
descendant_recursive(child, new_nodeset, new_nodes, true)
|
|
700
|
-
end
|
|
701
|
-
end
|
|
702
|
-
end
|
|
703
|
-
|
|
704
|
-
# Builds a nodeset of all of the preceding nodes of the supplied node,
|
|
705
|
-
# in reverse document order
|
|
706
|
-
# preceding:: includes every element in the document that precedes this node,
|
|
707
|
-
# except for ancestors
|
|
708
|
-
def preceding(node)
|
|
709
|
-
ancestors = []
|
|
710
|
-
parent = node.parent
|
|
711
|
-
while parent
|
|
712
|
-
ancestors << parent
|
|
713
|
-
parent = parent.parent
|
|
714
|
-
end
|
|
715
|
-
|
|
716
|
-
precedings = []
|
|
717
|
-
preceding_node = preceding_node_of(node)
|
|
718
|
-
while preceding_node
|
|
719
|
-
if ancestors.include?(preceding_node)
|
|
720
|
-
ancestors.delete(preceding_node)
|
|
721
|
-
else
|
|
722
|
-
precedings << XPathNode.new(preceding_node,
|
|
723
|
-
position: precedings.size + 1)
|
|
724
|
-
end
|
|
725
|
-
preceding_node = preceding_node_of(preceding_node)
|
|
726
|
-
end
|
|
727
|
-
precedings
|
|
728
|
-
end
|
|
729
|
-
|
|
730
|
-
def preceding_node_of( node )
|
|
731
|
-
psn = node.previous_sibling_node
|
|
732
|
-
if psn.nil?
|
|
733
|
-
if node.parent.nil? or node.parent.class == Document
|
|
734
|
-
return nil
|
|
735
|
-
end
|
|
736
|
-
return node.parent
|
|
737
|
-
#psn = preceding_node_of( node.parent )
|
|
738
|
-
end
|
|
739
|
-
while psn and psn.kind_of? Element and psn.children.size > 0
|
|
740
|
-
psn = psn.children[-1]
|
|
741
|
-
end
|
|
742
|
-
psn
|
|
743
|
-
end
|
|
744
|
-
|
|
745
|
-
def following(node)
|
|
746
|
-
followings = []
|
|
747
|
-
following_node = next_sibling_node(node)
|
|
748
|
-
while following_node
|
|
749
|
-
followings << XPathNode.new(following_node,
|
|
750
|
-
position: followings.size + 1)
|
|
751
|
-
following_node = following_node_of(following_node)
|
|
752
|
-
end
|
|
753
|
-
followings
|
|
754
|
-
end
|
|
755
|
-
|
|
756
|
-
def following_node_of( node )
|
|
757
|
-
if node.kind_of? Element and node.children.size > 0
|
|
758
|
-
return node.children[0]
|
|
759
|
-
end
|
|
760
|
-
return next_sibling_node(node)
|
|
761
|
-
end
|
|
762
|
-
|
|
763
|
-
def next_sibling_node(node)
|
|
764
|
-
psn = node.next_sibling_node
|
|
765
|
-
while psn.nil?
|
|
766
|
-
if node.parent.nil? or node.parent.class == Document
|
|
767
|
-
return nil
|
|
768
|
-
end
|
|
769
|
-
node = node.parent
|
|
770
|
-
psn = node.next_sibling_node
|
|
771
|
-
end
|
|
772
|
-
return psn
|
|
773
|
-
end
|
|
774
|
-
|
|
775
|
-
def child(nodeset)
|
|
776
|
-
nodesets = []
|
|
777
|
-
nodeset.each do |node|
|
|
778
|
-
raw_node = node.raw_node
|
|
779
|
-
node_type = raw_node.node_type
|
|
780
|
-
# trace(:child, node_type, node)
|
|
781
|
-
case node_type
|
|
782
|
-
when :element
|
|
783
|
-
nodesets << raw_node.children.collect.with_index do |child_node, i|
|
|
784
|
-
XPathNode.new(child_node, position: i + 1)
|
|
785
|
-
end
|
|
786
|
-
when :document
|
|
787
|
-
new_nodeset = []
|
|
788
|
-
raw_node.children.each do |child|
|
|
789
|
-
case child
|
|
790
|
-
when XMLDecl, Text
|
|
791
|
-
# Ignore
|
|
792
|
-
else
|
|
793
|
-
new_nodeset << XPathNode.new(child, position: new_nodeset.size + 1)
|
|
794
|
-
end
|
|
795
|
-
end
|
|
796
|
-
nodesets << new_nodeset unless new_nodeset.empty?
|
|
797
|
-
end
|
|
798
|
-
end
|
|
799
|
-
nodesets
|
|
800
|
-
end
|
|
801
|
-
|
|
802
|
-
def norm b
|
|
803
|
-
case b
|
|
804
|
-
when true, false
|
|
805
|
-
return b
|
|
806
|
-
when 'true', 'false'
|
|
807
|
-
return Functions::boolean( b )
|
|
808
|
-
when /^\d+(\.\d+)?$/, Numeric
|
|
809
|
-
return Functions::number( b )
|
|
810
|
-
else
|
|
811
|
-
return Functions::string( b )
|
|
812
|
-
end
|
|
813
|
-
end
|
|
814
|
-
|
|
815
|
-
def equality_relational_compare(set1, op, set2)
|
|
816
|
-
set1 = unnode(set1) if set1.is_a?(Array)
|
|
817
|
-
set2 = unnode(set2) if set2.is_a?(Array)
|
|
818
|
-
|
|
819
|
-
if set1.kind_of? Array and set2.kind_of? Array
|
|
820
|
-
# If both objects to be compared are node-sets, then the
|
|
821
|
-
# comparison will be true if and only if there is a node in the
|
|
822
|
-
# first node-set and a node in the second node-set such that the
|
|
823
|
-
# result of performing the comparison on the string-values of
|
|
824
|
-
# the two nodes is true.
|
|
825
|
-
set1.product(set2).any? do |node1, node2|
|
|
826
|
-
node_string1 = Functions.string(node1)
|
|
827
|
-
node_string2 = Functions.string(node2)
|
|
828
|
-
compare(node_string1, op, node_string2)
|
|
829
|
-
end
|
|
830
|
-
elsif set1.kind_of? Array or set2.kind_of? Array
|
|
831
|
-
# If one is nodeset and other is number, compare number to each item
|
|
832
|
-
# in nodeset s.t. number op number(string(item))
|
|
833
|
-
# If one is nodeset and other is string, compare string to each item
|
|
834
|
-
# in nodeset s.t. string op string(item)
|
|
835
|
-
# If one is nodeset and other is boolean, compare boolean to each item
|
|
836
|
-
# in nodeset s.t. boolean op boolean(item)
|
|
837
|
-
if set1.kind_of? Array
|
|
838
|
-
a = set1
|
|
839
|
-
b = set2
|
|
840
|
-
else
|
|
841
|
-
a = set2
|
|
842
|
-
b = set1
|
|
843
|
-
end
|
|
844
|
-
|
|
845
|
-
case b
|
|
846
|
-
when true, false
|
|
847
|
-
each_unnode(a).any? do |unnoded|
|
|
848
|
-
compare(Functions.boolean(unnoded), op, b)
|
|
849
|
-
end
|
|
850
|
-
when Numeric
|
|
851
|
-
each_unnode(a).any? do |unnoded|
|
|
852
|
-
compare(Functions.number(unnoded), op, b)
|
|
853
|
-
end
|
|
854
|
-
when /\A\d+(\.\d+)?\z/
|
|
855
|
-
b = Functions.number(b)
|
|
856
|
-
each_unnode(a).any? do |unnoded|
|
|
857
|
-
compare(Functions.number(unnoded), op, b)
|
|
858
|
-
end
|
|
859
|
-
else
|
|
860
|
-
b = Functions::string(b)
|
|
861
|
-
each_unnode(a).any? do |unnoded|
|
|
862
|
-
compare(Functions::string(unnoded), op, b)
|
|
863
|
-
end
|
|
864
|
-
end
|
|
865
|
-
else
|
|
866
|
-
# If neither is nodeset,
|
|
867
|
-
# If op is = or !=
|
|
868
|
-
# If either boolean, convert to boolean
|
|
869
|
-
# If either number, convert to number
|
|
870
|
-
# Else, convert to string
|
|
871
|
-
# Else
|
|
872
|
-
# Convert both to numbers and compare
|
|
873
|
-
compare(set1, op, set2)
|
|
874
|
-
end
|
|
875
|
-
end
|
|
876
|
-
|
|
877
|
-
def value_type(value)
|
|
878
|
-
case value
|
|
879
|
-
when true, false
|
|
880
|
-
:boolean
|
|
881
|
-
when Numeric
|
|
882
|
-
:number
|
|
883
|
-
when String
|
|
884
|
-
:string
|
|
885
|
-
else
|
|
886
|
-
raise "[BUG] Unexpected value type: <#{value.inspect}>"
|
|
887
|
-
end
|
|
888
|
-
end
|
|
889
|
-
|
|
890
|
-
def normalize_compare_values(a, operator, b)
|
|
891
|
-
a_type = value_type(a)
|
|
892
|
-
b_type = value_type(b)
|
|
893
|
-
case operator
|
|
894
|
-
when :eq, :neq
|
|
895
|
-
if a_type == :boolean or b_type == :boolean
|
|
896
|
-
a = Functions.boolean(a) unless a_type == :boolean
|
|
897
|
-
b = Functions.boolean(b) unless b_type == :boolean
|
|
898
|
-
elsif a_type == :number or b_type == :number
|
|
899
|
-
a = Functions.number(a) unless a_type == :number
|
|
900
|
-
b = Functions.number(b) unless b_type == :number
|
|
901
|
-
else
|
|
902
|
-
a = Functions.string(a) unless a_type == :string
|
|
903
|
-
b = Functions.string(b) unless b_type == :string
|
|
904
|
-
end
|
|
905
|
-
when :lt, :lteq, :gt, :gteq
|
|
906
|
-
a = Functions.number(a) unless a_type == :number
|
|
907
|
-
b = Functions.number(b) unless b_type == :number
|
|
908
|
-
else
|
|
909
|
-
message = "[BUG] Unexpected compare operator: " +
|
|
910
|
-
"<#{operator.inspect}>: <#{a.inspect}>: <#{b.inspect}>"
|
|
911
|
-
raise message
|
|
912
|
-
end
|
|
913
|
-
[a, b]
|
|
914
|
-
end
|
|
915
|
-
|
|
916
|
-
def compare(a, operator, b)
|
|
917
|
-
a, b = normalize_compare_values(a, operator, b)
|
|
918
|
-
case operator
|
|
919
|
-
when :eq
|
|
920
|
-
a == b
|
|
921
|
-
when :neq
|
|
922
|
-
a != b
|
|
923
|
-
when :lt
|
|
924
|
-
a < b
|
|
925
|
-
when :lteq
|
|
926
|
-
a <= b
|
|
927
|
-
when :gt
|
|
928
|
-
a > b
|
|
929
|
-
when :gteq
|
|
930
|
-
a >= b
|
|
931
|
-
else
|
|
932
|
-
message = "[BUG] Unexpected compare operator: " +
|
|
933
|
-
"<#{operator.inspect}>: <#{a.inspect}>: <#{b.inspect}>"
|
|
934
|
-
raise message
|
|
935
|
-
end
|
|
936
|
-
end
|
|
937
|
-
|
|
938
|
-
def each_unnode(nodeset)
|
|
939
|
-
return to_enum(__method__, nodeset) unless block_given?
|
|
940
|
-
nodeset.each do |node|
|
|
941
|
-
if node.is_a?(XPathNode)
|
|
942
|
-
unnoded = node.raw_node
|
|
943
|
-
else
|
|
944
|
-
unnoded = node
|
|
945
|
-
end
|
|
946
|
-
yield(unnoded)
|
|
947
|
-
end
|
|
948
|
-
end
|
|
949
|
-
|
|
950
|
-
def unnode(nodeset)
|
|
951
|
-
each_unnode(nodeset).collect do |unnoded|
|
|
952
|
-
unnoded = yield(unnoded) if block_given?
|
|
953
|
-
unnoded
|
|
954
|
-
end
|
|
955
|
-
end
|
|
956
|
-
end
|
|
957
|
-
|
|
958
|
-
# @private
|
|
959
|
-
class XPathNode
|
|
960
|
-
attr_reader :raw_node, :context
|
|
961
|
-
def initialize(node, context=nil)
|
|
962
|
-
if node.is_a?(XPathNode)
|
|
963
|
-
@raw_node = node.raw_node
|
|
964
|
-
else
|
|
965
|
-
@raw_node = node
|
|
966
|
-
end
|
|
967
|
-
@context = context || {}
|
|
968
|
-
end
|
|
969
|
-
|
|
970
|
-
def position
|
|
971
|
-
@context[:position]
|
|
972
|
-
end
|
|
973
|
-
end
|
|
974
|
-
end
|