brakeman 4.7.1 → 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 +163 -1
- data/README.md +24 -7
- 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.0 → 2.7.0/gems/ruby_parser-3.18.1}/History.rdoc +166 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.0 → 2.7.0/gems/ruby_parser-3.18.1}/Manifest.txt +7 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.0 → 2.7.0/gems/ruby_parser-3.18.1}/README.rdoc +1 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.0 → 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.0 → 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.0 → 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.0 → 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.0 → 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.0 → 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.0 → 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.0/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.0/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.0/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.0 → 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.0 → 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.0 → 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.0 → 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.0 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_parser_extras.rb +343 -133
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.0 → 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.0 → 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 +38 -10
- 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 +83 -41
- 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/processor.rb +1 -1
- 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 +63 -24
- 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 +438 -352
- 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.0/debugging.md +0 -18
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/rp_stringscanner.rb +0 -64
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby20_parser.rb +0 -7045
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby21_parser.rb +0 -7116
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby22_parser.rb +0 -7149
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby23_parser.rb +0 -7166
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby24_parser.rb +0 -7178
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby25_parser.rb +0 -7178
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/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,539 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
require_relative "validation"
|
3
|
+
require_relative "../parsers/baseparser"
|
4
|
+
|
5
|
+
module REXML
|
6
|
+
module Validation
|
7
|
+
# Implemented:
|
8
|
+
# * empty
|
9
|
+
# * element
|
10
|
+
# * attribute
|
11
|
+
# * text
|
12
|
+
# * optional
|
13
|
+
# * choice
|
14
|
+
# * oneOrMore
|
15
|
+
# * zeroOrMore
|
16
|
+
# * group
|
17
|
+
# * value
|
18
|
+
# * interleave
|
19
|
+
# * mixed
|
20
|
+
# * ref
|
21
|
+
# * grammar
|
22
|
+
# * start
|
23
|
+
# * define
|
24
|
+
#
|
25
|
+
# Not implemented:
|
26
|
+
# * data
|
27
|
+
# * param
|
28
|
+
# * include
|
29
|
+
# * externalRef
|
30
|
+
# * notAllowed
|
31
|
+
# * anyName
|
32
|
+
# * nsName
|
33
|
+
# * except
|
34
|
+
# * name
|
35
|
+
class RelaxNG
|
36
|
+
include Validator
|
37
|
+
|
38
|
+
INFINITY = 1.0 / 0.0
|
39
|
+
EMPTY = Event.new( nil )
|
40
|
+
TEXT = [:start_element, "text"]
|
41
|
+
attr_accessor :current
|
42
|
+
attr_accessor :count
|
43
|
+
attr_reader :references
|
44
|
+
|
45
|
+
# FIXME: Namespaces
|
46
|
+
def initialize source
|
47
|
+
parser = REXML::Parsers::BaseParser.new( source )
|
48
|
+
|
49
|
+
@count = 0
|
50
|
+
@references = {}
|
51
|
+
@root = @current = Sequence.new(self)
|
52
|
+
@root.previous = true
|
53
|
+
states = [ @current ]
|
54
|
+
begin
|
55
|
+
event = parser.pull
|
56
|
+
case event[0]
|
57
|
+
when :start_element
|
58
|
+
case event[1]
|
59
|
+
when "empty"
|
60
|
+
when "element", "attribute", "text", "value"
|
61
|
+
states[-1] << event
|
62
|
+
when "optional"
|
63
|
+
states << Optional.new( self )
|
64
|
+
states[-2] << states[-1]
|
65
|
+
when "choice"
|
66
|
+
states << Choice.new( self )
|
67
|
+
states[-2] << states[-1]
|
68
|
+
when "oneOrMore"
|
69
|
+
states << OneOrMore.new( self )
|
70
|
+
states[-2] << states[-1]
|
71
|
+
when "zeroOrMore"
|
72
|
+
states << ZeroOrMore.new( self )
|
73
|
+
states[-2] << states[-1]
|
74
|
+
when "group"
|
75
|
+
states << Sequence.new( self )
|
76
|
+
states[-2] << states[-1]
|
77
|
+
when "interleave"
|
78
|
+
states << Interleave.new( self )
|
79
|
+
states[-2] << states[-1]
|
80
|
+
when "mixed"
|
81
|
+
states << Interleave.new( self )
|
82
|
+
states[-2] << states[-1]
|
83
|
+
states[-1] << TEXT
|
84
|
+
when "define"
|
85
|
+
states << [ event[2]["name"] ]
|
86
|
+
when "ref"
|
87
|
+
states[-1] << Ref.new( event[2]["name"] )
|
88
|
+
when "anyName"
|
89
|
+
states << AnyName.new( self )
|
90
|
+
states[-2] << states[-1]
|
91
|
+
when "nsName"
|
92
|
+
when "except"
|
93
|
+
when "name"
|
94
|
+
when "data"
|
95
|
+
when "param"
|
96
|
+
when "include"
|
97
|
+
when "grammar"
|
98
|
+
when "start"
|
99
|
+
when "externalRef"
|
100
|
+
when "notAllowed"
|
101
|
+
end
|
102
|
+
when :end_element
|
103
|
+
case event[1]
|
104
|
+
when "element", "attribute"
|
105
|
+
states[-1] << event
|
106
|
+
when "zeroOrMore", "oneOrMore", "choice", "optional",
|
107
|
+
"interleave", "group", "mixed"
|
108
|
+
states.pop
|
109
|
+
when "define"
|
110
|
+
ref = states.pop
|
111
|
+
@references[ ref.shift ] = ref
|
112
|
+
#when "empty"
|
113
|
+
end
|
114
|
+
when :end_document
|
115
|
+
states[-1] << event
|
116
|
+
when :text
|
117
|
+
states[-1] << event
|
118
|
+
end
|
119
|
+
end while event[0] != :end_document
|
120
|
+
end
|
121
|
+
|
122
|
+
def receive event
|
123
|
+
validate( event )
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
class State
|
128
|
+
def initialize( context )
|
129
|
+
@previous = []
|
130
|
+
@events = []
|
131
|
+
@current = 0
|
132
|
+
@count = context.count += 1
|
133
|
+
@references = context.references
|
134
|
+
@value = false
|
135
|
+
end
|
136
|
+
|
137
|
+
def reset
|
138
|
+
return if @current == 0
|
139
|
+
@current = 0
|
140
|
+
@events.each {|s| s.reset if s.kind_of? State }
|
141
|
+
end
|
142
|
+
|
143
|
+
def previous=( previous )
|
144
|
+
@previous << previous
|
145
|
+
end
|
146
|
+
|
147
|
+
def next( event )
|
148
|
+
#print "In next with #{event.inspect}. "
|
149
|
+
#p @previous
|
150
|
+
return @previous.pop.next( event ) if @events[@current].nil?
|
151
|
+
expand_ref_in( @events, @current ) if @events[@current].class == Ref
|
152
|
+
if ( @events[@current].kind_of? State )
|
153
|
+
@current += 1
|
154
|
+
@events[@current-1].previous = self
|
155
|
+
return @events[@current-1].next( event )
|
156
|
+
end
|
157
|
+
if ( @events[@current].matches?(event) )
|
158
|
+
@current += 1
|
159
|
+
if @events[@current].nil?
|
160
|
+
return @previous.pop
|
161
|
+
elsif @events[@current].kind_of? State
|
162
|
+
@current += 1
|
163
|
+
@events[@current-1].previous = self
|
164
|
+
return @events[@current-1]
|
165
|
+
else
|
166
|
+
return self
|
167
|
+
end
|
168
|
+
else
|
169
|
+
return nil
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
def to_s
|
174
|
+
# Abbreviated:
|
175
|
+
self.class.name =~ /(?:::)(\w)\w+$/
|
176
|
+
# Full:
|
177
|
+
#self.class.name =~ /(?:::)(\w+)$/
|
178
|
+
"#$1.#@count"
|
179
|
+
end
|
180
|
+
|
181
|
+
def inspect
|
182
|
+
"< #{to_s} #{@events.collect{|e|
|
183
|
+
pre = e == @events[@current] ? '#' : ''
|
184
|
+
pre + e.inspect unless self == e
|
185
|
+
}.join(', ')} >"
|
186
|
+
end
|
187
|
+
|
188
|
+
def expected
|
189
|
+
return [@events[@current]]
|
190
|
+
end
|
191
|
+
|
192
|
+
def <<( event )
|
193
|
+
add_event_to_arry( @events, event )
|
194
|
+
end
|
195
|
+
|
196
|
+
|
197
|
+
protected
|
198
|
+
def expand_ref_in( arry, ind )
|
199
|
+
new_events = []
|
200
|
+
@references[ arry[ind].to_s ].each{ |evt|
|
201
|
+
add_event_to_arry(new_events,evt)
|
202
|
+
}
|
203
|
+
arry[ind,1] = new_events
|
204
|
+
end
|
205
|
+
|
206
|
+
def add_event_to_arry( arry, evt )
|
207
|
+
evt = generate_event( evt )
|
208
|
+
if evt.kind_of? String
|
209
|
+
arry[-1].event_arg = evt if arry[-1].kind_of? Event and @value
|
210
|
+
@value = false
|
211
|
+
else
|
212
|
+
arry << evt
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
def generate_event( event )
|
217
|
+
return event if event.kind_of? State or event.class == Ref
|
218
|
+
evt = nil
|
219
|
+
arg = nil
|
220
|
+
case event[0]
|
221
|
+
when :start_element
|
222
|
+
case event[1]
|
223
|
+
when "element"
|
224
|
+
evt = :start_element
|
225
|
+
arg = event[2]["name"]
|
226
|
+
when "attribute"
|
227
|
+
evt = :start_attribute
|
228
|
+
arg = event[2]["name"]
|
229
|
+
when "text"
|
230
|
+
evt = :text
|
231
|
+
when "value"
|
232
|
+
evt = :text
|
233
|
+
@value = true
|
234
|
+
end
|
235
|
+
when :text
|
236
|
+
return event[1]
|
237
|
+
when :end_document
|
238
|
+
return Event.new( event[0] )
|
239
|
+
else # then :end_element
|
240
|
+
case event[1]
|
241
|
+
when "element"
|
242
|
+
evt = :end_element
|
243
|
+
when "attribute"
|
244
|
+
evt = :end_attribute
|
245
|
+
end
|
246
|
+
end
|
247
|
+
return Event.new( evt, arg )
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
|
252
|
+
class Sequence < State
|
253
|
+
def matches?(event)
|
254
|
+
@events[@current].matches?( event )
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
|
259
|
+
class Optional < State
|
260
|
+
def next( event )
|
261
|
+
if @current == 0
|
262
|
+
rv = super
|
263
|
+
return rv if rv
|
264
|
+
@prior = @previous.pop
|
265
|
+
return @prior.next( event )
|
266
|
+
end
|
267
|
+
super
|
268
|
+
end
|
269
|
+
|
270
|
+
def matches?(event)
|
271
|
+
@events[@current].matches?(event) ||
|
272
|
+
(@current == 0 and @previous[-1].matches?(event))
|
273
|
+
end
|
274
|
+
|
275
|
+
def expected
|
276
|
+
return [ @prior.expected, @events[0] ].flatten if @current == 0
|
277
|
+
return [@events[@current]]
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
|
282
|
+
class ZeroOrMore < Optional
|
283
|
+
def next( event )
|
284
|
+
expand_ref_in( @events, @current ) if @events[@current].class == Ref
|
285
|
+
if ( @events[@current].matches?(event) )
|
286
|
+
@current += 1
|
287
|
+
if @events[@current].nil?
|
288
|
+
@current = 0
|
289
|
+
return self
|
290
|
+
elsif @events[@current].kind_of? State
|
291
|
+
@current += 1
|
292
|
+
@events[@current-1].previous = self
|
293
|
+
return @events[@current-1]
|
294
|
+
else
|
295
|
+
return self
|
296
|
+
end
|
297
|
+
else
|
298
|
+
@prior = @previous.pop
|
299
|
+
return @prior.next( event ) if @current == 0
|
300
|
+
return nil
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
def expected
|
305
|
+
return [ @prior.expected, @events[0] ].flatten if @current == 0
|
306
|
+
return [@events[@current]]
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
|
311
|
+
class OneOrMore < State
|
312
|
+
def initialize context
|
313
|
+
super
|
314
|
+
@ord = 0
|
315
|
+
end
|
316
|
+
|
317
|
+
def reset
|
318
|
+
super
|
319
|
+
@ord = 0
|
320
|
+
end
|
321
|
+
|
322
|
+
def next( event )
|
323
|
+
expand_ref_in( @events, @current ) if @events[@current].class == Ref
|
324
|
+
if ( @events[@current].matches?(event) )
|
325
|
+
@current += 1
|
326
|
+
@ord += 1
|
327
|
+
if @events[@current].nil?
|
328
|
+
@current = 0
|
329
|
+
return self
|
330
|
+
elsif @events[@current].kind_of? State
|
331
|
+
@current += 1
|
332
|
+
@events[@current-1].previous = self
|
333
|
+
return @events[@current-1]
|
334
|
+
else
|
335
|
+
return self
|
336
|
+
end
|
337
|
+
else
|
338
|
+
return @previous.pop.next( event ) if @current == 0 and @ord > 0
|
339
|
+
return nil
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
def matches?( event )
|
344
|
+
@events[@current].matches?(event) ||
|
345
|
+
(@current == 0 and @ord > 0 and @previous[-1].matches?(event))
|
346
|
+
end
|
347
|
+
|
348
|
+
def expected
|
349
|
+
if @current == 0 and @ord > 0
|
350
|
+
return [@previous[-1].expected, @events[0]].flatten
|
351
|
+
else
|
352
|
+
return [@events[@current]]
|
353
|
+
end
|
354
|
+
end
|
355
|
+
end
|
356
|
+
|
357
|
+
|
358
|
+
class Choice < State
|
359
|
+
def initialize context
|
360
|
+
super
|
361
|
+
@choices = []
|
362
|
+
end
|
363
|
+
|
364
|
+
def reset
|
365
|
+
super
|
366
|
+
@events = []
|
367
|
+
@choices.each { |c| c.each { |s| s.reset if s.kind_of? State } }
|
368
|
+
end
|
369
|
+
|
370
|
+
def <<( event )
|
371
|
+
add_event_to_arry( @choices, event )
|
372
|
+
end
|
373
|
+
|
374
|
+
def next( event )
|
375
|
+
# Make the choice if we haven't
|
376
|
+
if @events.size == 0
|
377
|
+
c = 0 ; max = @choices.size
|
378
|
+
while c < max
|
379
|
+
if @choices[c][0].class == Ref
|
380
|
+
expand_ref_in( @choices[c], 0 )
|
381
|
+
@choices += @choices[c]
|
382
|
+
@choices.delete( @choices[c] )
|
383
|
+
max -= 1
|
384
|
+
else
|
385
|
+
c += 1
|
386
|
+
end
|
387
|
+
end
|
388
|
+
@events = @choices.find { |evt| evt[0].matches? event }
|
389
|
+
# Remove the references
|
390
|
+
# Find the events
|
391
|
+
end
|
392
|
+
unless @events
|
393
|
+
@events = []
|
394
|
+
return nil
|
395
|
+
end
|
396
|
+
super
|
397
|
+
end
|
398
|
+
|
399
|
+
def matches?( event )
|
400
|
+
return @events[@current].matches?( event ) if @events.size > 0
|
401
|
+
!@choices.find{|evt| evt[0].matches?(event)}.nil?
|
402
|
+
end
|
403
|
+
|
404
|
+
def expected
|
405
|
+
return [@events[@current]] if @events.size > 0
|
406
|
+
return @choices.collect do |x|
|
407
|
+
if x[0].kind_of? State
|
408
|
+
x[0].expected
|
409
|
+
else
|
410
|
+
x[0]
|
411
|
+
end
|
412
|
+
end.flatten
|
413
|
+
end
|
414
|
+
|
415
|
+
def inspect
|
416
|
+
"< #{to_s} #{@choices.collect{|e| e.collect{|f|f.to_s}.join(', ')}.join(' or ')} >"
|
417
|
+
end
|
418
|
+
|
419
|
+
protected
|
420
|
+
def add_event_to_arry( arry, evt )
|
421
|
+
if evt.kind_of? State or evt.class == Ref
|
422
|
+
arry << [evt]
|
423
|
+
elsif evt[0] == :text
|
424
|
+
if arry[-1] and
|
425
|
+
arry[-1][-1].kind_of?( Event ) and
|
426
|
+
arry[-1][-1].event_type == :text and @value
|
427
|
+
|
428
|
+
arry[-1][-1].event_arg = evt[1]
|
429
|
+
@value = false
|
430
|
+
end
|
431
|
+
else
|
432
|
+
arry << [] if evt[0] == :start_element
|
433
|
+
arry[-1] << generate_event( evt )
|
434
|
+
end
|
435
|
+
end
|
436
|
+
end
|
437
|
+
|
438
|
+
|
439
|
+
class Interleave < Choice
|
440
|
+
def initialize context
|
441
|
+
super
|
442
|
+
@choice = 0
|
443
|
+
end
|
444
|
+
|
445
|
+
def reset
|
446
|
+
@choice = 0
|
447
|
+
end
|
448
|
+
|
449
|
+
def next_current( event )
|
450
|
+
# Expand references
|
451
|
+
c = 0 ; max = @choices.size
|
452
|
+
while c < max
|
453
|
+
if @choices[c][0].class == Ref
|
454
|
+
expand_ref_in( @choices[c], 0 )
|
455
|
+
@choices += @choices[c]
|
456
|
+
@choices.delete( @choices[c] )
|
457
|
+
max -= 1
|
458
|
+
else
|
459
|
+
c += 1
|
460
|
+
end
|
461
|
+
end
|
462
|
+
@events = @choices[@choice..-1].find { |evt| evt[0].matches? event }
|
463
|
+
@current = 0
|
464
|
+
if @events
|
465
|
+
# reorder the choices
|
466
|
+
old = @choices[@choice]
|
467
|
+
idx = @choices.index( @events )
|
468
|
+
@choices[@choice] = @events
|
469
|
+
@choices[idx] = old
|
470
|
+
@choice += 1
|
471
|
+
end
|
472
|
+
|
473
|
+
@events = [] unless @events
|
474
|
+
end
|
475
|
+
|
476
|
+
|
477
|
+
def next( event )
|
478
|
+
# Find the next series
|
479
|
+
next_current(event) unless @events[@current]
|
480
|
+
return nil unless @events[@current]
|
481
|
+
|
482
|
+
expand_ref_in( @events, @current ) if @events[@current].class == Ref
|
483
|
+
if ( @events[@current].kind_of? State )
|
484
|
+
@current += 1
|
485
|
+
@events[@current-1].previous = self
|
486
|
+
return @events[@current-1].next( event )
|
487
|
+
end
|
488
|
+
return @previous.pop.next( event ) if @events[@current].nil?
|
489
|
+
if ( @events[@current].matches?(event) )
|
490
|
+
@current += 1
|
491
|
+
if @events[@current].nil?
|
492
|
+
return self unless @choices[@choice].nil?
|
493
|
+
return @previous.pop
|
494
|
+
elsif @events[@current].kind_of? State
|
495
|
+
@current += 1
|
496
|
+
@events[@current-1].previous = self
|
497
|
+
return @events[@current-1]
|
498
|
+
else
|
499
|
+
return self
|
500
|
+
end
|
501
|
+
else
|
502
|
+
return nil
|
503
|
+
end
|
504
|
+
end
|
505
|
+
|
506
|
+
def matches?( event )
|
507
|
+
return @events[@current].matches?( event ) if @events[@current]
|
508
|
+
!@choices[@choice..-1].find{|evt| evt[0].matches?(event)}.nil?
|
509
|
+
end
|
510
|
+
|
511
|
+
def expected
|
512
|
+
return [@events[@current]] if @events[@current]
|
513
|
+
return @choices[@choice..-1].collect do |x|
|
514
|
+
if x[0].kind_of? State
|
515
|
+
x[0].expected
|
516
|
+
else
|
517
|
+
x[0]
|
518
|
+
end
|
519
|
+
end.flatten
|
520
|
+
end
|
521
|
+
|
522
|
+
def inspect
|
523
|
+
"< #{to_s} #{@choices.collect{|e| e.collect{|f|f.to_s}.join(', ')}.join(' and ')} >"
|
524
|
+
end
|
525
|
+
end
|
526
|
+
|
527
|
+
class Ref
|
528
|
+
def initialize value
|
529
|
+
@value = value
|
530
|
+
end
|
531
|
+
def to_s
|
532
|
+
@value
|
533
|
+
end
|
534
|
+
def inspect
|
535
|
+
"{#{to_s}}"
|
536
|
+
end
|
537
|
+
end
|
538
|
+
end
|
539
|
+
end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
require_relative 'validationexception'
|
3
|
+
|
4
|
+
module REXML
|
5
|
+
module Validation
|
6
|
+
module Validator
|
7
|
+
NILEVENT = [ nil ]
|
8
|
+
def reset
|
9
|
+
@current = @root
|
10
|
+
@root.reset
|
11
|
+
@root.previous = true
|
12
|
+
@attr_stack = []
|
13
|
+
self
|
14
|
+
end
|
15
|
+
def dump
|
16
|
+
puts @root.inspect
|
17
|
+
end
|
18
|
+
def validate( event )
|
19
|
+
@attr_stack = [] unless defined? @attr_stack
|
20
|
+
match = @current.next(event)
|
21
|
+
raise ValidationException.new( "Validation error. Expected: "+
|
22
|
+
@current.expected.join( " or " )+" from #{@current.inspect} "+
|
23
|
+
" but got #{Event.new( event[0], event[1] ).inspect}" ) unless match
|
24
|
+
@current = match
|
25
|
+
|
26
|
+
# Check for attributes
|
27
|
+
case event[0]
|
28
|
+
when :start_element
|
29
|
+
@attr_stack << event[2]
|
30
|
+
begin
|
31
|
+
sattr = [:start_attribute, nil]
|
32
|
+
eattr = [:end_attribute]
|
33
|
+
text = [:text, nil]
|
34
|
+
k, = event[2].find { |key,value|
|
35
|
+
sattr[1] = key
|
36
|
+
m = @current.next( sattr )
|
37
|
+
if m
|
38
|
+
# If the state has text children...
|
39
|
+
if m.matches?( eattr )
|
40
|
+
@current = m
|
41
|
+
else
|
42
|
+
text[1] = value
|
43
|
+
m = m.next( text )
|
44
|
+
text[1] = nil
|
45
|
+
return false unless m
|
46
|
+
@current = m if m
|
47
|
+
end
|
48
|
+
m = @current.next( eattr )
|
49
|
+
if m
|
50
|
+
@current = m
|
51
|
+
true
|
52
|
+
else
|
53
|
+
false
|
54
|
+
end
|
55
|
+
else
|
56
|
+
false
|
57
|
+
end
|
58
|
+
}
|
59
|
+
event[2].delete(k) if k
|
60
|
+
end while k
|
61
|
+
when :end_element
|
62
|
+
attrs = @attr_stack.pop
|
63
|
+
raise ValidationException.new( "Validation error. Illegal "+
|
64
|
+
" attributes: #{attrs.inspect}") if attrs.length > 0
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
class Event
|
70
|
+
def initialize(event_type, event_arg=nil )
|
71
|
+
@event_type = event_type
|
72
|
+
@event_arg = event_arg
|
73
|
+
end
|
74
|
+
|
75
|
+
attr_reader :event_type
|
76
|
+
attr_accessor :event_arg
|
77
|
+
|
78
|
+
def done?
|
79
|
+
@done
|
80
|
+
end
|
81
|
+
|
82
|
+
def single?
|
83
|
+
return (@event_type != :start_element and @event_type != :start_attribute)
|
84
|
+
end
|
85
|
+
|
86
|
+
def matches?( event )
|
87
|
+
return false unless event[0] == @event_type
|
88
|
+
case event[0]
|
89
|
+
when nil
|
90
|
+
return true
|
91
|
+
when :start_element
|
92
|
+
return true if event[1] == @event_arg
|
93
|
+
when :end_element
|
94
|
+
return true
|
95
|
+
when :start_attribute
|
96
|
+
return true if event[1] == @event_arg
|
97
|
+
when :end_attribute
|
98
|
+
return true
|
99
|
+
when :end_document
|
100
|
+
return true
|
101
|
+
when :text
|
102
|
+
return (@event_arg.nil? or @event_arg == event[1])
|
103
|
+
=begin
|
104
|
+
when :processing_instruction
|
105
|
+
false
|
106
|
+
when :xmldecl
|
107
|
+
false
|
108
|
+
when :start_doctype
|
109
|
+
false
|
110
|
+
when :end_doctype
|
111
|
+
false
|
112
|
+
when :externalentity
|
113
|
+
false
|
114
|
+
when :elementdecl
|
115
|
+
false
|
116
|
+
when :entity
|
117
|
+
false
|
118
|
+
when :attlistdecl
|
119
|
+
false
|
120
|
+
when :notationdecl
|
121
|
+
false
|
122
|
+
when :end_doctype
|
123
|
+
false
|
124
|
+
=end
|
125
|
+
else
|
126
|
+
false
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
def ==( other )
|
131
|
+
return false unless other.kind_of? Event
|
132
|
+
@event_type == other.event_type and @event_arg == other.event_arg
|
133
|
+
end
|
134
|
+
|
135
|
+
def to_s
|
136
|
+
inspect
|
137
|
+
end
|
138
|
+
|
139
|
+
def inspect
|
140
|
+
"#{@event_type.inspect}( #@event_arg )"
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|