brakeman 4.7.2 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +155 -1
- data/README.md +23 -6
- data/bundle/load.rb +15 -13
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/README.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/setup.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/CHANGELOG.md +24 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/FAQ.md +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/Gemfile +1 -4
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/MIT-LICENSE +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/README.md +21 -16
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/REFERENCE.md +39 -10
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/TODO +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/haml.gemspec +2 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/attribute_builder.rb +58 -3
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/attribute_compiler.rb +45 -32
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/attribute_parser.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/buffer.rb +0 -56
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/compiler.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/engine.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/error.rb +0 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/escapable.rb +77 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/exec.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/filters.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/generator.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_extensions.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_mods.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_xss_mods.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/safe_erubi_template.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/safe_erubis_template.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/xss_mods.rb +6 -3
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers.rb +7 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/options.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/parser.rb +32 -4
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/plugin.rb +18 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/railtie.rb +5 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/sass_rails_filter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/template/options.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/template.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/temple_engine.rb +2 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/temple_line_counter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/util.rb +1 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/version.rb +1 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/yard/default/fulldoc/html/css/common.sass +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/yard/default/layout/html/footer.erb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/AUTHORS +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/COPYING +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/Changelog.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/Gemfile +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/LICENSE +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/README.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/TODO +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/appveyor.yml +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/highline.gemspec +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/builtin_styles.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/color_scheme.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/compatibility.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/custom_errors.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/import.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/io_console_compatible.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/list.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/list_renderer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/menu/item.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/menu.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/paginator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/question/answer_converter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/question.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/question_asker.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/simulate.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/statement.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/string.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/string_extensions.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/style.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/template_renderer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal/io_console.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal/ncurses.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal/unix_stty.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/version.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/wrapper.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline.rb +0 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/MIT-LICENSE.txt +20 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel/processor_count.rb +45 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel/version.rb +4 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel.rb +532 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/LICENSE.txt +22 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md +178 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/README.md +48 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attlistdecl.rb +63 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +205 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +68 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/child.rb +97 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/comment.rb +80 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +311 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/document.rb +451 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/attlistdecl.rb +11 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/dtd.rb +47 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/elementdecl.rb +18 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/entitydecl.rb +57 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/notationdecl.rb +40 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/element.rb +2599 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +51 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/entity.rb +171 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/default.rb +116 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +142 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/transitive.rb +58 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/functions.rb +447 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +79 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/light/node.rb +188 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +59 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/node.rb +76 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/output.rb +30 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parent.rb +166 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +52 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +694 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/lightparser.rb +59 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +197 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +273 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +61 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +101 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/ultralightparser.rb +57 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +689 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +266 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +37 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/sax2listener.rb +98 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/security.rb +28 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb +298 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/streamlistener.rb +93 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/text.rb +424 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/undefinednamespaceexception.rb +9 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +539 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +144 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validationexception.rb +10 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmldecl.rb +130 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmltokens.rb +85 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +81 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +974 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml.rb +3 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/History.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/Manifest.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/README.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/History.rdoc +154 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/Manifest.txt +7 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/README.rdoc +1 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/compare/normalize.rb +51 -6
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/debugging.md +190 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/gauntlet.md +106 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/rp_extensions.rb +15 -36
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/rp_stringscanner.rb +33 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby20_parser.rb +7128 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby20_parser.y +422 -301
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby21_parser.rb +7182 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby21_parser.y +417 -298
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby22_parser.rb +7228 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby22_parser.y +421 -300
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby23_parser.rb +7237 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby23_parser.y +421 -300
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby24_parser.rb +7268 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby24_parser.y +421 -300
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby25_parser.rb +7268 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1/lib/ruby26_parser.y → 2.7.0/gems/ruby_parser-3.18.1/lib/ruby25_parser.y} +420 -313
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby26_parser.rb +7287 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1/lib/ruby_parser.yy → 2.7.0/gems/ruby_parser-3.18.1/lib/ruby26_parser.y} +421 -404
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby27_parser.rb +8517 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1/lib/ruby25_parser.y → 2.7.0/gems/ruby_parser-3.18.1/lib/ruby27_parser.y} +1032 -299
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby30_parser.rb +8751 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby30_parser.y +3472 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby3_parser.yy +3476 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_lexer.rb +308 -605
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_lexer.rex +33 -27
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_lexer.rex.rb +65 -31
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby_lexer_strings.rb +638 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_parser.rb +4 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby_parser.yy +3487 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_parser_extras.rb +341 -133
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/tools/munge.rb +43 -10
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/tools/ripper.rb +15 -10
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/CHANGES.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/Gemfile +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/LICENSE.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/README.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -0
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/History.rdoc +55 -0
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/Manifest.txt +0 -0
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/README.rdoc +0 -0
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/composite_sexp_processor.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/pt_testcase.rb +9 -4
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/sexp.rb +19 -9
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/sexp_matcher.rb +44 -7
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/strict_sexp.rb +25 -3
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/unique.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/CHANGES +4 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/Gemfile +12 -13
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/LICENSE +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/README.jp.md +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/README.md +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/code_attributes.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/command.rb +13 -13
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/controls.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/do_inserter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/embedded.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/end_inserter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/engine.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/erb_converter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/filter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/grammar.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/include.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/interpolation.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less/context.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less/filter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/parser.rb +1 -1
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/escaper.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/filter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/parser.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/splat/builder.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/splat/filter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/template.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/translator.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/version.rb +1 -1
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/slim.gemspec +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/CHANGES +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/EXPRESSIONS.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/Gemfile +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/LICENSE +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/README.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/engine.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/engine.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/parser.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/template.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/trimming.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/exceptions.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/code_merger.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/control_flow.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/dynamic_inliner.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/encoding.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/eraser.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/escapable.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/multi_flattener.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/remove_bom.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/static_analyzer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/static_merger.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/string_splitter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/validator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/array.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/array_buffer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/erb.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/rails_output_buffer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/string_buffer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/grammar.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/attribute_merger.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/attribute_remover.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/attribute_sorter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/dispatcher.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/fast.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/filter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/pretty.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/safe.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/map.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/dispatcher.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/engine_dsl.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/grammar_dsl.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/options.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/template.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/parser.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/static_analyzer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/templates/rails.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/templates/tilt.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/templates.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/utils.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/version.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/temple.gemspec +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/Gemfile +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/History.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/LICENSE.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/Manifest +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/README.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/Todo.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/cell.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/import.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/row.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/table.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/table_helper.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/version.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/terminal-table.gemspec +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/COPYING +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/asciidoc.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/babel.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/bluecloth.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/builder.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/coffee.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/commonmarker.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/creole.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/csv.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/dummy.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/erb.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/erubi.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/erubis.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/etanni.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/haml.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/kramdown.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/less.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/liquid.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/livescript.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/mapping.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/markaby.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/maruku.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/nokogiri.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/pandoc.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/plain.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/prawn.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/radius.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/rdiscount.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/rdoc.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/redcarpet.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/redcloth.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/rst-pandoc.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/sass.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/sigil.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/string.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/template.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/typescript.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/wikicloth.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/yajl.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/CHANGELOG.md +12 -0
- data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/MIT-LICENSE.txt +1 -1
- data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/README.md +3 -3
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/constants.rb +2 -2
- data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/index.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/no_string_ext.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/string_ext.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width.rb +1 -1
- data/lib/brakeman/app_tree.rb +37 -4
- data/lib/brakeman/checks/base_check.rb +30 -11
- data/lib/brakeman/checks/check_basic_auth.rb +2 -0
- data/lib/brakeman/checks/check_content_tag.rb +1 -2
- data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +28 -0
- data/lib/brakeman/checks/check_deserialize.rb +21 -1
- data/lib/brakeman/checks/check_detailed_exceptions.rb +1 -1
- data/lib/brakeman/checks/check_eol_rails.rb +23 -0
- data/lib/brakeman/checks/check_eol_ruby.rb +26 -0
- data/lib/brakeman/checks/check_evaluation.rb +1 -1
- data/lib/brakeman/checks/check_execute.rb +52 -6
- data/lib/brakeman/checks/check_json_entity_escape.rb +38 -0
- data/lib/brakeman/checks/check_json_parsing.rb +1 -1
- data/lib/brakeman/checks/check_link_to.rb +1 -1
- data/lib/brakeman/checks/check_link_to_href.rb +1 -3
- data/lib/brakeman/checks/check_mass_assignment.rb +37 -9
- data/lib/brakeman/checks/check_model_attr_accessible.rb +1 -1
- data/lib/brakeman/checks/check_model_attributes.rb +1 -1
- data/lib/brakeman/checks/check_page_caching_cve.rb +37 -0
- data/lib/brakeman/checks/check_permit_attributes.rb +1 -1
- data/lib/brakeman/checks/check_regex_dos.rb +1 -1
- data/lib/brakeman/checks/check_render.rb +15 -1
- data/lib/brakeman/checks/check_sanitize_methods.rb +2 -1
- data/lib/brakeman/checks/check_skip_before_filter.rb +4 -4
- data/lib/brakeman/checks/check_sql.rb +60 -20
- data/lib/brakeman/checks/check_symbol_dos.rb +1 -1
- data/lib/brakeman/checks/check_template_injection.rb +32 -0
- data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +68 -0
- data/lib/brakeman/checks/check_verb_confusion.rb +75 -0
- data/lib/brakeman/checks/eol_check.rb +47 -0
- data/lib/brakeman/commandline.rb +25 -1
- data/lib/brakeman/differ.rb +0 -5
- data/lib/brakeman/file_parser.rb +58 -22
- data/lib/brakeman/options.rb +39 -2
- data/lib/brakeman/parsers/template_parser.rb +26 -3
- data/lib/brakeman/processors/alias_processor.rb +132 -24
- data/lib/brakeman/processors/base_processor.rb +4 -4
- data/lib/brakeman/processors/controller_alias_processor.rb +6 -43
- data/lib/brakeman/processors/controller_processor.rb +1 -1
- data/lib/brakeman/processors/gem_processor.rb +3 -0
- data/lib/brakeman/processors/haml_template_processor.rb +17 -1
- data/lib/brakeman/processors/lib/call_conversion_helper.rb +13 -7
- data/lib/brakeman/processors/lib/file_type_detector.rb +64 -0
- data/lib/brakeman/processors/lib/find_all_calls.rb +30 -14
- data/lib/brakeman/processors/lib/rails3_config_processor.rb +16 -16
- data/lib/brakeman/processors/lib/rails3_route_processor.rb +2 -0
- data/lib/brakeman/processors/lib/rails4_config_processor.rb +2 -1
- data/lib/brakeman/processors/lib/render_helper.rb +3 -1
- data/lib/brakeman/processors/library_processor.rb +9 -0
- data/lib/brakeman/processors/model_processor.rb +32 -0
- data/lib/brakeman/processors/output_processor.rb +1 -1
- data/lib/brakeman/processors/template_alias_processor.rb +5 -0
- data/lib/brakeman/report/ignore/config.rb +10 -2
- data/lib/brakeman/report/ignore/interactive.rb +1 -1
- data/lib/brakeman/report/report_base.rb +0 -2
- data/lib/brakeman/report/report_csv.rb +37 -60
- data/lib/brakeman/report/report_github.rb +31 -0
- data/lib/brakeman/report/report_junit.rb +104 -0
- data/lib/brakeman/report/report_markdown.rb +0 -1
- data/lib/brakeman/report/report_sarif.rb +133 -0
- data/lib/brakeman/report/report_sonar.rb +38 -0
- data/lib/brakeman/report/report_tabs.rb +1 -1
- data/lib/brakeman/report/report_text.rb +38 -17
- data/lib/brakeman/report.rb +22 -1
- data/lib/brakeman/rescanner.rb +7 -5
- data/lib/brakeman/scanner.rb +65 -31
- data/lib/brakeman/tracker/collection.rb +57 -7
- data/lib/brakeman/tracker/config.rb +88 -5
- data/lib/brakeman/tracker/constants.rb +8 -7
- data/lib/brakeman/tracker/controller.rb +1 -1
- data/lib/brakeman/tracker/method_info.rb +70 -0
- data/lib/brakeman/tracker.rb +42 -5
- data/lib/brakeman/util.rb +58 -21
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman/warning.rb +10 -2
- data/lib/brakeman/warning_codes.rb +13 -0
- data/lib/brakeman.rb +49 -6
- data/lib/ruby_parser/bm_sexp.rb +33 -9
- metadata +430 -351
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/escapable.rb +0 -50
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/debugging.md +0 -18
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/rp_stringscanner.rb +0 -64
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby20_parser.rb +0 -7045
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby21_parser.rb +0 -7116
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby22_parser.rb +0 -7149
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby23_parser.rb +0 -7166
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby24_parser.rb +0 -7178
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby25_parser.rb +0 -7178
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby26_parser.rb +0 -7198
- data/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/data/display_width.marshal.gz +0 -0
@@ -0,0 +1,447 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
module REXML
|
3
|
+
# If you add a method, keep in mind two things:
|
4
|
+
# (1) the first argument will always be a list of nodes from which to
|
5
|
+
# filter. In the case of context methods (such as position), the function
|
6
|
+
# should return an array with a value for each child in the array.
|
7
|
+
# (2) all method calls from XML will have "-" replaced with "_".
|
8
|
+
# Therefore, in XML, "local-name()" is identical (and actually becomes)
|
9
|
+
# "local_name()"
|
10
|
+
module Functions
|
11
|
+
@@available_functions = {}
|
12
|
+
@@context = nil
|
13
|
+
@@namespace_context = {}
|
14
|
+
@@variables = {}
|
15
|
+
|
16
|
+
INTERNAL_METHODS = [
|
17
|
+
:namespace_context,
|
18
|
+
:namespace_context=,
|
19
|
+
:variables,
|
20
|
+
:variables=,
|
21
|
+
:context=,
|
22
|
+
:get_namespace,
|
23
|
+
:send,
|
24
|
+
]
|
25
|
+
class << self
|
26
|
+
def singleton_method_added(name)
|
27
|
+
unless INTERNAL_METHODS.include?(name)
|
28
|
+
@@available_functions[name] = true
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def Functions::namespace_context=(x) ; @@namespace_context=x ; end
|
34
|
+
def Functions::variables=(x) ; @@variables=x ; end
|
35
|
+
def Functions::namespace_context ; @@namespace_context ; end
|
36
|
+
def Functions::variables ; @@variables ; end
|
37
|
+
|
38
|
+
def Functions::context=(value); @@context = value; end
|
39
|
+
|
40
|
+
def Functions::text( )
|
41
|
+
if @@context[:node].node_type == :element
|
42
|
+
return @@context[:node].find_all{|n| n.node_type == :text}.collect{|n| n.value}
|
43
|
+
elsif @@context[:node].node_type == :text
|
44
|
+
return @@context[:node].value
|
45
|
+
else
|
46
|
+
return false
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# Returns the last node of the given list of nodes.
|
51
|
+
def Functions::last( )
|
52
|
+
@@context[:size]
|
53
|
+
end
|
54
|
+
|
55
|
+
def Functions::position( )
|
56
|
+
@@context[:index]
|
57
|
+
end
|
58
|
+
|
59
|
+
# Returns the size of the given list of nodes.
|
60
|
+
def Functions::count( node_set )
|
61
|
+
node_set.size
|
62
|
+
end
|
63
|
+
|
64
|
+
# Since REXML is non-validating, this method is not implemented as it
|
65
|
+
# requires a DTD
|
66
|
+
def Functions::id( object )
|
67
|
+
end
|
68
|
+
|
69
|
+
def Functions::local_name(node_set=nil)
|
70
|
+
get_namespace(node_set) do |node|
|
71
|
+
return node.local_name
|
72
|
+
end
|
73
|
+
""
|
74
|
+
end
|
75
|
+
|
76
|
+
def Functions::namespace_uri( node_set=nil )
|
77
|
+
get_namespace( node_set ) {|node| node.namespace}
|
78
|
+
end
|
79
|
+
|
80
|
+
def Functions::name( node_set=nil )
|
81
|
+
get_namespace( node_set ) do |node|
|
82
|
+
node.expanded_name
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# Helper method.
|
87
|
+
def Functions::get_namespace( node_set = nil )
|
88
|
+
if node_set == nil
|
89
|
+
yield @@context[:node] if @@context[:node].respond_to?(:namespace)
|
90
|
+
else
|
91
|
+
if node_set.respond_to? :each
|
92
|
+
result = []
|
93
|
+
node_set.each do |node|
|
94
|
+
result << yield(node) if node.respond_to?(:namespace)
|
95
|
+
end
|
96
|
+
result
|
97
|
+
elsif node_set.respond_to? :namespace
|
98
|
+
yield node_set
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
# A node-set is converted to a string by returning the string-value of the
|
104
|
+
# node in the node-set that is first in document order. If the node-set is
|
105
|
+
# empty, an empty string is returned.
|
106
|
+
#
|
107
|
+
# A number is converted to a string as follows
|
108
|
+
#
|
109
|
+
# NaN is converted to the string NaN
|
110
|
+
#
|
111
|
+
# positive zero is converted to the string 0
|
112
|
+
#
|
113
|
+
# negative zero is converted to the string 0
|
114
|
+
#
|
115
|
+
# positive infinity is converted to the string Infinity
|
116
|
+
#
|
117
|
+
# negative infinity is converted to the string -Infinity
|
118
|
+
#
|
119
|
+
# if the number is an integer, the number is represented in decimal form
|
120
|
+
# as a Number with no decimal point and no leading zeros, preceded by a
|
121
|
+
# minus sign (-) if the number is negative
|
122
|
+
#
|
123
|
+
# otherwise, the number is represented in decimal form as a Number
|
124
|
+
# including a decimal point with at least one digit before the decimal
|
125
|
+
# point and at least one digit after the decimal point, preceded by a
|
126
|
+
# minus sign (-) if the number is negative; there must be no leading zeros
|
127
|
+
# before the decimal point apart possibly from the one required digit
|
128
|
+
# immediately before the decimal point; beyond the one required digit
|
129
|
+
# after the decimal point there must be as many, but only as many, more
|
130
|
+
# digits as are needed to uniquely distinguish the number from all other
|
131
|
+
# IEEE 754 numeric values.
|
132
|
+
#
|
133
|
+
# The boolean false value is converted to the string false. The boolean
|
134
|
+
# true value is converted to the string true.
|
135
|
+
#
|
136
|
+
# An object of a type other than the four basic types is converted to a
|
137
|
+
# string in a way that is dependent on that type.
|
138
|
+
def Functions::string( object=@@context[:node] )
|
139
|
+
if object.respond_to?(:node_type)
|
140
|
+
case object.node_type
|
141
|
+
when :attribute
|
142
|
+
object.value
|
143
|
+
when :element
|
144
|
+
string_value(object)
|
145
|
+
when :document
|
146
|
+
string_value(object.root)
|
147
|
+
when :processing_instruction
|
148
|
+
object.content
|
149
|
+
else
|
150
|
+
object.to_s
|
151
|
+
end
|
152
|
+
else
|
153
|
+
case object
|
154
|
+
when Array
|
155
|
+
string(object[0])
|
156
|
+
when Float
|
157
|
+
if object.nan?
|
158
|
+
"NaN"
|
159
|
+
else
|
160
|
+
integer = object.to_i
|
161
|
+
if object == integer
|
162
|
+
"%d" % integer
|
163
|
+
else
|
164
|
+
object.to_s
|
165
|
+
end
|
166
|
+
end
|
167
|
+
else
|
168
|
+
object.to_s
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# A node-set is converted to a string by
|
174
|
+
# returning the concatenation of the string-value
|
175
|
+
# of each of the children of the node in the
|
176
|
+
# node-set that is first in document order.
|
177
|
+
# If the node-set is empty, an empty string is returned.
|
178
|
+
def Functions::string_value( o )
|
179
|
+
rv = ""
|
180
|
+
o.children.each { |e|
|
181
|
+
if e.node_type == :text
|
182
|
+
rv << e.to_s
|
183
|
+
elsif e.node_type == :element
|
184
|
+
rv << string_value( e )
|
185
|
+
end
|
186
|
+
}
|
187
|
+
rv
|
188
|
+
end
|
189
|
+
|
190
|
+
def Functions::concat( *objects )
|
191
|
+
concatenated = ""
|
192
|
+
objects.each do |object|
|
193
|
+
concatenated << string(object)
|
194
|
+
end
|
195
|
+
concatenated
|
196
|
+
end
|
197
|
+
|
198
|
+
# Fixed by Mike Stok
|
199
|
+
def Functions::starts_with( string, test )
|
200
|
+
string(string).index(string(test)) == 0
|
201
|
+
end
|
202
|
+
|
203
|
+
# Fixed by Mike Stok
|
204
|
+
def Functions::contains( string, test )
|
205
|
+
string(string).include?(string(test))
|
206
|
+
end
|
207
|
+
|
208
|
+
# Kouhei fixed this
|
209
|
+
def Functions::substring_before( string, test )
|
210
|
+
ruby_string = string(string)
|
211
|
+
ruby_index = ruby_string.index(string(test))
|
212
|
+
if ruby_index.nil?
|
213
|
+
""
|
214
|
+
else
|
215
|
+
ruby_string[ 0...ruby_index ]
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
# Kouhei fixed this too
|
220
|
+
def Functions::substring_after( string, test )
|
221
|
+
ruby_string = string(string)
|
222
|
+
return $1 if ruby_string =~ /#{test}(.*)/
|
223
|
+
""
|
224
|
+
end
|
225
|
+
|
226
|
+
# Take equal portions of Mike Stok and Sean Russell; mix
|
227
|
+
# vigorously, and pour into a tall, chilled glass. Serves 10,000.
|
228
|
+
def Functions::substring( string, start, length=nil )
|
229
|
+
ruby_string = string(string)
|
230
|
+
ruby_length = if length.nil?
|
231
|
+
ruby_string.length.to_f
|
232
|
+
else
|
233
|
+
number(length)
|
234
|
+
end
|
235
|
+
ruby_start = number(start)
|
236
|
+
|
237
|
+
# Handle the special cases
|
238
|
+
return '' if (
|
239
|
+
ruby_length.nan? or
|
240
|
+
ruby_start.nan? or
|
241
|
+
ruby_start.infinite?
|
242
|
+
)
|
243
|
+
|
244
|
+
infinite_length = ruby_length.infinite? == 1
|
245
|
+
ruby_length = ruby_string.length if infinite_length
|
246
|
+
|
247
|
+
# Now, get the bounds. The XPath bounds are 1..length; the ruby bounds
|
248
|
+
# are 0..length. Therefore, we have to offset the bounds by one.
|
249
|
+
ruby_start = round(ruby_start) - 1
|
250
|
+
ruby_length = round(ruby_length)
|
251
|
+
|
252
|
+
if ruby_start < 0
|
253
|
+
ruby_length += ruby_start unless infinite_length
|
254
|
+
ruby_start = 0
|
255
|
+
end
|
256
|
+
return '' if ruby_length <= 0
|
257
|
+
ruby_string[ruby_start,ruby_length]
|
258
|
+
end
|
259
|
+
|
260
|
+
# UNTESTED
|
261
|
+
def Functions::string_length( string )
|
262
|
+
string(string).length
|
263
|
+
end
|
264
|
+
|
265
|
+
# UNTESTED
|
266
|
+
def Functions::normalize_space( string=nil )
|
267
|
+
string = string(@@context[:node]) if string.nil?
|
268
|
+
if string.kind_of? Array
|
269
|
+
string.collect{|x| string.to_s.strip.gsub(/\s+/um, ' ') if string}
|
270
|
+
else
|
271
|
+
string.to_s.strip.gsub(/\s+/um, ' ')
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
# This is entirely Mike Stok's beast
|
276
|
+
def Functions::translate( string, tr1, tr2 )
|
277
|
+
from = string(tr1)
|
278
|
+
to = string(tr2)
|
279
|
+
|
280
|
+
# the map is our translation table.
|
281
|
+
#
|
282
|
+
# if a character occurs more than once in the
|
283
|
+
# from string then we ignore the second &
|
284
|
+
# subsequent mappings
|
285
|
+
#
|
286
|
+
# if a character maps to nil then we delete it
|
287
|
+
# in the output. This happens if the from
|
288
|
+
# string is longer than the to string
|
289
|
+
#
|
290
|
+
# there's nothing about - or ^ being special in
|
291
|
+
# http://www.w3.org/TR/xpath#function-translate
|
292
|
+
# so we don't build ranges or negated classes
|
293
|
+
|
294
|
+
map = Hash.new
|
295
|
+
0.upto(from.length - 1) { |pos|
|
296
|
+
from_char = from[pos]
|
297
|
+
unless map.has_key? from_char
|
298
|
+
map[from_char] =
|
299
|
+
if pos < to.length
|
300
|
+
to[pos]
|
301
|
+
else
|
302
|
+
nil
|
303
|
+
end
|
304
|
+
end
|
305
|
+
}
|
306
|
+
|
307
|
+
if ''.respond_to? :chars
|
308
|
+
string(string).chars.collect { |c|
|
309
|
+
if map.has_key? c then map[c] else c end
|
310
|
+
}.compact.join
|
311
|
+
else
|
312
|
+
string(string).unpack('U*').collect { |c|
|
313
|
+
if map.has_key? c then map[c] else c end
|
314
|
+
}.compact.pack('U*')
|
315
|
+
end
|
316
|
+
end
|
317
|
+
|
318
|
+
def Functions::boolean(object=@@context[:node])
|
319
|
+
case object
|
320
|
+
when true, false
|
321
|
+
object
|
322
|
+
when Float
|
323
|
+
return false if object.zero?
|
324
|
+
return false if object.nan?
|
325
|
+
true
|
326
|
+
when Numeric
|
327
|
+
not object.zero?
|
328
|
+
when String
|
329
|
+
not object.empty?
|
330
|
+
when Array
|
331
|
+
not object.empty?
|
332
|
+
else
|
333
|
+
object ? true : false
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
337
|
+
# UNTESTED
|
338
|
+
def Functions::not( object )
|
339
|
+
not boolean( object )
|
340
|
+
end
|
341
|
+
|
342
|
+
# UNTESTED
|
343
|
+
def Functions::true( )
|
344
|
+
true
|
345
|
+
end
|
346
|
+
|
347
|
+
# UNTESTED
|
348
|
+
def Functions::false( )
|
349
|
+
false
|
350
|
+
end
|
351
|
+
|
352
|
+
# UNTESTED
|
353
|
+
def Functions::lang( language )
|
354
|
+
lang = false
|
355
|
+
node = @@context[:node]
|
356
|
+
attr = nil
|
357
|
+
until node.nil?
|
358
|
+
if node.node_type == :element
|
359
|
+
attr = node.attributes["xml:lang"]
|
360
|
+
unless attr.nil?
|
361
|
+
lang = compare_language(string(language), attr)
|
362
|
+
break
|
363
|
+
else
|
364
|
+
end
|
365
|
+
end
|
366
|
+
node = node.parent
|
367
|
+
end
|
368
|
+
lang
|
369
|
+
end
|
370
|
+
|
371
|
+
def Functions::compare_language lang1, lang2
|
372
|
+
lang2.downcase.index(lang1.downcase) == 0
|
373
|
+
end
|
374
|
+
|
375
|
+
# a string that consists of optional whitespace followed by an optional
|
376
|
+
# minus sign followed by a Number followed by whitespace is converted to
|
377
|
+
# the IEEE 754 number that is nearest (according to the IEEE 754
|
378
|
+
# round-to-nearest rule) to the mathematical value represented by the
|
379
|
+
# string; any other string is converted to NaN
|
380
|
+
#
|
381
|
+
# boolean true is converted to 1; boolean false is converted to 0
|
382
|
+
#
|
383
|
+
# a node-set is first converted to a string as if by a call to the string
|
384
|
+
# function and then converted in the same way as a string argument
|
385
|
+
#
|
386
|
+
# an object of a type other than the four basic types is converted to a
|
387
|
+
# number in a way that is dependent on that type
|
388
|
+
def Functions::number(object=@@context[:node])
|
389
|
+
case object
|
390
|
+
when true
|
391
|
+
Float(1)
|
392
|
+
when false
|
393
|
+
Float(0)
|
394
|
+
when Array
|
395
|
+
number(string(object))
|
396
|
+
when Numeric
|
397
|
+
object.to_f
|
398
|
+
else
|
399
|
+
str = string(object)
|
400
|
+
case str.strip
|
401
|
+
when /\A\s*(-?(?:\d+(?:\.\d*)?|\.\d+))\s*\z/
|
402
|
+
$1.to_f
|
403
|
+
else
|
404
|
+
Float::NAN
|
405
|
+
end
|
406
|
+
end
|
407
|
+
end
|
408
|
+
|
409
|
+
def Functions::sum( nodes )
|
410
|
+
nodes = [nodes] unless nodes.kind_of? Array
|
411
|
+
nodes.inject(0) { |r,n| r + number(string(n)) }
|
412
|
+
end
|
413
|
+
|
414
|
+
def Functions::floor( number )
|
415
|
+
number(number).floor
|
416
|
+
end
|
417
|
+
|
418
|
+
def Functions::ceiling( number )
|
419
|
+
number(number).ceil
|
420
|
+
end
|
421
|
+
|
422
|
+
def Functions::round( number )
|
423
|
+
number = number(number)
|
424
|
+
begin
|
425
|
+
neg = number.negative?
|
426
|
+
number = number.abs.round
|
427
|
+
neg ? -number : number
|
428
|
+
rescue FloatDomainError
|
429
|
+
number
|
430
|
+
end
|
431
|
+
end
|
432
|
+
|
433
|
+
def Functions::processing_instruction( node )
|
434
|
+
node.node_type == :processing_instruction
|
435
|
+
end
|
436
|
+
|
437
|
+
def Functions::send(name, *args)
|
438
|
+
if @@available_functions[name.to_sym]
|
439
|
+
super
|
440
|
+
else
|
441
|
+
# TODO: Maybe, this is not XPath spec behavior.
|
442
|
+
# This behavior must be reconsidered.
|
443
|
+
XPath.match(@@context[:node], name.to_s)
|
444
|
+
end
|
445
|
+
end
|
446
|
+
end
|
447
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
|
3
|
+
require_relative "child"
|
4
|
+
require_relative "source"
|
5
|
+
|
6
|
+
module REXML
|
7
|
+
# Represents an XML Instruction; IE, <? ... ?>
|
8
|
+
# TODO: Add parent arg (3rd arg) to constructor
|
9
|
+
class Instruction < Child
|
10
|
+
START = "<?"
|
11
|
+
STOP = "?>"
|
12
|
+
|
13
|
+
# target is the "name" of the Instruction; IE, the "tag" in <?tag ...?>
|
14
|
+
# content is everything else.
|
15
|
+
attr_accessor :target, :content
|
16
|
+
|
17
|
+
# Constructs a new Instruction
|
18
|
+
# @param target can be one of a number of things. If String, then
|
19
|
+
# the target of this instruction is set to this. If an Instruction,
|
20
|
+
# then the Instruction is shallowly cloned (target and content are
|
21
|
+
# copied).
|
22
|
+
# @param content Must be either a String, or a Parent. Can only
|
23
|
+
# be a Parent if the target argument is a Source. Otherwise, this
|
24
|
+
# String is set as the content of this instruction.
|
25
|
+
def initialize(target, content=nil)
|
26
|
+
case target
|
27
|
+
when String
|
28
|
+
super()
|
29
|
+
@target = target
|
30
|
+
@content = content
|
31
|
+
when Instruction
|
32
|
+
super(content)
|
33
|
+
@target = target.target
|
34
|
+
@content = target.content
|
35
|
+
else
|
36
|
+
message =
|
37
|
+
"processing instruction target must be String or REXML::Instruction: "
|
38
|
+
message << "<#{target.inspect}>"
|
39
|
+
raise ArgumentError, message
|
40
|
+
end
|
41
|
+
@content.strip! if @content
|
42
|
+
end
|
43
|
+
|
44
|
+
def clone
|
45
|
+
Instruction.new self
|
46
|
+
end
|
47
|
+
|
48
|
+
# == DEPRECATED
|
49
|
+
# See the rexml/formatters package
|
50
|
+
#
|
51
|
+
def write writer, indent=-1, transitive=false, ie_hack=false
|
52
|
+
Kernel.warn( "#{self.class.name}.write is deprecated", uplevel: 1)
|
53
|
+
indent(writer, indent)
|
54
|
+
writer << START
|
55
|
+
writer << @target
|
56
|
+
if @content
|
57
|
+
writer << ' '
|
58
|
+
writer << @content
|
59
|
+
end
|
60
|
+
writer << STOP
|
61
|
+
end
|
62
|
+
|
63
|
+
# @return true if other is an Instruction, and the content and target
|
64
|
+
# of the other matches the target and content of this object.
|
65
|
+
def ==( other )
|
66
|
+
other.kind_of? Instruction and
|
67
|
+
other.target == @target and
|
68
|
+
other.content == @content
|
69
|
+
end
|
70
|
+
|
71
|
+
def node_type
|
72
|
+
:processing_instruction
|
73
|
+
end
|
74
|
+
|
75
|
+
def inspect
|
76
|
+
"<?p-i #{target} ...?>"
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,188 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
require_relative '../xmltokens'
|
3
|
+
|
4
|
+
module REXML
|
5
|
+
module Light
|
6
|
+
# Represents a tagged XML element. Elements are characterized by
|
7
|
+
# having children, attributes, and names, and can themselves be
|
8
|
+
# children.
|
9
|
+
class Node
|
10
|
+
NAMESPLIT = /^(?:(#{XMLTokens::NCNAME_STR}):)?(#{XMLTokens::NCNAME_STR})/u
|
11
|
+
PARENTS = [ :element, :document, :doctype ]
|
12
|
+
# Create a new element.
|
13
|
+
def initialize node=nil
|
14
|
+
@node = node
|
15
|
+
if node.kind_of? String
|
16
|
+
node = [ :text, node ]
|
17
|
+
elsif node.nil?
|
18
|
+
node = [ :document, nil, nil ]
|
19
|
+
elsif node[0] == :start_element
|
20
|
+
node[0] = :element
|
21
|
+
elsif node[0] == :start_doctype
|
22
|
+
node[0] = :doctype
|
23
|
+
elsif node[0] == :start_document
|
24
|
+
node[0] = :document
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def size
|
29
|
+
if PARENTS.include? @node[0]
|
30
|
+
@node[-1].size
|
31
|
+
else
|
32
|
+
0
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def each
|
37
|
+
size.times { |x| yield( at(x+4) ) }
|
38
|
+
end
|
39
|
+
|
40
|
+
def name
|
41
|
+
at(2)
|
42
|
+
end
|
43
|
+
|
44
|
+
def name=( name_str, ns=nil )
|
45
|
+
pfx = ''
|
46
|
+
pfx = "#{prefix(ns)}:" if ns
|
47
|
+
_old_put(2, "#{pfx}#{name_str}")
|
48
|
+
end
|
49
|
+
|
50
|
+
def parent=( node )
|
51
|
+
_old_put(1,node)
|
52
|
+
end
|
53
|
+
|
54
|
+
def local_name
|
55
|
+
namesplit
|
56
|
+
@name
|
57
|
+
end
|
58
|
+
|
59
|
+
def local_name=( name_str )
|
60
|
+
_old_put( 1, "#@prefix:#{name_str}" )
|
61
|
+
end
|
62
|
+
|
63
|
+
def prefix( namespace=nil )
|
64
|
+
prefix_of( self, namespace )
|
65
|
+
end
|
66
|
+
|
67
|
+
def namespace( prefix=prefix() )
|
68
|
+
namespace_of( self, prefix )
|
69
|
+
end
|
70
|
+
|
71
|
+
def namespace=( namespace )
|
72
|
+
@prefix = prefix( namespace )
|
73
|
+
pfx = ''
|
74
|
+
pfx = "#@prefix:" if @prefix.size > 0
|
75
|
+
_old_put(1, "#{pfx}#@name")
|
76
|
+
end
|
77
|
+
|
78
|
+
def []( reference, ns=nil )
|
79
|
+
if reference.kind_of? String
|
80
|
+
pfx = ''
|
81
|
+
pfx = "#{prefix(ns)}:" if ns
|
82
|
+
at(3)["#{pfx}#{reference}"]
|
83
|
+
elsif reference.kind_of? Range
|
84
|
+
_old_get( Range.new(4+reference.begin, reference.end, reference.exclude_end?) )
|
85
|
+
else
|
86
|
+
_old_get( 4+reference )
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def =~( path )
|
91
|
+
XPath.match( self, path )
|
92
|
+
end
|
93
|
+
|
94
|
+
# Doesn't handle namespaces yet
|
95
|
+
def []=( reference, ns, value=nil )
|
96
|
+
if reference.kind_of? String
|
97
|
+
value = ns unless value
|
98
|
+
at( 3 )[reference] = value
|
99
|
+
elsif reference.kind_of? Range
|
100
|
+
_old_put( Range.new(3+reference.begin, reference.end, reference.exclude_end?), ns )
|
101
|
+
else
|
102
|
+
if value
|
103
|
+
_old_put( 4+reference, ns, value )
|
104
|
+
else
|
105
|
+
_old_put( 4+reference, ns )
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
# Append a child to this element, optionally under a provided namespace.
|
111
|
+
# The namespace argument is ignored if the element argument is an Element
|
112
|
+
# object. Otherwise, the element argument is a string, the namespace (if
|
113
|
+
# provided) is the namespace the element is created in.
|
114
|
+
def << element
|
115
|
+
if node_type() == :text
|
116
|
+
at(-1) << element
|
117
|
+
else
|
118
|
+
newnode = Node.new( element )
|
119
|
+
newnode.parent = self
|
120
|
+
self.push( newnode )
|
121
|
+
end
|
122
|
+
at(-1)
|
123
|
+
end
|
124
|
+
|
125
|
+
def node_type
|
126
|
+
_old_get(0)
|
127
|
+
end
|
128
|
+
|
129
|
+
def text=( foo )
|
130
|
+
replace = at(4).kind_of?(String)? 1 : 0
|
131
|
+
self._old_put(4,replace, normalizefoo)
|
132
|
+
end
|
133
|
+
|
134
|
+
def root
|
135
|
+
context = self
|
136
|
+
context = context.at(1) while context.at(1)
|
137
|
+
end
|
138
|
+
|
139
|
+
def has_name?( name, namespace = '' )
|
140
|
+
at(3) == name and namespace() == namespace
|
141
|
+
end
|
142
|
+
|
143
|
+
def children
|
144
|
+
self
|
145
|
+
end
|
146
|
+
|
147
|
+
def parent
|
148
|
+
at(1)
|
149
|
+
end
|
150
|
+
|
151
|
+
def to_s
|
152
|
+
|
153
|
+
end
|
154
|
+
|
155
|
+
private
|
156
|
+
|
157
|
+
def namesplit
|
158
|
+
return if @name.defined?
|
159
|
+
at(2) =~ NAMESPLIT
|
160
|
+
@prefix = '' || $1
|
161
|
+
@name = $2
|
162
|
+
end
|
163
|
+
|
164
|
+
def namespace_of( node, prefix=nil )
|
165
|
+
if not prefix
|
166
|
+
name = at(2)
|
167
|
+
name =~ NAMESPLIT
|
168
|
+
prefix = $1
|
169
|
+
end
|
170
|
+
to_find = 'xmlns'
|
171
|
+
to_find = "xmlns:#{prefix}" if not prefix.nil?
|
172
|
+
ns = at(3)[ to_find ]
|
173
|
+
ns ? ns : namespace_of( @node[0], prefix )
|
174
|
+
end
|
175
|
+
|
176
|
+
def prefix_of( node, namespace=nil )
|
177
|
+
if not namespace
|
178
|
+
name = node.name
|
179
|
+
name =~ NAMESPLIT
|
180
|
+
$1
|
181
|
+
else
|
182
|
+
ns = at(3).find { |k,v| v == namespace }
|
183
|
+
ns ? ns : prefix_of( node.parent, namespace )
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|