brakeman 6.2.2 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +17 -0
- data/bundle/load.rb +7 -6
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/LICENSE.txt +33 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/NEWS.md +965 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/README.md +55 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/core_ext/array.rb +9 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/core_ext/string.rb +9 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/fields_converter.rb +96 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/input_record_separator.rb +18 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/parser.rb +1292 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/row.rb +757 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/table.rb +1055 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/version.rb +6 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/writer.rb +209 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv.rb +3017 -0
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/config.rb +22 -26
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/history.rb +3 -3
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/ansi.rb +64 -111
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/dumb.rb +16 -2
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/windows.rb +77 -60
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io.rb +14 -0
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/base.rb +10 -4
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/emacs.rb +96 -96
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/vi_command.rb +182 -182
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/vi_insert.rb +137 -137
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_stroke.rb +26 -16
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/line_editor.rb +238 -404
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/unicode.rb +415 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/version.rb +3 -0
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline.rb +18 -18
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/NEWS.md +50 -0
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/baseparser.rb +54 -45
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/pullparser.rb +4 -0
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/rexml.rb +1 -1
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/source.rb +45 -4
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/text.rb +15 -40
- data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/History.rdoc +6 -0
- data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp.rb +1 -1
- data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/History.rdoc +142 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/README.md +417 -0
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/cell.rb +8 -8
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/row.rb +18 -4
- data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/separator.rb +66 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/style.rb +284 -0
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/table.rb +47 -18
- data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/util.rb +13 -0
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/version.rb +1 -1
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table.rb +2 -2
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/terminal-table.gemspec +3 -3
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/creole.rb +2 -0
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/liquid.rb +0 -3
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/mapping.rb +3 -3
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/rdoc.rb +0 -8
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/template.rb +27 -3
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt.rb +1 -4
- data/bundle/ruby/3.1.0/gems/{unicode-display_width-1.8.0 → unicode-display_width-2.6.0}/CHANGELOG.md +65 -2
- data/bundle/ruby/3.1.0/gems/{unicode-display_width-1.8.0 → unicode-display_width-2.6.0}/MIT-LICENSE.txt +1 -1
- data/bundle/ruby/3.1.0/gems/{unicode-display_width-1.8.0 → unicode-display_width-2.6.0}/README.md +67 -20
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/constants.rb +10 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/index.rb +34 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/no_string_ext.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/string_ext.rb +9 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width.rb +123 -0
- data/lib/brakeman/app_tree.rb +23 -18
- data/lib/brakeman/checks/check_deserialize.rb +4 -1
- data/lib/brakeman/checks/check_evaluation.rb +20 -2
- data/lib/brakeman/checks/check_model_attr_accessible.rb +1 -0
- data/lib/brakeman/file_parser.rb +2 -1
- data/lib/brakeman/options.rb +8 -5
- data/lib/brakeman/processors/alias_processor.rb +6 -2
- data/lib/brakeman/processors/lib/file_type_detector.rb +9 -7
- data/lib/brakeman/report/ignore/config.rb +0 -1
- data/lib/brakeman/report/report_sarif.rb +122 -2
- data/lib/brakeman/rescanner.rb +40 -390
- data/lib/brakeman/scanner.rb +62 -38
- data/lib/brakeman/tracker/file_cache.rb +83 -0
- data/lib/brakeman/tracker.rb +19 -2
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman.rb +12 -2
- metadata +170 -160
- data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/terminfo.rb +0 -158
- data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/unicode.rb +0 -671
- data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/version.rb +0 -3
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/History.rdoc +0 -85
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/README.rdoc +0 -247
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -14
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -79
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/erubis.rb +0 -51
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/maruku.rb +0 -10
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/wikicloth.rb +0 -12
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/constants.rb +0 -8
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/index.rb +0 -12
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/no_string_ext.rb +0 -7
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/string_ext.rb +0 -17
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb +0 -51
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/BSDL +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/COPYING +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/README.md +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/face.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/composite.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/kill_ring.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/unicode/east_asian_width.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/license_of_rb-readline +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/LICENSE.txt +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/README.md +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/attlistdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/attribute.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/cdata.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/child.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/comment.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/doctype.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/document.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/dtd/attlistdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/dtd/dtd.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/dtd/elementdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/dtd/entitydecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/dtd/notationdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/element.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/encoding.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/entity.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/formatters/default.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/formatters/pretty.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/formatters/transitive.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/functions.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/instruction.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/light/node.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/namespace.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/node.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/output.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parent.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parseexception.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/lightparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/sax2parser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/streamparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/treeparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/ultralightparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/xpathparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/quickpath.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/sax2listener.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/security.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/streamlistener.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/undefinednamespaceexception.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/validation/relaxng.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/validation/validation.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/validation/validationexception.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/xmldecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/xmltokens.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/xpath.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/xpath_parser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/Manifest.txt +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/README.rdoc +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/composite_sexp_processor.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/pt_testcase.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp_matcher.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/strict_sexp.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/unique.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/Gemfile +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/LICENSE.txt +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/Manifest +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/Todo.rdoc +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/import.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/table_helper.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/COPYING +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/_emacs_org.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/_handlebars.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/_jbuilder.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/_org.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/asciidoc.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/babel.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/builder.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/cli.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/coffee.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/commonmarker.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/csv.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/erb.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/erubi.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/etanni.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/haml.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/kramdown.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/livescript.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/markaby.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/nokogiri.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/pandoc.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/pipeline.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/plain.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/prawn.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/radius.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/rdiscount.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/redcarpet.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/redcloth.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/rst-pandoc.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/sass.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/slim.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/string.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/typescript.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/yajl.rb +0 -0
@@ -150,7 +150,7 @@ module REXML
|
|
150
150
|
PEDECL_PATTERN = "\\s+(%)\\s+#{NAME}\\s+#{PEDEF}\\s*>"
|
151
151
|
ENTITYDECL_PATTERN = /(?:#{GEDECL_PATTERN})|(?:#{PEDECL_PATTERN})/um
|
152
152
|
CARRIAGE_RETURN_NEWLINE_PATTERN = /\r\n?/
|
153
|
-
CHARACTER_REFERENCES = /&#
|
153
|
+
CHARACTER_REFERENCES = /&#((?:\d+)|(?:x[a-fA-F0-9]+));/
|
154
154
|
DEFAULT_ENTITIES_PATTERNS = {}
|
155
155
|
default_entities = ['gt', 'lt', 'quot', 'apos', 'amp']
|
156
156
|
default_entities.each do |term|
|
@@ -167,6 +167,7 @@ module REXML
|
|
167
167
|
@entity_expansion_count = 0
|
168
168
|
@entity_expansion_limit = Security.entity_expansion_limit
|
169
169
|
@entity_expansion_text_limit = Security.entity_expansion_text_limit
|
170
|
+
@source.ensure_buffer
|
170
171
|
end
|
171
172
|
|
172
173
|
def add_listener( listener )
|
@@ -180,6 +181,10 @@ module REXML
|
|
180
181
|
|
181
182
|
def stream=( source )
|
182
183
|
@source = SourceFactory.create_from( source )
|
184
|
+
reset
|
185
|
+
end
|
186
|
+
|
187
|
+
def reset
|
183
188
|
@closed = nil
|
184
189
|
@have_root = false
|
185
190
|
@document_status = nil
|
@@ -268,10 +273,10 @@ module REXML
|
|
268
273
|
@source.ensure_buffer
|
269
274
|
if @document_status == nil
|
270
275
|
start_position = @source.position
|
271
|
-
if @source.match("<?", true)
|
276
|
+
if @source.match?("<?", true)
|
272
277
|
return process_instruction
|
273
|
-
elsif @source.match("<!", true)
|
274
|
-
if @source.match("--", true)
|
278
|
+
elsif @source.match?("<!", true)
|
279
|
+
if @source.match?("--", true)
|
275
280
|
md = @source.match(/(.*?)-->/um, true)
|
276
281
|
if md.nil?
|
277
282
|
raise REXML::ParseException.new("Unclosed comment", @source)
|
@@ -280,10 +285,10 @@ module REXML
|
|
280
285
|
raise REXML::ParseException.new("Malformed comment", @source)
|
281
286
|
end
|
282
287
|
return [ :comment, md[1] ]
|
283
|
-
elsif @source.match("DOCTYPE", true)
|
288
|
+
elsif @source.match?("DOCTYPE", true)
|
284
289
|
base_error_message = "Malformed DOCTYPE"
|
285
|
-
unless @source.match(/\s+/um, true)
|
286
|
-
if @source.match(">")
|
290
|
+
unless @source.match?(/\s+/um, true)
|
291
|
+
if @source.match?(">")
|
287
292
|
message = "#{base_error_message}: name is missing"
|
288
293
|
else
|
289
294
|
message = "#{base_error_message}: invalid name"
|
@@ -292,10 +297,10 @@ module REXML
|
|
292
297
|
raise REXML::ParseException.new(message, @source)
|
293
298
|
end
|
294
299
|
name = parse_name(base_error_message)
|
295
|
-
if @source.match(/\s*\[/um, true)
|
300
|
+
if @source.match?(/\s*\[/um, true)
|
296
301
|
id = [nil, nil, nil]
|
297
302
|
@document_status = :in_doctype
|
298
|
-
elsif @source.match(/\s*>/um, true)
|
303
|
+
elsif @source.match?(/\s*>/um, true)
|
299
304
|
id = [nil, nil, nil]
|
300
305
|
@document_status = :after_doctype
|
301
306
|
@source.ensure_buffer
|
@@ -307,9 +312,9 @@ module REXML
|
|
307
312
|
# For backward compatibility
|
308
313
|
id[1], id[2] = id[2], nil
|
309
314
|
end
|
310
|
-
if @source.match(/\s*\[/um, true)
|
315
|
+
if @source.match?(/\s*\[/um, true)
|
311
316
|
@document_status = :in_doctype
|
312
|
-
elsif @source.match(/\s*>/um, true)
|
317
|
+
elsif @source.match?(/\s*>/um, true)
|
313
318
|
@document_status = :after_doctype
|
314
319
|
@source.ensure_buffer
|
315
320
|
else
|
@@ -319,7 +324,7 @@ module REXML
|
|
319
324
|
end
|
320
325
|
args = [:start_doctype, name, *id]
|
321
326
|
if @document_status == :after_doctype
|
322
|
-
@source.match(/\s*/um, true)
|
327
|
+
@source.match?(/\s*/um, true)
|
323
328
|
@stack << [ :end_doctype ]
|
324
329
|
end
|
325
330
|
return args
|
@@ -330,14 +335,14 @@ module REXML
|
|
330
335
|
end
|
331
336
|
end
|
332
337
|
if @document_status == :in_doctype
|
333
|
-
@source.match(/\s*/um, true) # skip spaces
|
338
|
+
@source.match?(/\s*/um, true) # skip spaces
|
334
339
|
start_position = @source.position
|
335
|
-
if @source.match("<!", true)
|
336
|
-
if @source.match("ELEMENT", true)
|
340
|
+
if @source.match?("<!", true)
|
341
|
+
if @source.match?("ELEMENT", true)
|
337
342
|
md = @source.match(/(.*?)>/um, true)
|
338
343
|
raise REXML::ParseException.new( "Bad ELEMENT declaration!", @source ) if md.nil?
|
339
344
|
return [ :elementdecl, "<!ELEMENT" + md[1] ]
|
340
|
-
elsif @source.match("ENTITY", true)
|
345
|
+
elsif @source.match?("ENTITY", true)
|
341
346
|
match_data = @source.match(Private::ENTITYDECL_PATTERN, true)
|
342
347
|
unless match_data
|
343
348
|
raise REXML::ParseException.new("Malformed entity declaration", @source)
|
@@ -369,7 +374,7 @@ module REXML
|
|
369
374
|
end
|
370
375
|
match << '%' if ref
|
371
376
|
return match
|
372
|
-
elsif @source.match("ATTLIST", true)
|
377
|
+
elsif @source.match?("ATTLIST", true)
|
373
378
|
md = @source.match(Private::ATTLISTDECL_END, true)
|
374
379
|
raise REXML::ParseException.new( "Bad ATTLIST declaration!", @source ) if md.nil?
|
375
380
|
element = md[1]
|
@@ -389,10 +394,10 @@ module REXML
|
|
389
394
|
end
|
390
395
|
end
|
391
396
|
return [ :attlistdecl, element, pairs, contents ]
|
392
|
-
elsif @source.match("NOTATION", true)
|
397
|
+
elsif @source.match?("NOTATION", true)
|
393
398
|
base_error_message = "Malformed notation declaration"
|
394
|
-
unless @source.match(/\s+/um, true)
|
395
|
-
if @source.match(">")
|
399
|
+
unless @source.match?(/\s+/um, true)
|
400
|
+
if @source.match?(">")
|
396
401
|
message = "#{base_error_message}: name is missing"
|
397
402
|
else
|
398
403
|
message = "#{base_error_message}: invalid name"
|
@@ -404,7 +409,7 @@ module REXML
|
|
404
409
|
id = parse_id(base_error_message,
|
405
410
|
accept_external_id: true,
|
406
411
|
accept_public_id: true)
|
407
|
-
unless @source.match(/\s*>/um, true)
|
412
|
+
unless @source.match?(/\s*>/um, true)
|
408
413
|
message = "#{base_error_message}: garbage before end >"
|
409
414
|
raise REXML::ParseException.new(message, @source)
|
410
415
|
end
|
@@ -418,7 +423,7 @@ module REXML
|
|
418
423
|
end
|
419
424
|
elsif match = @source.match(/(%.*?;)\s*/um, true)
|
420
425
|
return [ :externalentity, match[1] ]
|
421
|
-
elsif @source.match(/\]\s*>/um, true)
|
426
|
+
elsif @source.match?(/\]\s*>/um, true)
|
422
427
|
@document_status = :after_doctype
|
423
428
|
return [ :end_doctype ]
|
424
429
|
end
|
@@ -427,16 +432,16 @@ module REXML
|
|
427
432
|
end
|
428
433
|
end
|
429
434
|
if @document_status == :after_doctype
|
430
|
-
@source.match(/\s*/um, true)
|
435
|
+
@source.match?(/\s*/um, true)
|
431
436
|
end
|
432
437
|
begin
|
433
438
|
start_position = @source.position
|
434
|
-
if @source.match("<", true)
|
439
|
+
if @source.match?("<", true)
|
435
440
|
# :text's read_until may remain only "<" in buffer. In the
|
436
441
|
# case, buffer is empty here. So we need to fill buffer
|
437
442
|
# here explicitly.
|
438
443
|
@source.ensure_buffer
|
439
|
-
if @source.match("/", true)
|
444
|
+
if @source.match?("/", true)
|
440
445
|
@namespaces_restore_stack.pop
|
441
446
|
last_tag = @tags.pop
|
442
447
|
md = @source.match(Private::CLOSE_PATTERN, true)
|
@@ -451,7 +456,7 @@ module REXML
|
|
451
456
|
raise REXML::ParseException.new(message, @source)
|
452
457
|
end
|
453
458
|
return [ :end_element, last_tag ]
|
454
|
-
elsif @source.match("!", true)
|
459
|
+
elsif @source.match?("!", true)
|
455
460
|
md = @source.match(/([^>]*>)/um)
|
456
461
|
#STDERR.puts "SOURCE BUFFER = #{source.buffer}, #{source.buffer.size}"
|
457
462
|
raise REXML::ParseException.new("Malformed node", @source) unless md
|
@@ -469,7 +474,7 @@ module REXML
|
|
469
474
|
end
|
470
475
|
raise REXML::ParseException.new( "Declarations can only occur "+
|
471
476
|
"in the doctype declaration.", @source)
|
472
|
-
elsif @source.match("?", true)
|
477
|
+
elsif @source.match?("?", true)
|
473
478
|
return process_instruction
|
474
479
|
else
|
475
480
|
# Get the next tag
|
@@ -569,8 +574,12 @@ module REXML
|
|
569
574
|
return rv if matches.size == 0
|
570
575
|
rv.gsub!( Private::CHARACTER_REFERENCES ) {
|
571
576
|
m=$1
|
572
|
-
|
573
|
-
|
577
|
+
if m.start_with?("x")
|
578
|
+
code_point = Integer(m[1..-1], 16)
|
579
|
+
else
|
580
|
+
code_point = Integer(m, 10)
|
581
|
+
end
|
582
|
+
[code_point].pack('U*')
|
574
583
|
}
|
575
584
|
matches.collect!{|x|x[0]}.compact!
|
576
585
|
if filter
|
@@ -646,7 +655,7 @@ module REXML
|
|
646
655
|
def parse_name(base_error_message)
|
647
656
|
md = @source.match(Private::NAME_PATTERN, true)
|
648
657
|
unless md
|
649
|
-
if @source.match(/\S/um)
|
658
|
+
if @source.match?(/\S/um)
|
650
659
|
message = "#{base_error_message}: invalid name"
|
651
660
|
else
|
652
661
|
message = "#{base_error_message}: name is missing"
|
@@ -688,34 +697,34 @@ module REXML
|
|
688
697
|
accept_public_id:)
|
689
698
|
public = /\A\s*PUBLIC/um
|
690
699
|
system = /\A\s*SYSTEM/um
|
691
|
-
if (accept_external_id or accept_public_id) and @source.match(/#{public}/um)
|
692
|
-
if @source.match(/#{public}(?:\s+[^'"]|\s*[\[>])/um)
|
700
|
+
if (accept_external_id or accept_public_id) and @source.match?(/#{public}/um)
|
701
|
+
if @source.match?(/#{public}(?:\s+[^'"]|\s*[\[>])/um)
|
693
702
|
return "public ID literal is missing"
|
694
703
|
end
|
695
|
-
unless @source.match(/#{public}\s+#{PUBIDLITERAL}/um)
|
704
|
+
unless @source.match?(/#{public}\s+#{PUBIDLITERAL}/um)
|
696
705
|
return "invalid public ID literal"
|
697
706
|
end
|
698
707
|
if accept_public_id
|
699
|
-
if @source.match(/#{public}\s+#{PUBIDLITERAL}\s+[^'"]/um)
|
708
|
+
if @source.match?(/#{public}\s+#{PUBIDLITERAL}\s+[^'"]/um)
|
700
709
|
return "system ID literal is missing"
|
701
710
|
end
|
702
|
-
unless @source.match(/#{public}\s+#{PUBIDLITERAL}\s+#{SYSTEMLITERAL}/um)
|
711
|
+
unless @source.match?(/#{public}\s+#{PUBIDLITERAL}\s+#{SYSTEMLITERAL}/um)
|
703
712
|
return "invalid system literal"
|
704
713
|
end
|
705
714
|
"garbage after system literal"
|
706
715
|
else
|
707
716
|
"garbage after public ID literal"
|
708
717
|
end
|
709
|
-
elsif accept_external_id and @source.match(/#{system}/um)
|
710
|
-
if @source.match(/#{system}(?:\s+[^'"]|\s*[\[>])/um)
|
718
|
+
elsif accept_external_id and @source.match?(/#{system}/um)
|
719
|
+
if @source.match?(/#{system}(?:\s+[^'"]|\s*[\[>])/um)
|
711
720
|
return "system literal is missing"
|
712
721
|
end
|
713
|
-
unless @source.match(/#{system}\s+#{SYSTEMLITERAL}/um)
|
722
|
+
unless @source.match?(/#{system}\s+#{SYSTEMLITERAL}/um)
|
714
723
|
return "invalid system literal"
|
715
724
|
end
|
716
725
|
"garbage after system literal"
|
717
726
|
else
|
718
|
-
unless @source.match(/\A\s*(?:PUBLIC|SYSTEM)\s/um)
|
727
|
+
unless @source.match?(/\A\s*(?:PUBLIC|SYSTEM)\s/um)
|
719
728
|
return "invalid ID type"
|
720
729
|
end
|
721
730
|
"ID type is missing"
|
@@ -724,7 +733,7 @@ module REXML
|
|
724
733
|
|
725
734
|
def process_instruction
|
726
735
|
name = parse_name("Malformed XML: Invalid processing instruction node")
|
727
|
-
if @source.match(/\s+/um, true)
|
736
|
+
if @source.match?(/\s+/um, true)
|
728
737
|
match_data = @source.match(/(.*?)\?>/um, true)
|
729
738
|
unless match_data
|
730
739
|
raise ParseException.new("Malformed XML: Unclosed processing instruction", @source)
|
@@ -732,7 +741,7 @@ module REXML
|
|
732
741
|
content = match_data[1]
|
733
742
|
else
|
734
743
|
content = nil
|
735
|
-
unless @source.match("?>", true)
|
744
|
+
unless @source.match?("?>", true)
|
736
745
|
raise ParseException.new("Malformed XML: Unclosed processing instruction", @source)
|
737
746
|
end
|
738
747
|
end
|
@@ -762,9 +771,9 @@ module REXML
|
|
762
771
|
expanded_names = {}
|
763
772
|
closed = false
|
764
773
|
while true
|
765
|
-
if @source.match(">", true)
|
774
|
+
if @source.match?(">", true)
|
766
775
|
return attributes, closed
|
767
|
-
elsif @source.match("/>", true)
|
776
|
+
elsif @source.match?("/>", true)
|
768
777
|
closed = true
|
769
778
|
return attributes, closed
|
770
779
|
elsif match = @source.match(QNAME, true)
|
@@ -772,7 +781,7 @@ module REXML
|
|
772
781
|
prefix = match[2]
|
773
782
|
local_part = match[3]
|
774
783
|
|
775
|
-
unless @source.match(/\s*=\s*/um, true)
|
784
|
+
unless @source.match?(/\s*=\s*/um, true)
|
776
785
|
message = "Missing attribute equal: <#{name}>"
|
777
786
|
raise REXML::ParseException.new(message, @source)
|
778
787
|
end
|
@@ -788,7 +797,7 @@ module REXML
|
|
788
797
|
message = "Missing attribute value end quote: <#{name}>: <#{quote}>"
|
789
798
|
raise REXML::ParseException.new(message, @source)
|
790
799
|
end
|
791
|
-
@source.match(/\s*/um, true)
|
800
|
+
@source.match?(/\s*/um, true)
|
792
801
|
if prefix == "xmlns"
|
793
802
|
if local_part == "xml"
|
794
803
|
if value != Private::XML_PREFIXED_NAMESPACE
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# coding: US-ASCII
|
2
2
|
# frozen_string_literal: false
|
3
3
|
|
4
|
+
require "stringio"
|
4
5
|
require "strscan"
|
5
6
|
|
6
7
|
require_relative 'encoding'
|
@@ -18,6 +19,16 @@ module REXML
|
|
18
19
|
pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String)
|
19
20
|
super(pattern)
|
20
21
|
end
|
22
|
+
|
23
|
+
def match?(pattern)
|
24
|
+
pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String)
|
25
|
+
super(pattern)
|
26
|
+
end
|
27
|
+
|
28
|
+
def skip(pattern)
|
29
|
+
pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String)
|
30
|
+
super(pattern)
|
31
|
+
end
|
21
32
|
end
|
22
33
|
end
|
23
34
|
using StringScannerCheckScanString
|
@@ -35,7 +46,6 @@ module REXML
|
|
35
46
|
arg.respond_to? :eof?
|
36
47
|
IOSource.new(arg)
|
37
48
|
elsif arg.respond_to? :to_str
|
38
|
-
require 'stringio'
|
39
49
|
IOSource.new(StringIO.new(arg))
|
40
50
|
elsif arg.kind_of? Source
|
41
51
|
arg
|
@@ -77,6 +87,7 @@ module REXML
|
|
77
87
|
detect_encoding
|
78
88
|
end
|
79
89
|
@line = 0
|
90
|
+
@encoded_terms = {}
|
80
91
|
end
|
81
92
|
|
82
93
|
# The current buffer (what we're going to read next)
|
@@ -125,6 +136,14 @@ module REXML
|
|
125
136
|
end
|
126
137
|
end
|
127
138
|
|
139
|
+
def match?(pattern, cons=false)
|
140
|
+
if cons
|
141
|
+
!@scanner.skip(pattern).nil?
|
142
|
+
else
|
143
|
+
!@scanner.match?(pattern).nil?
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
128
147
|
def position
|
129
148
|
@scanner.pos
|
130
149
|
end
|
@@ -227,7 +246,7 @@ module REXML
|
|
227
246
|
|
228
247
|
def read_until(term)
|
229
248
|
pattern = Private::PRE_DEFINED_TERM_PATTERNS[term] || /#{Regexp.escape(term)}/
|
230
|
-
term = encode(term)
|
249
|
+
term = @encoded_terms[term] ||= encode(term)
|
231
250
|
until str = @scanner.scan_until(pattern)
|
232
251
|
break if @source.nil?
|
233
252
|
break if @source.eof?
|
@@ -266,6 +285,23 @@ module REXML
|
|
266
285
|
md.nil? ? nil : @scanner
|
267
286
|
end
|
268
287
|
|
288
|
+
def match?( pattern, cons=false )
|
289
|
+
# To avoid performance issue, we need to increase bytes to read per scan
|
290
|
+
min_bytes = 1
|
291
|
+
while true
|
292
|
+
if cons
|
293
|
+
n_matched_bytes = @scanner.skip(pattern)
|
294
|
+
else
|
295
|
+
n_matched_bytes = @scanner.match?(pattern)
|
296
|
+
end
|
297
|
+
return true if n_matched_bytes
|
298
|
+
return false if pattern.is_a?(String)
|
299
|
+
return false if @source.nil?
|
300
|
+
return false unless read(nil, min_bytes)
|
301
|
+
min_bytes *= 2
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
269
305
|
def empty?
|
270
306
|
super and ( @source.nil? || @source.eof? )
|
271
307
|
end
|
@@ -285,7 +321,7 @@ module REXML
|
|
285
321
|
rescue
|
286
322
|
end
|
287
323
|
@er_source.seek(pos)
|
288
|
-
rescue IOError
|
324
|
+
rescue IOError, SystemCallError
|
289
325
|
pos = -1
|
290
326
|
line = -1
|
291
327
|
end
|
@@ -294,14 +330,19 @@ module REXML
|
|
294
330
|
|
295
331
|
private
|
296
332
|
def readline(term = nil)
|
297
|
-
str = @source.readline(term || @line_break)
|
298
333
|
if @pending_buffer
|
334
|
+
begin
|
335
|
+
str = @source.readline(term || @line_break)
|
336
|
+
rescue IOError
|
337
|
+
end
|
299
338
|
if str.nil?
|
300
339
|
str = @pending_buffer
|
301
340
|
else
|
302
341
|
str = @pending_buffer + str
|
303
342
|
end
|
304
343
|
@pending_buffer = nil
|
344
|
+
else
|
345
|
+
str = @source.readline(term || @line_break)
|
305
346
|
end
|
306
347
|
return nil if str.nil?
|
307
348
|
|
@@ -29,31 +29,16 @@ module REXML
|
|
29
29
|
(0x10000..0x10FFFF)
|
30
30
|
]
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
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
|
32
|
+
VALID_XML_CHARS = Regexp.new('^['+
|
33
|
+
VALID_CHAR.map { |item|
|
34
|
+
case item
|
35
|
+
when Integer
|
36
|
+
[item].pack('U').force_encoding('utf-8')
|
37
|
+
when Range
|
38
|
+
[item.first, '-'.ord, item.last].pack('UUU').force_encoding('utf-8')
|
39
|
+
end
|
40
|
+
}.join +
|
41
|
+
']*$')
|
57
42
|
|
58
43
|
# Constructor
|
59
44
|
# +arg+ if a String, the content is set to the String. If a Text,
|
@@ -132,21 +117,11 @@ module REXML
|
|
132
117
|
|
133
118
|
# illegal anywhere
|
134
119
|
if !string.match?(VALID_XML_CHARS)
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
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
|
120
|
+
string.chars.each do |c|
|
121
|
+
case c.ord
|
122
|
+
when *VALID_CHAR
|
123
|
+
else
|
124
|
+
raise "Illegal character #{c.inspect} in raw string #{string.inspect}"
|
150
125
|
end
|
151
126
|
end
|
152
127
|
end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
3.0.2 / 2021-09-19
|
2
|
+
==================
|
3
|
+
|
4
|
+
- fix align_column for nil values and colspan
|
5
|
+
|
6
|
+
3.0.1 / 2021-05-10
|
7
|
+
==================
|
8
|
+
|
9
|
+
- Support for unicode-display_width 2.0
|
10
|
+
- Fix issue where last row of an empty table changed format
|
11
|
+
|
12
|
+
3.0.0 / 2020-01-27
|
13
|
+
==================
|
14
|
+
|
15
|
+
- Support for (optional) Unicode border styles on tables. In order to support decent looking Unicode borders, different types of intersections get different types of intersection characters. This has the side effect of subtle formatting differences even for the ASCII table border case due to removal of certain intersections near colspans.
|
16
|
+
|
17
|
+
For example, previously the output of a table may be:
|
18
|
+
+------+-----+
|
19
|
+
| Title |
|
20
|
+
+------+-----+
|
21
|
+
| Char | Num |
|
22
|
+
+------+-----+
|
23
|
+
| a | 1 |
|
24
|
+
| b | 2 |
|
25
|
+
| c | 3 |
|
26
|
+
+------+-----+
|
27
|
+
|
28
|
+
And now the `+` character above the word Title is removed, as it is no longer considered an intersection:
|
29
|
+
|
30
|
+
+------------+
|
31
|
+
| Title |
|
32
|
+
+------+-----+
|
33
|
+
| Char | Num |
|
34
|
+
+------+-----+
|
35
|
+
| a | 1 |
|
36
|
+
| b | 2 |
|
37
|
+
+------+-----+
|
38
|
+
|
39
|
+
- The default border remains an ASCII border for backwards compatibility, however multiple border classes are included / documented, and user defined border types can be applied as needed.
|
40
|
+
|
41
|
+
In support of this update, the following issues were addressed:
|
42
|
+
- colspan creates conflict with colorize (#95)
|
43
|
+
- Use nice UTF box-drawing characters by default (#99)
|
44
|
+
- Note that `AsciiBorder` is stll the default
|
45
|
+
- Border-left and border-right style (#100)
|
46
|
+
- Helper function to style as Markdown (#111)
|
47
|
+
- Achieved using `MarkdownBorder`
|
48
|
+
|
49
|
+
2.0.0 / 2020-10-28
|
50
|
+
==================
|
51
|
+
|
52
|
+
- Drops official support for Ruby 1.9.x with and of life on 2015-02-23
|
53
|
+
- Drops official support for Ruby 2.0.x with and of life on 2016-02-24
|
54
|
+
- Drops official support for Ruby 2.1.x with and of life on 2017-03-31
|
55
|
+
- Drops official support for Ruby 2.2.x with and of life on 2018-03-31
|
56
|
+
- Drops official support for Ruby 2.3.x with and of life on 2019-03-31
|
57
|
+
|
58
|
+
1.8.0 / 2017-05-16
|
59
|
+
==================
|
60
|
+
|
61
|
+
* Top and bottom borders can be disabled (@kubakrzempek, #83)
|
62
|
+
* `unicode-display-width` dependency relaxes (@mvz, #88)
|
63
|
+
|
64
|
+
* Readme and docs fixes (@loualrid, #82 and @leoarnold, #86)
|
65
|
+
* Fixed some test-related warnings (@juanitofatas, #81 and @mvz, #89)
|
66
|
+
|
67
|
+
1.7.3 / 2016-09-21
|
68
|
+
==================
|
69
|
+
|
70
|
+
* Fixed compatibility issues for Ruby 1.9, 2.0, 2.1. (@vivekbisen, #80)
|
71
|
+
|
72
|
+
1.7.2 / 2016-09-09
|
73
|
+
==================
|
74
|
+
|
75
|
+
* Fix packing table to a minimal width (@vizv, #76)
|
76
|
+
|
77
|
+
1.7.1 / 2016-08-29
|
78
|
+
==================
|
79
|
+
|
80
|
+
* Update `unicode-display_width` to fix behavior with signal traps [#78, @jrmhaig]
|
81
|
+
|
82
|
+
1.7.0 / 2016-08-29
|
83
|
+
==================
|
84
|
+
|
85
|
+
All props to @vizv for this release!
|
86
|
+
|
87
|
+
* Fixed some spec failures
|
88
|
+
* Added support for full-width characters (East Asian alphabets, etc)
|
89
|
+
|
90
|
+
1.6.0 / 2016-06-06
|
91
|
+
==================
|
92
|
+
|
93
|
+
* Added table styles - margin_left, all_separators.
|
94
|
+
|
95
|
+
1.4.3 / 2011-10-13
|
96
|
+
==================
|
97
|
+
|
98
|
+
* Optimize for faster table output.
|
99
|
+
|
100
|
+
1.4.2 / 2010-01-14
|
101
|
+
==================
|
102
|
+
|
103
|
+
* Fixed some bugs with colspan
|
104
|
+
|
105
|
+
=== 1.4.1 / 2009-12-18
|
106
|
+
|
107
|
+
* Fix column alignment with separators.
|
108
|
+
|
109
|
+
=== 1.4.0 / 2009-12-18
|
110
|
+
|
111
|
+
* Can now add :seperator arbitrarily in a table [thanks splattael]
|
112
|
+
* Fix common typo: seperator -> separator [thanks splattael]
|
113
|
+
|
114
|
+
=== 1.3.0 / 2009-10-16
|
115
|
+
|
116
|
+
* Major refactoring (functionality remains the same)
|
117
|
+
|
118
|
+
=== 1.2.0 / 2009-08-06
|
119
|
+
|
120
|
+
* Added colspan support to table
|
121
|
+
|
122
|
+
=== 1.1.0 / 2009-08-06
|
123
|
+
|
124
|
+
* Added colspan support to table
|
125
|
+
|
126
|
+
=== 1.1.0 / 2009-07-13
|
127
|
+
|
128
|
+
* Added Table#==
|
129
|
+
|
130
|
+
=== 1.0.5 / 2009-03-14
|
131
|
+
|
132
|
+
* Allowing nil to be passed to table for headings
|
133
|
+
* Revised doc to show that rows can be splatted now
|
134
|
+
* Misc refactoring
|
135
|
+
|
136
|
+
=== 1.0.3 / 2009-01-15
|
137
|
+
|
138
|
+
* Moved yield or eval to Terminal::Table initialize where it belongs
|
139
|
+
|
140
|
+
=== 1.0.0 / 2009-01-13
|
141
|
+
|
142
|
+
* Initial release
|