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,424 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
require_relative 'security'
|
3
|
+
require_relative 'entity'
|
4
|
+
require_relative 'doctype'
|
5
|
+
require_relative 'child'
|
6
|
+
require_relative 'doctype'
|
7
|
+
require_relative 'parseexception'
|
8
|
+
|
9
|
+
module REXML
|
10
|
+
# Represents text nodes in an XML document
|
11
|
+
class Text < Child
|
12
|
+
include Comparable
|
13
|
+
# The order in which the substitutions occur
|
14
|
+
SPECIALS = [ /&(?!#?[\w-]+;)/u, /</u, />/u, /"/u, /'/u, /\r/u ]
|
15
|
+
SUBSTITUTES = ['&', '<', '>', '"', ''', ' ']
|
16
|
+
# Characters which are substituted in written strings
|
17
|
+
SLAICEPS = [ '<', '>', '"', "'", '&' ]
|
18
|
+
SETUTITSBUS = [ /</u, />/u, /"/u, /'/u, /&/u ]
|
19
|
+
|
20
|
+
# If +raw+ is true, then REXML leaves the value alone
|
21
|
+
attr_accessor :raw
|
22
|
+
|
23
|
+
NEEDS_A_SECOND_CHECK = /(<|&((#{Entity::NAME});|(#0*((?:\d+)|(?:x[a-fA-F0-9]+)));)?)/um
|
24
|
+
NUMERICENTITY = /�*((?:\d+)|(?:x[a-fA-F0-9]+));/
|
25
|
+
VALID_CHAR = [
|
26
|
+
0x9, 0xA, 0xD,
|
27
|
+
(0x20..0xD7FF),
|
28
|
+
(0xE000..0xFFFD),
|
29
|
+
(0x10000..0x10FFFF)
|
30
|
+
]
|
31
|
+
|
32
|
+
if String.method_defined? :encode
|
33
|
+
VALID_XML_CHARS = Regexp.new('^['+
|
34
|
+
VALID_CHAR.map { |item|
|
35
|
+
case item
|
36
|
+
when Integer
|
37
|
+
[item].pack('U').force_encoding('utf-8')
|
38
|
+
when Range
|
39
|
+
[item.first, '-'.ord, item.last].pack('UUU').force_encoding('utf-8')
|
40
|
+
end
|
41
|
+
}.join +
|
42
|
+
']*$')
|
43
|
+
else
|
44
|
+
VALID_XML_CHARS = /^(
|
45
|
+
[\x09\x0A\x0D\x20-\x7E] # ASCII
|
46
|
+
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
|
47
|
+
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
|
48
|
+
| [\xE1-\xEC\xEE][\x80-\xBF]{2} # straight 3-byte
|
49
|
+
| \xEF[\x80-\xBE]{2} #
|
50
|
+
| \xEF\xBF[\x80-\xBD] # excluding U+fffe and U+ffff
|
51
|
+
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
|
52
|
+
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
|
53
|
+
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
|
54
|
+
| \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
|
55
|
+
)*$/nx;
|
56
|
+
end
|
57
|
+
|
58
|
+
# Constructor
|
59
|
+
# +arg+ if a String, the content is set to the String. If a Text,
|
60
|
+
# the object is shallowly cloned.
|
61
|
+
#
|
62
|
+
# +respect_whitespace+ (boolean, false) if true, whitespace is
|
63
|
+
# respected
|
64
|
+
#
|
65
|
+
# +parent+ (nil) if this is a Parent object, the parent
|
66
|
+
# will be set to this.
|
67
|
+
#
|
68
|
+
# +raw+ (nil) This argument can be given three values.
|
69
|
+
# If true, then the value of used to construct this object is expected to
|
70
|
+
# contain no unescaped XML markup, and REXML will not change the text. If
|
71
|
+
# this value is false, the string may contain any characters, and REXML will
|
72
|
+
# escape any and all defined entities whose values are contained in the
|
73
|
+
# text. If this value is nil (the default), then the raw value of the
|
74
|
+
# parent will be used as the raw value for this node. If there is no raw
|
75
|
+
# value for the parent, and no value is supplied, the default is false.
|
76
|
+
# Use this field if you have entities defined for some text, and you don't
|
77
|
+
# want REXML to escape that text in output.
|
78
|
+
# Text.new( "<&", false, nil, false ) #-> "<&"
|
79
|
+
# Text.new( "<&", false, nil, false ) #-> "&lt;&amp;"
|
80
|
+
# Text.new( "<&", false, nil, true ) #-> Parse exception
|
81
|
+
# Text.new( "<&", false, nil, true ) #-> "<&"
|
82
|
+
# # Assume that the entity "s" is defined to be "sean"
|
83
|
+
# # and that the entity "r" is defined to be "russell"
|
84
|
+
# Text.new( "sean russell" ) #-> "&s; &r;"
|
85
|
+
# Text.new( "sean russell", false, nil, true ) #-> "sean russell"
|
86
|
+
#
|
87
|
+
# +entity_filter+ (nil) This can be an array of entities to match in the
|
88
|
+
# supplied text. This argument is only useful if +raw+ is set to false.
|
89
|
+
# Text.new( "sean russell", false, nil, false, ["s"] ) #-> "&s; russell"
|
90
|
+
# Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell"
|
91
|
+
# In the last example, the +entity_filter+ argument is ignored.
|
92
|
+
#
|
93
|
+
# +illegal+ INTERNAL USE ONLY
|
94
|
+
def initialize(arg, respect_whitespace=false, parent=nil, raw=nil,
|
95
|
+
entity_filter=nil, illegal=NEEDS_A_SECOND_CHECK )
|
96
|
+
|
97
|
+
@raw = false
|
98
|
+
@parent = nil
|
99
|
+
@entity_filter = nil
|
100
|
+
|
101
|
+
if parent
|
102
|
+
super( parent )
|
103
|
+
@raw = parent.raw
|
104
|
+
end
|
105
|
+
|
106
|
+
if arg.kind_of? String
|
107
|
+
@string = arg.dup
|
108
|
+
elsif arg.kind_of? Text
|
109
|
+
@string = arg.instance_variable_get(:@string).dup
|
110
|
+
@raw = arg.raw
|
111
|
+
@entity_filter = arg.instance_variable_get(:@entity_filter)
|
112
|
+
else
|
113
|
+
raise "Illegal argument of type #{arg.type} for Text constructor (#{arg})"
|
114
|
+
end
|
115
|
+
|
116
|
+
@string.squeeze!(" \n\t") unless respect_whitespace
|
117
|
+
@string.gsub!(/\r\n?/, "\n")
|
118
|
+
@raw = raw unless raw.nil?
|
119
|
+
@entity_filter = entity_filter if entity_filter
|
120
|
+
clear_cache
|
121
|
+
|
122
|
+
Text.check(@string, illegal, doctype) if @raw
|
123
|
+
end
|
124
|
+
|
125
|
+
def parent= parent
|
126
|
+
super(parent)
|
127
|
+
Text.check(@string, NEEDS_A_SECOND_CHECK, doctype) if @raw and @parent
|
128
|
+
end
|
129
|
+
|
130
|
+
# check for illegal characters
|
131
|
+
def Text.check string, pattern, doctype
|
132
|
+
|
133
|
+
# illegal anywhere
|
134
|
+
if string !~ VALID_XML_CHARS
|
135
|
+
if String.method_defined? :encode
|
136
|
+
string.chars.each do |c|
|
137
|
+
case c.ord
|
138
|
+
when *VALID_CHAR
|
139
|
+
else
|
140
|
+
raise "Illegal character #{c.inspect} in raw string #{string.inspect}"
|
141
|
+
end
|
142
|
+
end
|
143
|
+
else
|
144
|
+
string.scan(/[\x00-\x7F]|[\x80-\xBF][\xC0-\xF0]*|[\xC0-\xF0]/n) do |c|
|
145
|
+
case c.unpack('U')
|
146
|
+
when *VALID_CHAR
|
147
|
+
else
|
148
|
+
raise "Illegal character #{c.inspect} in raw string #{string.inspect}"
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
# context sensitive
|
155
|
+
string.scan(pattern) do
|
156
|
+
if $1[-1] != ?;
|
157
|
+
raise "Illegal character #{$1.inspect} in raw string #{string.inspect}"
|
158
|
+
elsif $1[0] == ?&
|
159
|
+
if $5 and $5[0] == ?#
|
160
|
+
case ($5[1] == ?x ? $5[2..-1].to_i(16) : $5[1..-1].to_i)
|
161
|
+
when *VALID_CHAR
|
162
|
+
else
|
163
|
+
raise "Illegal character #{$1.inspect} in raw string #{string.inspect}"
|
164
|
+
end
|
165
|
+
# FIXME: below can't work but this needs API change.
|
166
|
+
# elsif @parent and $3 and !SUBSTITUTES.include?($1)
|
167
|
+
# if !doctype or !doctype.entities.has_key?($3)
|
168
|
+
# raise "Undeclared entity '#{$1}' in raw string \"#{string}\""
|
169
|
+
# end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
def node_type
|
176
|
+
:text
|
177
|
+
end
|
178
|
+
|
179
|
+
def empty?
|
180
|
+
@string.size==0
|
181
|
+
end
|
182
|
+
|
183
|
+
|
184
|
+
def clone
|
185
|
+
return Text.new(self, true)
|
186
|
+
end
|
187
|
+
|
188
|
+
|
189
|
+
# Appends text to this text node. The text is appended in the +raw+ mode
|
190
|
+
# of this text node.
|
191
|
+
#
|
192
|
+
# +returns+ the text itself to enable method chain like
|
193
|
+
# 'text << "XXX" << "YYY"'.
|
194
|
+
def <<( to_append )
|
195
|
+
@string << to_append.gsub( /\r\n?/, "\n" )
|
196
|
+
clear_cache
|
197
|
+
self
|
198
|
+
end
|
199
|
+
|
200
|
+
|
201
|
+
# +other+ a String or a Text
|
202
|
+
# +returns+ the result of (to_s <=> arg.to_s)
|
203
|
+
def <=>( other )
|
204
|
+
to_s() <=> other.to_s
|
205
|
+
end
|
206
|
+
|
207
|
+
def doctype
|
208
|
+
if @parent
|
209
|
+
doc = @parent.document
|
210
|
+
doc.doctype if doc
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
REFERENCE = /#{Entity::REFERENCE}/
|
215
|
+
# Returns the string value of this text node. This string is always
|
216
|
+
# escaped, meaning that it is a valid XML text node string, and all
|
217
|
+
# entities that can be escaped, have been inserted. This method respects
|
218
|
+
# the entity filter set in the constructor.
|
219
|
+
#
|
220
|
+
# # Assume that the entity "s" is defined to be "sean", and that the
|
221
|
+
# # entity "r" is defined to be "russell"
|
222
|
+
# t = Text.new( "< & sean russell", false, nil, false, ['s'] )
|
223
|
+
# t.to_s #-> "< & &s; russell"
|
224
|
+
# t = Text.new( "< & &s; russell", false, nil, false )
|
225
|
+
# t.to_s #-> "< & &s; russell"
|
226
|
+
# u = Text.new( "sean russell", false, nil, true )
|
227
|
+
# u.to_s #-> "sean russell"
|
228
|
+
def to_s
|
229
|
+
return @string if @raw
|
230
|
+
@normalized ||= Text::normalize( @string, doctype, @entity_filter )
|
231
|
+
end
|
232
|
+
|
233
|
+
def inspect
|
234
|
+
@string.inspect
|
235
|
+
end
|
236
|
+
|
237
|
+
# Returns the string value of this text. This is the text without
|
238
|
+
# entities, as it might be used programmatically, or printed to the
|
239
|
+
# console. This ignores the 'raw' attribute setting, and any
|
240
|
+
# entity_filter.
|
241
|
+
#
|
242
|
+
# # Assume that the entity "s" is defined to be "sean", and that the
|
243
|
+
# # entity "r" is defined to be "russell"
|
244
|
+
# t = Text.new( "< & sean russell", false, nil, false, ['s'] )
|
245
|
+
# t.value #-> "< & sean russell"
|
246
|
+
# t = Text.new( "< & &s; russell", false, nil, false )
|
247
|
+
# t.value #-> "< & sean russell"
|
248
|
+
# u = Text.new( "sean russell", false, nil, true )
|
249
|
+
# u.value #-> "sean russell"
|
250
|
+
def value
|
251
|
+
@unnormalized ||= Text::unnormalize( @string, doctype )
|
252
|
+
end
|
253
|
+
|
254
|
+
# Sets the contents of this text node. This expects the text to be
|
255
|
+
# unnormalized. It returns self.
|
256
|
+
#
|
257
|
+
# e = Element.new( "a" )
|
258
|
+
# e.add_text( "foo" ) # <a>foo</a>
|
259
|
+
# e[0].value = "bar" # <a>bar</a>
|
260
|
+
# e[0].value = "<a>" # <a><a></a>
|
261
|
+
def value=( val )
|
262
|
+
@string = val.gsub( /\r\n?/, "\n" )
|
263
|
+
clear_cache
|
264
|
+
@raw = false
|
265
|
+
end
|
266
|
+
|
267
|
+
def wrap(string, width, addnewline=false)
|
268
|
+
# Recursively wrap string at width.
|
269
|
+
return string if string.length <= width
|
270
|
+
place = string.rindex(' ', width) # Position in string with last ' ' before cutoff
|
271
|
+
if addnewline then
|
272
|
+
return "\n" + string[0,place] + "\n" + wrap(string[place+1..-1], width)
|
273
|
+
else
|
274
|
+
return string[0,place] + "\n" + wrap(string[place+1..-1], width)
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
def indent_text(string, level=1, style="\t", indentfirstline=true)
|
279
|
+
return string if level < 0
|
280
|
+
new_string = ''
|
281
|
+
string.each_line { |line|
|
282
|
+
indent_string = style * level
|
283
|
+
new_line = (indent_string + line).sub(/[\s]+$/,'')
|
284
|
+
new_string << new_line
|
285
|
+
}
|
286
|
+
new_string.strip! unless indentfirstline
|
287
|
+
return new_string
|
288
|
+
end
|
289
|
+
|
290
|
+
# == DEPRECATED
|
291
|
+
# See REXML::Formatters
|
292
|
+
#
|
293
|
+
def write( writer, indent=-1, transitive=false, ie_hack=false )
|
294
|
+
Kernel.warn("#{self.class.name}.write is deprecated. See REXML::Formatters", uplevel: 1)
|
295
|
+
formatter = if indent > -1
|
296
|
+
REXML::Formatters::Pretty.new( indent )
|
297
|
+
else
|
298
|
+
REXML::Formatters::Default.new
|
299
|
+
end
|
300
|
+
formatter.write( self, writer )
|
301
|
+
end
|
302
|
+
|
303
|
+
# FIXME
|
304
|
+
# This probably won't work properly
|
305
|
+
def xpath
|
306
|
+
path = @parent.xpath
|
307
|
+
path += "/text()"
|
308
|
+
return path
|
309
|
+
end
|
310
|
+
|
311
|
+
# Writes out text, substituting special characters beforehand.
|
312
|
+
# +out+ A String, IO, or any other object supporting <<( String )
|
313
|
+
# +input+ the text to substitute and the write out
|
314
|
+
#
|
315
|
+
# z=utf8.unpack("U*")
|
316
|
+
# ascOut=""
|
317
|
+
# z.each{|r|
|
318
|
+
# if r < 0x100
|
319
|
+
# ascOut.concat(r.chr)
|
320
|
+
# else
|
321
|
+
# ascOut.concat(sprintf("&#x%x;", r))
|
322
|
+
# end
|
323
|
+
# }
|
324
|
+
# puts ascOut
|
325
|
+
def write_with_substitution out, input
|
326
|
+
copy = input.clone
|
327
|
+
# Doing it like this rather than in a loop improves the speed
|
328
|
+
copy.gsub!( SPECIALS[0], SUBSTITUTES[0] )
|
329
|
+
copy.gsub!( SPECIALS[1], SUBSTITUTES[1] )
|
330
|
+
copy.gsub!( SPECIALS[2], SUBSTITUTES[2] )
|
331
|
+
copy.gsub!( SPECIALS[3], SUBSTITUTES[3] )
|
332
|
+
copy.gsub!( SPECIALS[4], SUBSTITUTES[4] )
|
333
|
+
copy.gsub!( SPECIALS[5], SUBSTITUTES[5] )
|
334
|
+
out << copy
|
335
|
+
end
|
336
|
+
|
337
|
+
private
|
338
|
+
def clear_cache
|
339
|
+
@normalized = nil
|
340
|
+
@unnormalized = nil
|
341
|
+
end
|
342
|
+
|
343
|
+
# Reads text, substituting entities
|
344
|
+
def Text::read_with_substitution( input, illegal=nil )
|
345
|
+
copy = input.clone
|
346
|
+
|
347
|
+
if copy =~ illegal
|
348
|
+
raise ParseException.new( "malformed text: Illegal character #$& in \"#{copy}\"" )
|
349
|
+
end if illegal
|
350
|
+
|
351
|
+
copy.gsub!( /\r\n?/, "\n" )
|
352
|
+
if copy.include? ?&
|
353
|
+
copy.gsub!( SETUTITSBUS[0], SLAICEPS[0] )
|
354
|
+
copy.gsub!( SETUTITSBUS[1], SLAICEPS[1] )
|
355
|
+
copy.gsub!( SETUTITSBUS[2], SLAICEPS[2] )
|
356
|
+
copy.gsub!( SETUTITSBUS[3], SLAICEPS[3] )
|
357
|
+
copy.gsub!( SETUTITSBUS[4], SLAICEPS[4] )
|
358
|
+
copy.gsub!( /�*((?:\d+)|(?:x[a-f0-9]+));/ ) {
|
359
|
+
m=$1
|
360
|
+
#m='0' if m==''
|
361
|
+
m = "0#{m}" if m[0] == ?x
|
362
|
+
[Integer(m)].pack('U*')
|
363
|
+
}
|
364
|
+
end
|
365
|
+
copy
|
366
|
+
end
|
367
|
+
|
368
|
+
EREFERENCE = /&(?!#{Entity::NAME};)/
|
369
|
+
# Escapes all possible entities
|
370
|
+
def Text::normalize( input, doctype=nil, entity_filter=nil )
|
371
|
+
copy = input.to_s
|
372
|
+
# Doing it like this rather than in a loop improves the speed
|
373
|
+
#copy = copy.gsub( EREFERENCE, '&' )
|
374
|
+
copy = copy.gsub( "&", "&" )
|
375
|
+
if doctype
|
376
|
+
# Replace all ampersands that aren't part of an entity
|
377
|
+
doctype.entities.each_value do |entity|
|
378
|
+
copy = copy.gsub( entity.value,
|
379
|
+
"&#{entity.name};" ) if entity.value and
|
380
|
+
not( entity_filter and entity_filter.include?(entity.name) )
|
381
|
+
end
|
382
|
+
else
|
383
|
+
# Replace all ampersands that aren't part of an entity
|
384
|
+
DocType::DEFAULT_ENTITIES.each_value do |entity|
|
385
|
+
copy = copy.gsub(entity.value, "&#{entity.name};" )
|
386
|
+
end
|
387
|
+
end
|
388
|
+
copy
|
389
|
+
end
|
390
|
+
|
391
|
+
# Unescapes all possible entities
|
392
|
+
def Text::unnormalize( string, doctype=nil, filter=nil, illegal=nil )
|
393
|
+
sum = 0
|
394
|
+
string.gsub( /\r\n?/, "\n" ).gsub( REFERENCE ) {
|
395
|
+
s = Text.expand($&, doctype, filter)
|
396
|
+
if sum + s.bytesize > Security.entity_expansion_text_limit
|
397
|
+
raise "entity expansion has grown too large"
|
398
|
+
else
|
399
|
+
sum += s.bytesize
|
400
|
+
end
|
401
|
+
s
|
402
|
+
}
|
403
|
+
end
|
404
|
+
|
405
|
+
def Text.expand(ref, doctype, filter)
|
406
|
+
if ref[1] == ?#
|
407
|
+
if ref[2] == ?x
|
408
|
+
[ref[3...-1].to_i(16)].pack('U*')
|
409
|
+
else
|
410
|
+
[ref[2...-1].to_i].pack('U*')
|
411
|
+
end
|
412
|
+
elsif ref == '&'
|
413
|
+
'&'
|
414
|
+
elsif filter and filter.include?( ref[1...-1] )
|
415
|
+
ref
|
416
|
+
elsif doctype
|
417
|
+
doctype.entity( ref[1...-1] ) or ref
|
418
|
+
else
|
419
|
+
entity_value = DocType::DEFAULT_ENTITIES[ ref[1...-1] ]
|
420
|
+
entity_value ? entity_value.value : ref
|
421
|
+
end
|
422
|
+
end
|
423
|
+
end
|
424
|
+
end
|