brakeman 5.2.3 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +111 -0
- data/README.md +8 -5
- data/bundle/load.rb +15 -15
- 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/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/Changelog.md +34 -0
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/Gemfile +3 -5
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/README.md +41 -3
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/highline.gemspec +6 -1
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/io_console_compatible.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/menu.rb +0 -0
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/question/answer_converter.rb +2 -5
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/question.rb +23 -13
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/question_asker.rb +3 -1
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/style.rb +0 -0
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal/io_console.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal/unix_stty.rb +6 -4
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal.rb +8 -6
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/version.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline.rb +27 -6
- data/bundle/ruby/3.1.0/gems/parallel-1.26.3/lib/parallel/version.rb +4 -0
- data/bundle/ruby/{2.7.0/gems/parallel-1.22.1 → 3.1.0/gems/parallel-1.26.3}/lib/parallel.rb +109 -13
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/COPYING +56 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/README.md +94 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/config.rb +373 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/face.rb +199 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/history.rb +76 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io/ansi.rb +325 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io/dumb.rb +120 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io/windows.rb +530 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io.rb +55 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/base.rb +37 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/composite.rb +17 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/emacs.rb +517 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/vi_command.rb +518 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/vi_insert.rb +517 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor.rb +8 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_stroke.rb +119 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/kill_ring.rb +125 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/line_editor.rb +2382 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/unicode/east_asian_width.rb +1267 -0
- 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.6.0/lib/reline.rb +519 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/license_of_rb-readline +25 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.0/LICENSE.txt +22 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.0/NEWS.md +675 -0
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/README.md +10 -1
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/attribute.rb +17 -11
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/document.rb +6 -2
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/element.rb +19 -34
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/entity.rb +9 -38
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/formatters/pretty.rb +3 -3
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/functions.rb +1 -2
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/namespace.rb +8 -4
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/node.rb +8 -4
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parseexception.rb +1 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.0/lib/rexml/parsers/baseparser.rb +866 -0
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/pullparser.rb +16 -0
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/sax2parser.rb +16 -19
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/streamparser.rb +16 -10
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/treeparser.rb +9 -21
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/xpathparser.rb +136 -86
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/rexml.rb +3 -1
- data/bundle/ruby/3.1.0/gems/rexml-3.4.0/lib/rexml/source.rb +369 -0
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/text.rb +60 -61
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xpath_parser.rb +7 -3
- data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/History.rdoc +22 -0
- data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/lib/ruby2ruby.rb +162 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/History.rdoc +48 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/Manifest.txt +2 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/README.rdoc +2 -1
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/compare/normalize.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby20_parser.rb +4267 -4284
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby20_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby21_parser.rb +4241 -4240
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby21_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby22_parser.rb +4289 -4290
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby22_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby23_parser.rb +4274 -4243
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby23_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby24_parser.rb +4279 -4298
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby24_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby25_parser.rb +4270 -4289
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby25_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby26_parser.rb +4270 -4289
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby26_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby27_parser.rb +4189 -4206
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby27_parser.y +63 -27
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby30_parser.rb +6037 -5963
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby30_parser.y +148 -87
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby31_parser.rb +6213 -6186
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1/lib/ruby3_parser.yy → 3.1.0/gems/ruby_parser-3.20.3/lib/ruby31_parser.y} +149 -143
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.rb +13601 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.y → 3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.y} +171 -109
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby3_parser.yy +3635 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rb +26 -11
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rex.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer_strings.rb +2 -2
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_parser.rb +2 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_parser.yy +63 -27
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_parser_extras.rb +36 -23
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/tools/munge.rb +8 -2
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/tools/ripper.rb +14 -12
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/History.rdoc +31 -0
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/pt_testcase.rb +3 -3
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/sexp.rb +9 -3
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/sexp_matcher.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/strict_sexp.rb +6 -5
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/CHANGES +44 -8
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/Gemfile +43 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/LICENSE +1 -1
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/README.jp.md +28 -41
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/README.md +66 -43
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/code_attributes.rb +2 -1
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/command.rb +2 -8
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/controls.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/do_inserter.rb +4 -3
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/embedded.rb +17 -17
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/end_inserter.rb +3 -2
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/engine.rb +3 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/erb_converter.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/filter.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/grammar.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/include.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/interpolation.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/logic_less/context.rb +6 -7
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/logic_less/filter.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/logic_less.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/parser.rb +26 -39
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/railtie.rb +19 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart/escaper.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart/filter.rb +3 -2
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart/parser.rb +4 -3
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/splat/builder.rb +16 -8
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/splat/filter.rb +6 -4
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/template.rb +6 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/translator.rb +4 -3
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/version.rb +2 -1
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim.rb +2 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/slim.gemspec +14 -5
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/CHANGES +39 -1
- data/bundle/ruby/3.1.0/gems/temple-0.10.3/Gemfile +2 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/README.md +1 -1
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/engine.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/engine.rb +3 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/parser.rb +2 -1
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/template.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/trimming.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/exceptions.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filter.rb +1 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/filters/ambles.rb +22 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/code_merger.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/control_flow.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/dynamic_inliner.rb +2 -1
- data/bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/filters/dynamic_merger.rb +69 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/encoding.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/eraser.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/escapable.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/multi_flattener.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/remove_bom.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/static_analyzer.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/static_merger.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/string_splitter.rb +13 -1
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/validator.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generator.rb +5 -2
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/array.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/array_buffer.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/erb.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/rails_output_buffer.rb +4 -4
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/string_buffer.rb +2 -1
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/grammar.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/attribute_merger.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/attribute_remover.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/attribute_sorter.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/dispatcher.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/fast.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/filter.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/pretty.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/safe.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/map.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/dispatcher.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/engine_dsl.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/grammar_dsl.rb +4 -2
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/options.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/template.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/parser.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/static_analyzer.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/templates/rails.rb +7 -2
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/templates/tilt.rb +2 -9
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/templates.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/utils.rb +5 -15
- data/bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/version.rb +4 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple.rb +3 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/temple.gemspec +4 -6
- 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/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/cell.rb +8 -8
- data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/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/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/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/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/version.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table.rb +2 -2
- data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/terminal-table.gemspec +3 -3
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/COPYING +1 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_emacs_org.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_handlebars.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_jbuilder.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_org.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/asciidoc.rb +15 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/babel.rb +8 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/builder.rb +42 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/cli.rb +134 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/coffee.rb +39 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/commonmarker.rb +95 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/creole.rb +16 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/csv.rb +6 -18
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/erb.rb +23 -21
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/erubi.rb +55 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/etanni.rb +5 -4
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/haml.rb +94 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/kramdown.rb +13 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/liquid.rb +10 -17
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/livescript.rb +11 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/mapping.rb +228 -109
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/markaby.rb +5 -7
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/nokogiri.rb +11 -10
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/pandoc.rb +39 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/pipeline.rb +19 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/plain.rb +5 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/prawn.rb +28 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/radius.rb +41 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/rdiscount.rb +23 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/rdoc.rb +11 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/redcarpet.rb +31 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/redcloth.rb +13 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/rst-pandoc.rb +10 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/sass.rb +78 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/slim.rb +5 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/string.rb +9 -3
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/template.rb +479 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/typescript.rb +19 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/yajl.rb +5 -11
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt.rb +60 -42
- data/bundle/ruby/{2.7.0/gems/unicode-display_width-1.8.0 → 3.1.0/gems/unicode-display_width-2.6.0}/CHANGELOG.md +65 -2
- data/bundle/ruby/{2.7.0/gems/unicode-display_width-1.8.0 → 3.1.0/gems/unicode-display_width-2.6.0}/MIT-LICENSE.txt +1 -1
- data/bundle/ruby/{2.7.0/gems/unicode-display_width-1.8.0 → 3.1.0/gems/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 +40 -13
- data/lib/brakeman/checks/base_check.rb +2 -3
- data/lib/brakeman/checks/check_basic_auth.rb +4 -2
- data/lib/brakeman/checks/check_basic_auth_timing_attack.rb +2 -1
- data/lib/brakeman/checks/check_content_tag.rb +16 -9
- data/lib/brakeman/checks/check_cookie_serialization.rb +2 -1
- data/lib/brakeman/checks/check_create_with.rb +4 -2
- data/lib/brakeman/checks/check_cross_site_scripting.rb +6 -3
- data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +2 -1
- data/lib/brakeman/checks/check_default_routes.rb +6 -3
- data/lib/brakeman/checks/check_deserialize.rb +6 -2
- data/lib/brakeman/checks/check_detailed_exceptions.rb +4 -2
- data/lib/brakeman/checks/check_digest_dos.rb +2 -1
- data/lib/brakeman/checks/check_divide_by_zero.rb +2 -1
- data/lib/brakeman/checks/check_dynamic_finders.rb +2 -1
- data/lib/brakeman/checks/check_eol_rails.rb +6 -0
- data/lib/brakeman/checks/check_eol_ruby.rb +4 -1
- data/lib/brakeman/checks/check_escape_function.rb +2 -1
- data/lib/brakeman/checks/check_evaluation.rb +21 -2
- data/lib/brakeman/checks/check_execute.rb +34 -3
- data/lib/brakeman/checks/check_file_access.rb +2 -1
- data/lib/brakeman/checks/check_file_disclosure.rb +2 -1
- data/lib/brakeman/checks/check_filter_skipping.rb +2 -1
- data/lib/brakeman/checks/check_force_ssl.rb +2 -1
- data/lib/brakeman/checks/check_forgery_setting.rb +4 -2
- data/lib/brakeman/checks/check_header_dos.rb +2 -1
- data/lib/brakeman/checks/check_i18n_xss.rb +2 -1
- data/lib/brakeman/checks/check_jruby_xml.rb +2 -1
- data/lib/brakeman/checks/check_json_encoding.rb +2 -1
- data/lib/brakeman/checks/check_json_entity_escape.rb +4 -2
- data/lib/brakeman/checks/check_json_parsing.rb +4 -2
- data/lib/brakeman/checks/check_link_to.rb +2 -1
- data/lib/brakeman/checks/check_link_to_href.rb +4 -2
- data/lib/brakeman/checks/check_mail_to.rb +2 -1
- data/lib/brakeman/checks/check_mass_assignment.rb +6 -3
- data/lib/brakeman/checks/check_mime_type_dos.rb +2 -1
- data/lib/brakeman/checks/check_model_attr_accessible.rb +3 -1
- data/lib/brakeman/checks/check_model_attributes.rb +4 -2
- data/lib/brakeman/checks/check_model_serialize.rb +2 -1
- data/lib/brakeman/checks/check_nested_attributes.rb +2 -1
- data/lib/brakeman/checks/check_nested_attributes_bypass.rb +2 -1
- data/lib/brakeman/checks/check_number_to_currency.rb +4 -2
- data/lib/brakeman/checks/check_page_caching_cve.rb +2 -1
- data/lib/brakeman/checks/check_pathname.rb +48 -0
- data/lib/brakeman/checks/check_permit_attributes.rb +2 -1
- data/lib/brakeman/checks/check_quote_table_name.rb +2 -1
- data/lib/brakeman/checks/check_ransack.rb +53 -0
- data/lib/brakeman/checks/check_redirect.rb +67 -31
- data/lib/brakeman/checks/check_regex_dos.rb +2 -1
- data/lib/brakeman/checks/check_render.rb +10 -3
- data/lib/brakeman/checks/check_render_dos.rb +2 -1
- data/lib/brakeman/checks/check_render_inline.rb +4 -2
- data/lib/brakeman/checks/check_response_splitting.rb +2 -1
- data/lib/brakeman/checks/check_reverse_tabnabbing.rb +2 -1
- data/lib/brakeman/checks/check_route_dos.rb +2 -1
- data/lib/brakeman/checks/check_safe_buffer_manipulation.rb +2 -1
- data/lib/brakeman/checks/check_sanitize_config_cve.rb +120 -0
- data/lib/brakeman/checks/check_sanitize_methods.rb +6 -3
- data/lib/brakeman/checks/check_secrets.rb +2 -1
- data/lib/brakeman/checks/check_select_tag.rb +2 -1
- data/lib/brakeman/checks/check_select_vulnerability.rb +2 -1
- data/lib/brakeman/checks/check_send.rb +2 -1
- data/lib/brakeman/checks/check_session_manipulation.rb +2 -1
- data/lib/brakeman/checks/check_session_settings.rb +8 -6
- data/lib/brakeman/checks/check_simple_format.rb +4 -2
- data/lib/brakeman/checks/check_single_quotes.rb +2 -1
- data/lib/brakeman/checks/check_skip_before_filter.rb +4 -2
- data/lib/brakeman/checks/check_sprockets_path_traversal.rb +2 -1
- data/lib/brakeman/checks/check_sql.rb +5 -3
- data/lib/brakeman/checks/check_sql_cves.rb +4 -2
- data/lib/brakeman/checks/check_ssl_verify.rb +2 -1
- data/lib/brakeman/checks/check_strip_tags.rb +6 -3
- data/lib/brakeman/checks/check_symbol_dos.rb +2 -1
- data/lib/brakeman/checks/check_symbol_dos_cve.rb +2 -1
- data/lib/brakeman/checks/check_template_injection.rb +2 -1
- data/lib/brakeman/checks/check_translate_bug.rb +2 -1
- data/lib/brakeman/checks/check_unsafe_reflection.rb +2 -1
- data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +2 -1
- data/lib/brakeman/checks/check_unscoped_find.rb +10 -1
- data/lib/brakeman/checks/check_validation_regex.rb +2 -1
- data/lib/brakeman/checks/check_verb_confusion.rb +2 -1
- data/lib/brakeman/checks/check_weak_hash.rb +6 -3
- data/lib/brakeman/checks/check_weak_rsa_key.rb +112 -0
- data/lib/brakeman/checks/check_without_protection.rb +2 -1
- data/lib/brakeman/checks/check_xml_dos.rb +2 -1
- data/lib/brakeman/checks/check_yaml_parsing.rb +4 -2
- data/lib/brakeman/checks/eol_check.rb +4 -2
- data/lib/brakeman/file_parser.rb +35 -2
- data/lib/brakeman/options.rb +42 -5
- data/lib/brakeman/parsers/erubis_patch.rb +11 -0
- data/lib/brakeman/parsers/rails2_erubis.rb +3 -0
- data/lib/brakeman/parsers/rails2_xss_plugin_erubis.rb +4 -0
- data/lib/brakeman/parsers/rails3_erubis.rb +5 -1
- data/lib/brakeman/parsers/slim_embedded.rb +2 -0
- data/lib/brakeman/processors/alias_processor.rb +124 -41
- data/lib/brakeman/processors/gem_processor.rb +2 -2
- data/lib/brakeman/processors/lib/file_type_detector.rb +9 -7
- data/lib/brakeman/processors/lib/find_all_calls.rb +1 -0
- data/lib/brakeman/processors/lib/module_helper.rb +31 -1
- data/lib/brakeman/processors/lib/rails3_config_processor.rb +1 -1
- data/lib/brakeman/processors/library_processor.rb +6 -0
- data/lib/brakeman/report/ignore/config.rb +0 -1
- data/lib/brakeman/report/pager.rb +1 -1
- data/lib/brakeman/report/report_codeclimate.rb +1 -1
- data/lib/brakeman/report/report_csv.rb +2 -0
- data/lib/brakeman/report/report_github.rb +1 -1
- data/lib/brakeman/report/report_junit.rb +2 -2
- data/lib/brakeman/report/report_markdown.rb +1 -1
- data/lib/brakeman/report/report_sarif.rb +122 -2
- data/lib/brakeman/report/report_table.rb +7 -7
- data/lib/brakeman/report/report_tabs.rb +0 -1
- data/lib/brakeman/report/report_text.rb +10 -1
- data/lib/brakeman/report/templates/controller_warnings.html.erb +2 -0
- data/lib/brakeman/report/templates/ignored_warnings.html.erb +2 -0
- data/lib/brakeman/report/templates/model_warnings.html.erb +2 -0
- data/lib/brakeman/report/templates/security_warnings.html.erb +2 -0
- data/lib/brakeman/report/templates/view_warnings.html.erb +2 -0
- data/lib/brakeman/rescanner.rb +40 -388
- data/lib/brakeman/scanner.rb +161 -76
- data/lib/brakeman/tracker/config.rb +89 -34
- data/lib/brakeman/tracker/controller.rb +14 -10
- data/lib/brakeman/tracker/file_cache.rb +83 -0
- data/lib/brakeman/tracker.rb +21 -4
- data/lib/brakeman/util.rb +21 -7
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman/warning.rb +6 -3
- data/lib/brakeman/warning_codes.rb +6 -0
- data/lib/brakeman.rb +22 -7
- data/lib/ruby_parser/bm_sexp.rb +5 -1
- metadata +438 -422
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/appveyor.yml +0 -37
- data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/processor_count.rb +0 -44
- data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/version.rb +0 -4
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md +0 -178
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +0 -694
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb +0 -298
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -6
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -19
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -54
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -5794
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -1909
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -6186
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -2117
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -1412
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -179
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +0 -323
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -30
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +0 -1388
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -5
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/CHANGES.md +0 -154
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/Gemfile +0 -11
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/LICENSE.txt +0 -22
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/README.md +0 -191
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -11
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -34
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -36
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -181
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -37
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -12
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -26
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -99
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -52
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -94
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -29
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -39
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -36
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -43
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -38
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -21
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -13
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -33
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -26
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -18
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -17
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -47
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -41
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -3
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -94
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -38
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -19
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/Gemfile +0 -70
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/template.rb +0 -19
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/Gemfile +0 -3
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/version.rb +0 -3
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/History.rdoc +0 -85
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/README.rdoc +0 -247
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -14
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -79
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/asciidoc.rb +0 -27
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/babel.rb +0 -16
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/bluecloth.rb +0 -24
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/builder.rb +0 -37
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/coffee.rb +0 -58
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/commonmarker.rb +0 -78
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/creole.rb +0 -25
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/dummy.rb +0 -3
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubi.rb +0 -32
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubis.rb +0 -43
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/haml.rb +0 -86
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/kramdown.rb +0 -25
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/less.rb +0 -30
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/livescript.rb +0 -23
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/maruku.rb +0 -22
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/pandoc.rb +0 -49
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/plain.rb +0 -16
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/prawn.rb +0 -43
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/radius.rb +0 -48
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdiscount.rb +0 -39
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdoc.rb +0 -40
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcarpet.rb +0 -83
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcloth.rb +0 -23
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rst-pandoc.rb +0 -18
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sass.rb +0 -52
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sigil.rb +0 -34
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/template.rb +0 -297
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/typescript.rb +0 -26
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/wikicloth.rb +0 -22
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/constants.rb +0 -8
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/index.rb +0 -12
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/no_string_ext.rb +0 -7
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/string_ext.rb +0 -17
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb +0 -51
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/README.txt +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/setup.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/CHANGELOG.md +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/FAQ.md +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/Gemfile +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/MIT-LICENSE +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/README.md +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/REFERENCE.md +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/TODO +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/haml.gemspec +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/attribute_builder.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/attribute_compiler.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/attribute_parser.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/buffer.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/compiler.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/engine.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/error.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/escapable.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/exec.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/filters.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/generator.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_extensions.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_mods.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_xss_mods.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/safe_erubi_template.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/safe_erubis_template.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/xss_mods.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/options.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/parser.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/plugin.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/railtie.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/sass_rails_filter.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/template/options.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/template.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/temple_engine.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/temple_line_counter.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/util.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/version.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/yard/default/fulldoc/html/css/common.sass +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/yard/default/layout/html/footer.erb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/AUTHORS +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/COPYING +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/LICENSE +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/TODO +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/builtin_styles.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/color_scheme.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/compatibility.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/custom_errors.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/import.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/list.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/list_renderer.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/menu/item.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/paginator.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/simulate.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/statement.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/string.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/string_extensions.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/template_renderer.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal/ncurses.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/wrapper.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/parallel-1.22.1 → 3.1.0/gems/parallel-1.26.3}/MIT-LICENSE.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5/LICENSE.txt → 3.1.0/gems/reline-0.6.0/BSDL} +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/attlistdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/cdata.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/child.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/comment.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/doctype.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/attlistdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/dtd.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/elementdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/entitydecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/notationdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/encoding.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/formatters/default.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/formatters/transitive.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/instruction.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/light/node.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/output.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parent.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/lightparser.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/ultralightparser.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/quickpath.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/sax2listener.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/security.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/streamlistener.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/undefinednamespaceexception.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/validation/relaxng.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/validation/validation.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/validation/validationexception.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xmldecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xmltokens.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xpath.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/Manifest.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/README.rdoc +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/debugging.md +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/gauntlet.md +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_extensions.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_stringscanner.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rex +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/Manifest.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/README.rdoc +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/composite_sexp_processor.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/unique.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/EXPRESSIONS.md +0 -0
- /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/LICENSE +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/Gemfile +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/LICENSE.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/Manifest +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/Todo.rdoc +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/import.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/table_helper.rb +0 -0
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'template'
|
2
3
|
require 'yajl'
|
3
4
|
|
4
5
|
module Tilt
|
5
|
-
|
6
6
|
# Yajl Template implementation
|
7
7
|
#
|
8
8
|
# Yajl is a fast JSON parsing and encoding library for Ruby
|
@@ -40,14 +40,10 @@ module Tilt
|
|
40
40
|
# template.render(self)
|
41
41
|
#
|
42
42
|
class YajlTemplate < Template
|
43
|
-
|
44
43
|
self.default_mime_type = 'application/json'
|
45
44
|
|
46
|
-
def prepare
|
47
|
-
end
|
48
|
-
|
49
45
|
def evaluate(scope, locals, &block)
|
50
|
-
decorate
|
46
|
+
decorate(super)
|
51
47
|
end
|
52
48
|
|
53
49
|
def precompiled_preamble(locals)
|
@@ -60,10 +56,9 @@ module Tilt
|
|
60
56
|
end
|
61
57
|
|
62
58
|
def precompiled_template(locals)
|
63
|
-
data.to_str
|
59
|
+
@data.to_str
|
64
60
|
end
|
65
61
|
|
66
|
-
|
67
62
|
# Decorates the +json+ input according to given +options+.
|
68
63
|
#
|
69
64
|
# json - The json String to decorate.
|
@@ -71,7 +66,7 @@ module Tilt
|
|
71
66
|
#
|
72
67
|
# Returns the decorated String.
|
73
68
|
def decorate(json)
|
74
|
-
callback, variable = options[:callback], options[:variable]
|
69
|
+
callback, variable = @options[:callback], @options[:variable]
|
75
70
|
if callback && variable
|
76
71
|
"var #{variable} = #{json}; #{callback}(#{variable});"
|
77
72
|
elsif variable
|
@@ -83,5 +78,4 @@ module Tilt
|
|
83
78
|
end
|
84
79
|
end
|
85
80
|
end
|
86
|
-
|
87
81
|
end
|
@@ -1,73 +1,93 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'tilt/mapping'
|
3
|
+
require_relative 'tilt/template'
|
3
4
|
|
4
5
|
# Namespace for Tilt. This module is not intended to be included anywhere.
|
5
6
|
module Tilt
|
6
7
|
# Current version.
|
7
|
-
VERSION = '2.0
|
8
|
+
VERSION = '2.5.0'
|
9
|
+
|
10
|
+
EMPTY_HASH = {}.freeze
|
11
|
+
private_constant :EMPTY_HASH
|
8
12
|
|
9
13
|
@default_mapping = Mapping.new
|
10
14
|
|
11
|
-
#
|
12
|
-
|
13
|
-
|
15
|
+
# Replace the default mapping with a finalized version of the default
|
16
|
+
# mapping. This can be done to improve performance after the template
|
17
|
+
# libraries you desire to use have already been loaded. Once this is
|
18
|
+
# is called, all attempts to modify the default mapping will fail.
|
19
|
+
# This also freezes Tilt itself.
|
20
|
+
def self.finalize!
|
21
|
+
return self if @default_mapping.is_a?(FinalizedMapping)
|
22
|
+
|
23
|
+
class << self
|
24
|
+
prepend(Module.new do
|
25
|
+
def lazy_map(*)
|
26
|
+
raise "Tilt.#{__callee__} not supported after Tilt.finalize! has been called"
|
27
|
+
end
|
28
|
+
alias register lazy_map
|
29
|
+
alias register_lazy lazy_map
|
30
|
+
alias register_pipeline lazy_map
|
31
|
+
alias prefer lazy_map
|
32
|
+
end)
|
33
|
+
end
|
34
|
+
|
35
|
+
@default_mapping = @default_mapping.finalized
|
36
|
+
|
37
|
+
freeze
|
14
38
|
end
|
15
39
|
|
16
40
|
# @private
|
17
41
|
def self.lazy_map
|
18
|
-
default_mapping.lazy_map
|
42
|
+
@default_mapping.lazy_map
|
19
43
|
end
|
20
44
|
|
21
45
|
# @see Tilt::Mapping#register
|
22
46
|
def self.register(template_class, *extensions)
|
23
|
-
default_mapping.register(template_class, *extensions)
|
47
|
+
@default_mapping.register(template_class, *extensions)
|
24
48
|
end
|
25
49
|
|
26
50
|
# @see Tilt::Mapping#register_lazy
|
27
51
|
def self.register_lazy(class_name, file, *extensions)
|
28
|
-
default_mapping.register_lazy(class_name, file, *extensions)
|
52
|
+
@default_mapping.register_lazy(class_name, file, *extensions)
|
29
53
|
end
|
30
54
|
|
31
|
-
# @
|
32
|
-
def self.
|
33
|
-
|
55
|
+
# @see Tilt::Mapping#register_pipeline
|
56
|
+
def self.register_pipeline(ext, options=EMPTY_HASH)
|
57
|
+
@default_mapping.register_pipeline(ext, options)
|
34
58
|
end
|
35
59
|
|
36
60
|
# @see Tilt::Mapping#registered?
|
37
61
|
def self.registered?(ext)
|
38
|
-
default_mapping.registered?(ext)
|
62
|
+
@default_mapping.registered?(ext)
|
39
63
|
end
|
40
64
|
|
41
65
|
# @see Tilt::Mapping#new
|
42
|
-
def self.new(file, line=nil, options=
|
43
|
-
default_mapping.new(file, line, options, &block)
|
66
|
+
def self.new(file, line=nil, options=nil, &block)
|
67
|
+
@default_mapping.new(file, line, options, &block)
|
44
68
|
end
|
45
69
|
|
46
70
|
# @see Tilt::Mapping#[]
|
47
71
|
def self.[](file)
|
48
|
-
default_mapping[file]
|
72
|
+
@default_mapping[file]
|
49
73
|
end
|
50
74
|
|
51
75
|
# @see Tilt::Mapping#template_for
|
52
76
|
def self.template_for(file)
|
53
|
-
default_mapping.template_for(file)
|
77
|
+
@default_mapping.template_for(file)
|
54
78
|
end
|
55
79
|
|
56
80
|
# @see Tilt::Mapping#templates_for
|
57
81
|
def self.templates_for(file)
|
58
|
-
default_mapping.templates_for(file)
|
82
|
+
@default_mapping.templates_for(file)
|
59
83
|
end
|
60
84
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
# @note This is currently an experimental feature and might return nil
|
68
|
-
# in the future.
|
69
|
-
def self.current_template
|
70
|
-
Thread.current[:tilt_current_template]
|
85
|
+
class << self
|
86
|
+
# @return [Tilt::Mapping] the main mapping object
|
87
|
+
attr_reader :default_mapping
|
88
|
+
|
89
|
+
# Alias register as prefer for Tilt 1.x compatibility.
|
90
|
+
alias prefer register
|
71
91
|
end
|
72
92
|
|
73
93
|
# Extremely simple template cache implementation. Calling applications
|
@@ -110,18 +130,18 @@ module Tilt
|
|
110
130
|
@cache = {}
|
111
131
|
end
|
112
132
|
end
|
113
|
-
|
133
|
+
# :nocov:
|
134
|
+
# TILT3: Remove Tilt::Cache
|
135
|
+
deprecate_constant :Cache if respond_to?(:deprecate_constant, true)
|
136
|
+
# :nocov:
|
114
137
|
|
115
138
|
# Template Implementations ================================================
|
116
139
|
|
117
140
|
# ERB
|
118
141
|
register_lazy :ERBTemplate, 'tilt/erb', 'erb', 'rhtml'
|
119
|
-
register_lazy :ErubisTemplate, 'tilt/erubis', 'erb', 'rhtml', 'erubis'
|
120
142
|
register_lazy :ErubiTemplate, 'tilt/erubi', 'erb', 'rhtml', 'erubi'
|
121
143
|
|
122
144
|
# Markdown
|
123
|
-
register_lazy :BlueClothTemplate, 'tilt/bluecloth', 'markdown', 'mkd', 'md'
|
124
|
-
register_lazy :MarukuTemplate, 'tilt/maruku', 'markdown', 'mkd', 'md'
|
125
145
|
register_lazy :KramdownTemplate, 'tilt/kramdown', 'markdown', 'mkd', 'md'
|
126
146
|
register_lazy :RDiscountTemplate, 'tilt/rdiscount', 'markdown', 'mkd', 'md'
|
127
147
|
register_lazy :RedcarpetTemplate, 'tilt/redcarpet', 'markdown', 'mkd', 'md'
|
@@ -138,9 +158,8 @@ module Tilt
|
|
138
158
|
register_lazy :CreoleTemplate, 'tilt/creole', 'wiki', 'creole'
|
139
159
|
register_lazy :EtanniTemplate, 'tilt/etanni', 'etn', 'etanni'
|
140
160
|
register_lazy :HamlTemplate, 'tilt/haml', 'haml'
|
141
|
-
register_lazy :LessTemplate, 'tilt/less', 'less'
|
142
161
|
register_lazy :LiquidTemplate, 'tilt/liquid', 'liquid'
|
143
|
-
register_lazy :LiveScriptTemplate, 'tilt/livescript','ls'
|
162
|
+
register_lazy :LiveScriptTemplate, 'tilt/livescript','ls', 'livescript'
|
144
163
|
register_lazy :MarkabyTemplate, 'tilt/markaby', 'mab'
|
145
164
|
register_lazy :NokogiriTemplate, 'tilt/nokogiri', 'nokogiri'
|
146
165
|
register_lazy :PlainTemplate, 'tilt/plain', 'html'
|
@@ -151,16 +170,15 @@ module Tilt
|
|
151
170
|
register_lazy :RstPandocTemplate, 'tilt/rst-pandoc', 'rst'
|
152
171
|
register_lazy :SassTemplate, 'tilt/sass', 'sass'
|
153
172
|
register_lazy :ScssTemplate, 'tilt/sass', 'scss'
|
154
|
-
register_lazy :
|
173
|
+
register_lazy :SlimTemplate, 'tilt/slim', 'slim'
|
155
174
|
register_lazy :StringTemplate, 'tilt/string', 'str'
|
156
175
|
register_lazy :TypeScriptTemplate, 'tilt/typescript', 'ts', 'tsx'
|
157
|
-
register_lazy :WikiClothTemplate, 'tilt/wikicloth', 'wiki', 'mediawiki', 'mw'
|
158
176
|
register_lazy :YajlTemplate, 'tilt/yajl', 'yajl'
|
159
177
|
|
160
|
-
#
|
161
|
-
|
162
|
-
register_lazy 'Tilt::HandlebarsTemplate', 'tilt/
|
163
|
-
register_lazy 'Tilt::OrgTemplate', '
|
164
|
-
register_lazy '
|
165
|
-
register_lazy 'Tilt::JbuilderTemplate', 'tilt/
|
178
|
+
# TILT3: Remove
|
179
|
+
# Deprecated lazy loading of external template engines
|
180
|
+
register_lazy 'Tilt::HandlebarsTemplate', 'tilt/_handlebars', 'handlebars', 'hbs'
|
181
|
+
register_lazy 'Tilt::OrgTemplate', 'tilt/_org', 'org'
|
182
|
+
register_lazy 'Tilt::OrgTemplate', 'tilt/_emacs_org', 'org'
|
183
|
+
register_lazy 'Tilt::JbuilderTemplate', 'tilt/_jbuilder', 'jbuilder'
|
166
184
|
end
|
@@ -1,9 +1,72 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2.6.0
|
4
|
+
|
5
|
+
- Unicode 16
|
6
|
+
|
7
|
+
## 2.5.0
|
8
|
+
|
9
|
+
- Unicode 15.1
|
10
|
+
|
11
|
+
## 2.4.2
|
12
|
+
|
13
|
+
More performance improvements:
|
14
|
+
|
15
|
+
- Optimize lookup of first 4096 codepoints
|
16
|
+
- Avoid overwrite lookup if no overwrites are set
|
17
|
+
|
18
|
+
## 2.4.1
|
19
|
+
|
20
|
+
- Improve general performance!
|
21
|
+
- Further improve performance for ASCII strings
|
22
|
+
|
23
|
+
*You should really upgrade - it's much faster now!*
|
24
|
+
|
25
|
+
## 2.4.0
|
26
|
+
- Improve performance for ASCII-only strings, by @fatkodima
|
27
|
+
- Require Ruby 2.4
|
28
|
+
|
29
|
+
## 2.3.0
|
30
|
+
|
31
|
+
- Unicode 15.0
|
32
|
+
|
33
|
+
## 2.2.0
|
34
|
+
|
35
|
+
- Add *Hangul Jamo Extended-B* block to zero-width chars, thanks @ninjalj #22
|
36
|
+
|
37
|
+
## 2.1.0
|
38
|
+
|
39
|
+
- Unicode 14.0
|
40
|
+
|
41
|
+
## 2.0.0
|
42
|
+
|
43
|
+
- Release 2.0.0
|
44
|
+
- Supports Ruby 3.0
|
45
|
+
|
46
|
+
## 2.0.0.pre2
|
47
|
+
|
48
|
+
- Update 2.0 branch to Unicode 13
|
49
|
+
|
50
|
+
## 2.0.0.pre1
|
51
|
+
|
52
|
+
Will be published as non-pre version on rubygems.org when Ruby 3.0 is released (December 2020)
|
53
|
+
|
54
|
+
- Introduce new class-based API, which remembers your string-width configuration. See README for details.
|
55
|
+
- Remove auto-loading of string extension
|
56
|
+
- You can: `require "unicode/display_width/string_ext"` to continue to use the string extension
|
57
|
+
- The manual opt-out `require "unicode/display_width/no_string_ext"` is not needed anymore and will
|
58
|
+
issue a warning in the future
|
59
|
+
- Remove (already deprecated) String#display_size and String#display_width aliases
|
60
|
+
|
61
|
+
Refactorings / Internal Changes:
|
62
|
+
|
63
|
+
- Freeze string literals
|
64
|
+
- The Unicode::DisplayWidth now is class, instead of a module, this enables the new config-object API
|
65
|
+
|
3
66
|
## 1.8.0
|
4
|
-
|
67
|
+
|
5
68
|
- Unicode 14.0 (last release of 1.x)
|
6
|
-
|
69
|
+
|
7
70
|
## 1.7.0
|
8
71
|
|
9
72
|
- Unicode 13
|
@@ -1,12 +1,39 @@
|
|
1
|
-
## Unicode::DisplayWidth [![[version]](https://badge.fury.io/rb/unicode-display_width.svg)](https://badge.fury.io/rb/unicode-display_width) [<img src="https://
|
1
|
+
## Unicode::DisplayWidth [![[version]](https://badge.fury.io/rb/unicode-display_width.svg)](https://badge.fury.io/rb/unicode-display_width) [<img src="https://github.com/janlelis/unicode-display_width/workflows/Test/badge.svg" />](https://github.com/janlelis/unicode-display_width/actions?query=workflow%3ATest)
|
2
2
|
|
3
|
-
Determines the monospace display width of a string in Ruby. Implementation based on [EastAsianWidth.txt](https://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt) and other data, 100% in Ruby.
|
3
|
+
Determines the monospace display width of a string in Ruby. Useful for all kinds of terminal-based applications. Implementation based on [EastAsianWidth.txt](https://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt) and other data, 100% in Ruby. It does not rely on the OS vendor (like [wcwidth()](https://github.com/janlelis/wcswidth-ruby)) to provide an up-to-date method for measuring string width.
|
4
4
|
|
5
|
-
Unicode version: **
|
5
|
+
Unicode version: **16.0.0** (September 2024)
|
6
6
|
|
7
|
-
Supported Rubies: **
|
7
|
+
Supported Rubies: **3.3**, **3.2**, **3.1**, **3.0**
|
8
8
|
|
9
|
-
Old Rubies
|
9
|
+
Old Rubies which might still work: **2.7**, **2.6**, **2.5**, **2.4**, **2.3**
|
10
|
+
|
11
|
+
For even older Rubies, use version 2.3.0 of this gem: **2.3**, **2.2**, **2.1**, **2.0**, **1.9**
|
12
|
+
|
13
|
+
## Version 2.4.2 — Performance Updates
|
14
|
+
|
15
|
+
**If you use this gem, you should really upgrade to 2.4.2 or newer. It's often 100x faster, sometimes even 1000x and more!**
|
16
|
+
|
17
|
+
This is possible because the gem now detects if you use very basic (and common) characters, like ASCII characters. Furthermore, the charachter width lookup code has been optimized, so even when full-width characters are involved, the gem is much faster now.
|
18
|
+
|
19
|
+
## Version 2.0 — Breaking Changes
|
20
|
+
|
21
|
+
Some features of this library were marked deprecated for a long time and have been removed with Version 2.0:
|
22
|
+
|
23
|
+
- Aliases of display_width (…\_size, …\_length) have been removed
|
24
|
+
- Auto-loading of string core extension has been removed:
|
25
|
+
|
26
|
+
If you are relying on the `String#display_width` string extension to be automatically loaded (old behavior), please load it explicitly now:
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require "unicode/display_width/string_ext"
|
30
|
+
```
|
31
|
+
|
32
|
+
You could also change your `Gemfile` line to achieve this:
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
gem "unicode-display_width", require: "unicode/display_width/string_ext"
|
36
|
+
```
|
10
37
|
|
11
38
|
## Introduction to Character Widths
|
12
39
|
|
@@ -20,12 +47,12 @@ Width | Characters | Comment
|
|
20
47
|
-------|------------------------------|--------------------------------------------------
|
21
48
|
X | (user defined) | Overwrites any other values
|
22
49
|
-1 | `"\b"` | Backspace (total width never below 0)
|
23
|
-
0 | `"\0"`, `"\x05"`, `"\a"`, `"\n"`, `"\v"`, `"\f"`, `"\r"`, `"\x0E"`, `"\x0F"` | [C0 control codes](https://en.wikipedia.org/wiki/C0_and_C1_control_codes#C0_.28ASCII_and_derivatives.29)
|
50
|
+
0 | `"\0"`, `"\x05"`, `"\a"`, `"\n"`, `"\v"`, `"\f"`, `"\r"`, `"\x0E"`, `"\x0F"` | [C0 control codes](https://en.wikipedia.org/wiki/C0_and_C1_control_codes#C0_.28ASCII_and_derivatives.29) which do not change horizontal width
|
24
51
|
1 | `"\u{00AD}"` | SOFT HYPHEN
|
25
52
|
2 | `"\u{2E3A}"` | TWO-EM DASH
|
26
53
|
3 | `"\u{2E3B}"` | THREE-EM DASH
|
27
54
|
0 | General Categories: Mn, Me, Cf (non-arabic) | Excludes ARABIC format characters
|
28
|
-
0 | `"\u{1160}".."\u{11FF}"` | HANGUL JUNGSEONG
|
55
|
+
0 | `"\u{1160}".."\u{11FF}"`, `"\u{D7B0}".."\u{D7FF}"` | HANGUL JUNGSEONG
|
29
56
|
0 | `"\u{2060}".."\u{206F}"`, `"\u{FFF0}".."\u{FFF8}"`, `"\u{E0000}".."\u{E0FFF}"` | Ignorable ranges
|
30
57
|
2 | East Asian Width: F, W | Full-width characters
|
31
58
|
2 | `"\u{3400}".."\u{4DBF}"`, `"\u{4E00}".."\u{9FFF}"`, `"\u{F900}".."\u{FAFF}"`, `"\u{20000}".."\u{2FFFD}"`, `"\u{30000}".."\u{3FFFD}"` | Full-width ranges
|
@@ -44,6 +71,8 @@ Or add to your Gemfile:
|
|
44
71
|
|
45
72
|
## Usage
|
46
73
|
|
74
|
+
### Classic API
|
75
|
+
|
47
76
|
```ruby
|
48
77
|
require 'unicode/display_width'
|
49
78
|
|
@@ -51,7 +80,7 @@ Unicode::DisplayWidth.of("⚀") # => 1
|
|
51
80
|
Unicode::DisplayWidth.of("一") # => 2
|
52
81
|
```
|
53
82
|
|
54
|
-
|
83
|
+
#### Ambiguous Characters
|
55
84
|
|
56
85
|
The second parameter defines the value returned by characters defined as ambiguous:
|
57
86
|
|
@@ -60,42 +89,59 @@ Unicode::DisplayWidth.of("·", 1) # => 1
|
|
60
89
|
Unicode::DisplayWidth.of("·", 2) # => 2
|
61
90
|
```
|
62
91
|
|
63
|
-
|
92
|
+
#### Custom Overwrites
|
64
93
|
|
65
94
|
You can overwrite how to handle specific code points by passing a hash (or even a proc) as third parameter:
|
66
95
|
|
67
96
|
```ruby
|
68
|
-
Unicode::DisplayWidth.of("a\tb", 1,
|
97
|
+
Unicode::DisplayWidth.of("a\tb", 1, "\t".ord => 10)) # => tab counted as 10, so result is 12
|
69
98
|
```
|
70
99
|
|
71
|
-
|
100
|
+
Please note that using overwrites disables some perfomance optimizations of this gem.
|
101
|
+
|
72
102
|
|
73
|
-
|
103
|
+
#### Emoji Support
|
104
|
+
|
105
|
+
Emoji width support is included, but in must be activated manually. It will adjust the string's size for modifier and zero-width joiner sequences. You also need to add the [unicode-emoji](https://github.com/janlelis/unicode-emoji) gem to your Gemfile:
|
74
106
|
|
75
107
|
```ruby
|
76
108
|
gem 'unicode-display_width'
|
77
109
|
gem 'unicode-emoji'
|
78
110
|
```
|
79
111
|
|
80
|
-
|
112
|
+
Enable the emoji string width adjustments by passing `emoji: true` as fourth parameter:
|
81
113
|
|
82
114
|
```ruby
|
83
115
|
Unicode::DisplayWidth.of "🤾🏽♀️" # => 5
|
84
116
|
Unicode::DisplayWidth.of "🤾🏽♀️", 1, {}, emoji: true # => 2
|
85
117
|
```
|
86
118
|
|
87
|
-
|
88
|
-
|
89
|
-
Activated by default. Will be deactivated in version 2.0:
|
119
|
+
#### Usage with String Extension
|
90
120
|
|
91
121
|
```ruby
|
92
122
|
require 'unicode/display_width/string_ext'
|
93
123
|
|
94
|
-
"⚀".display_width
|
95
|
-
'一'.display_width
|
124
|
+
"⚀".display_width # => 1
|
125
|
+
'一'.display_width # => 2
|
96
126
|
```
|
97
127
|
|
98
|
-
|
128
|
+
### Modern API: Keyword-arguments Based Config Object
|
129
|
+
|
130
|
+
Version 2.0 introduces a keyword-argument based API, which allows you to save your configuration for later-reuse. This requires an extra line of code, but has the advantage that you'll need to define your string-width options only once:
|
131
|
+
|
132
|
+
```ruby
|
133
|
+
require 'unicode/display_width'
|
134
|
+
|
135
|
+
display_width = Unicode::DisplayWidth.new(
|
136
|
+
# ambiguous: 1,
|
137
|
+
overwrite: { "A".ord => 100 },
|
138
|
+
emoji: true,
|
139
|
+
)
|
140
|
+
|
141
|
+
display_width.of "⚀" # => 1
|
142
|
+
display_width.of "🤾🏽♀️" # => 2
|
143
|
+
display_width.of "A" # => 100
|
144
|
+
```
|
99
145
|
|
100
146
|
### Usage From the CLI
|
101
147
|
|
@@ -113,12 +159,13 @@ Replace "一" with the actual string to measure
|
|
113
159
|
- JavaScript: https://github.com/mycoboco/wcwidth.js
|
114
160
|
- C: https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
|
115
161
|
- C for Julia: https://github.com/JuliaLang/utf8proc/issues/2
|
162
|
+
- Golang: https://github.com/rivo/uniseg
|
116
163
|
|
117
164
|
See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related micro libraries.
|
118
165
|
|
119
166
|
## Copyright & Info
|
120
167
|
|
121
|
-
- Copyright (c) 2011, 2015-
|
168
|
+
- Copyright (c) 2011, 2015-2024 Jan Lelis, https://janlelis.com, released under the MIT
|
122
169
|
license
|
123
170
|
- Early versions based on runpaint's unicode-data interface: Copyright (c) 2009 Run Paint Run Run
|
124
171
|
- Unicode data: https://www.unicode.org/copyright.html#Exhibit1
|
Binary file
|
data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/constants.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Unicode
|
4
|
+
class DisplayWidth
|
5
|
+
VERSION = "2.6.0"
|
6
|
+
UNICODE_VERSION = "16.0.0"
|
7
|
+
DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + "/../../../data/")
|
8
|
+
INDEX_FILENAME = DATA_DIRECTORY + "/display_width.marshal.gz"
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "zlib"
|
4
|
+
require_relative "constants"
|
5
|
+
|
6
|
+
module Unicode
|
7
|
+
class DisplayWidth
|
8
|
+
File.open(INDEX_FILENAME, "rb") do |file|
|
9
|
+
serialized_data = Zlib::GzipReader.new(file).read
|
10
|
+
serialized_data.force_encoding Encoding::BINARY
|
11
|
+
INDEX = Marshal.load(serialized_data)
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.decompress_index(index, level)
|
15
|
+
index.flat_map{ |value|
|
16
|
+
if level > 0
|
17
|
+
if value.instance_of?(Array)
|
18
|
+
value[15] ||= nil
|
19
|
+
decompress_index(value, level - 1)
|
20
|
+
else
|
21
|
+
decompress_index([value] * 16, level - 1)
|
22
|
+
end
|
23
|
+
else
|
24
|
+
if value.instance_of?(Array)
|
25
|
+
value[15] ||= nil
|
26
|
+
value
|
27
|
+
else
|
28
|
+
[value] * 16
|
29
|
+
end
|
30
|
+
end
|
31
|
+
}
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/no_string_ext.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
warn "You are loading 'unicode-display_width/no_string_ext'\n" \
|
4
|
+
"Beginning with version 2.0, this is not necessary anymore\n"\
|
5
|
+
"You can just require 'unicode-display_width' now and no\n"\
|
6
|
+
"string extension will be loaded"
|
7
|
+
|
8
|
+
require_relative "../display_width"
|
data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/string_ext.rb
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../display_width" unless defined? Unicode::DisplayWidth
|
4
|
+
|
5
|
+
class String
|
6
|
+
def display_width(ambiguous = 1, overwrite = {}, options = {})
|
7
|
+
Unicode::DisplayWidth.of(self, ambiguous, overwrite, options)
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "display_width/constants"
|
4
|
+
require_relative "display_width/index"
|
5
|
+
|
6
|
+
module Unicode
|
7
|
+
class DisplayWidth
|
8
|
+
INITIAL_DEPTH = 0x10000
|
9
|
+
ASCII_NON_ZERO_REGEX = /[\0\x05\a\b\n\v\f\r\x0E\x0F]/
|
10
|
+
FIRST_4096 = decompress_index(INDEX[0][0], 1)
|
11
|
+
|
12
|
+
def self.of(string, ambiguous = 1, overwrite = {}, options = {})
|
13
|
+
if overwrite.empty?
|
14
|
+
# Optimization for ASCII-only strings without certain control symbols
|
15
|
+
if string.ascii_only?
|
16
|
+
if string.match?(ASCII_NON_ZERO_REGEX)
|
17
|
+
res = string.gsub(ASCII_NON_ZERO_REGEX, "").size - string.count("\b")
|
18
|
+
res < 0 ? 0 : res
|
19
|
+
else
|
20
|
+
string.size
|
21
|
+
end
|
22
|
+
else
|
23
|
+
width_no_overwrite(string, ambiguous, options)
|
24
|
+
end
|
25
|
+
else
|
26
|
+
width_all_features(string, ambiguous, overwrite, options)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.width_no_overwrite(string, ambiguous, options = {})
|
31
|
+
# Sum of all chars widths
|
32
|
+
res = string.codepoints.sum{ |codepoint|
|
33
|
+
if codepoint > 15 && codepoint < 161 # very common
|
34
|
+
next 1
|
35
|
+
elsif codepoint < 0x1001
|
36
|
+
width = FIRST_4096[codepoint]
|
37
|
+
else
|
38
|
+
width = INDEX
|
39
|
+
depth = INITIAL_DEPTH
|
40
|
+
while (width = width[codepoint / depth]).instance_of? Array
|
41
|
+
codepoint %= depth
|
42
|
+
depth /= 16
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
width == :A ? ambiguous : (width || 1)
|
47
|
+
}
|
48
|
+
|
49
|
+
# Substract emoji error
|
50
|
+
res -= emoji_extra_width_of(string, ambiguous) if options[:emoji]
|
51
|
+
|
52
|
+
# Return result + prevent negative lengths
|
53
|
+
res < 0 ? 0 : res
|
54
|
+
end
|
55
|
+
|
56
|
+
# Same as .width_no_overwrite - but with applying overwrites for each char
|
57
|
+
def self.width_all_features(string, ambiguous, overwrite, options)
|
58
|
+
# Sum of all chars widths
|
59
|
+
res = string.codepoints.sum{ |codepoint|
|
60
|
+
next overwrite[codepoint] if overwrite[codepoint]
|
61
|
+
|
62
|
+
if codepoint > 15 && codepoint < 161 # very common
|
63
|
+
next 1
|
64
|
+
elsif codepoint < 0x1001
|
65
|
+
width = FIRST_4096[codepoint]
|
66
|
+
else
|
67
|
+
width = INDEX
|
68
|
+
depth = INITIAL_DEPTH
|
69
|
+
while (width = width[codepoint / depth]).instance_of? Array
|
70
|
+
codepoint %= depth
|
71
|
+
depth /= 16
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
width == :A ? ambiguous : (width || 1)
|
76
|
+
}
|
77
|
+
|
78
|
+
# Substract emoji error
|
79
|
+
res -= emoji_extra_width_of(string, ambiguous, overwrite) if options[:emoji]
|
80
|
+
|
81
|
+
# Return result + prevent negative lengths
|
82
|
+
res < 0 ? 0 : res
|
83
|
+
end
|
84
|
+
|
85
|
+
|
86
|
+
def self.emoji_extra_width_of(string, ambiguous = 1, overwrite = {}, _ = {})
|
87
|
+
require "unicode/emoji"
|
88
|
+
|
89
|
+
extra_width = 0
|
90
|
+
modifier_regex = /[#{ Unicode::Emoji::EMOJI_MODIFIERS.pack("U*") }]/
|
91
|
+
zwj_regex = /(?<=#{ [Unicode::Emoji::ZWJ].pack("U") })./
|
92
|
+
|
93
|
+
string.scan(Unicode::Emoji::REGEX){ |emoji|
|
94
|
+
extra_width += 2 * emoji.scan(modifier_regex).size
|
95
|
+
|
96
|
+
emoji.scan(zwj_regex){ |zwj_succ|
|
97
|
+
extra_width += self.of(zwj_succ, ambiguous, overwrite)
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
extra_width
|
102
|
+
end
|
103
|
+
|
104
|
+
def initialize(ambiguous: 1, overwrite: {}, emoji: false)
|
105
|
+
@ambiguous = ambiguous
|
106
|
+
@overwrite = overwrite
|
107
|
+
@emoji = emoji
|
108
|
+
end
|
109
|
+
|
110
|
+
def get_config(**kwargs)
|
111
|
+
[
|
112
|
+
kwargs[:ambiguous] || @ambiguous,
|
113
|
+
kwargs[:overwrite] || @overwrite,
|
114
|
+
{ emoji: kwargs[:emoji] || @emoji },
|
115
|
+
]
|
116
|
+
end
|
117
|
+
|
118
|
+
def of(string, **kwargs)
|
119
|
+
self.class.of(string, *get_config(**kwargs))
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|