brakeman 6.2.2 → 8.0.4
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 +93 -0
- data/README.md +4 -4
- data/bundle/load.rb +16 -14
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/LICENSE.txt +33 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/NEWS.md +1009 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/README.md +55 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/core_ext/array.rb +9 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/core_ext/string.rb +9 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/fields_converter.rb +96 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/input_record_separator.rb +18 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/parser.rb +1302 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/row.rb +757 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/table.rb +1055 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/version.rb +6 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/writer.rb +209 -0
- data/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv.rb +3017 -0
- data/bundle/ruby/3.2.0/gems/erubi-1.13.1/CHANGELOG +111 -0
- data/bundle/ruby/{3.1.0/gems/erubis-2.7.0 → 3.2.0/gems/erubi-1.13.1}/MIT-LICENSE +1 -0
- data/bundle/ruby/3.2.0/gems/erubi-1.13.1/README.rdoc +151 -0
- data/bundle/ruby/3.2.0/gems/erubi-1.13.1/lib/erubi/capture_block.rb +91 -0
- data/bundle/ruby/3.2.0/gems/erubi-1.13.1/lib/erubi/capture_end.rb +58 -0
- data/bundle/ruby/3.2.0/gems/erubi-1.13.1/lib/erubi.rb +299 -0
- data/bundle/ruby/{3.1.0/gems/haml-5.2.2 → 3.2.0/gems/haml-6.4.0}/CHANGELOG.md +180 -4
- data/bundle/ruby/{3.1.0/gems/haml-5.2.2 → 3.2.0/gems/haml-6.4.0}/FAQ.md +1 -1
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/Gemfile +34 -0
- data/bundle/ruby/{3.1.0/gems/haml-5.2.2 → 3.2.0/gems/haml-6.4.0}/MIT-LICENSE +1 -1
- data/bundle/ruby/{3.1.0/gems/haml-5.2.2 → 3.2.0/gems/haml-6.4.0}/README.md +23 -34
- data/bundle/ruby/{3.1.0/gems/haml-5.2.2 → 3.2.0/gems/haml-6.4.0}/REFERENCE.md +100 -171
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/exe/haml +6 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/haml.gemspec +45 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/ambles.rb +20 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/attribute_builder.rb +162 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/attribute_compiler.rb +133 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/attribute_parser.rb +116 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/cli.rb +154 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/compiler/children_compiler.rb +155 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/compiler/comment_compiler.rb +51 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/compiler/doctype_compiler.rb +52 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/compiler/script_compiler.rb +114 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/compiler/silent_script_compiler.rb +24 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/compiler/tag_compiler.rb +76 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/compiler.rb +97 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/dynamic_merger.rb +67 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/engine.rb +59 -0
- data/bundle/ruby/{3.1.0/gems/haml-5.2.2 → 3.2.0/gems/haml-6.4.0}/lib/haml/error.rb +5 -4
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/escape.rb +13 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/escape_any.rb +21 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/base.rb +12 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/cdata.rb +20 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/coffee.rb +17 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/css.rb +33 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/erb.rb +10 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/escaped.rb +22 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/javascript.rb +33 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/less.rb +20 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/markdown.rb +11 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/plain.rb +29 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/preserve.rb +22 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/ruby.rb +10 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/sass.rb +15 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/scss.rb +15 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/text_base.rb +25 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters/tilt_base.rb +59 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/filters.rb +75 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/force_escape.rb +29 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/helpers.rb +15 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/html.rb +22 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/identity.rb +13 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/object_ref.rb +35 -0
- data/bundle/ruby/{3.1.0/gems/haml-5.2.2 → 3.2.0/gems/haml-6.4.0}/lib/haml/parser.rb +159 -24
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/rails_helpers.rb +53 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/rails_template.rb +62 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/railtie.rb +10 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/ruby_expression.rb +32 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/string_splitter.rb +140 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/template.rb +20 -0
- data/bundle/ruby/{3.1.0/gems/haml-5.2.2 → 3.2.0/gems/haml-6.4.0}/lib/haml/temple_line_counter.rb +2 -1
- data/bundle/ruby/{3.1.0/gems/haml-5.2.2 → 3.2.0/gems/haml-6.4.0}/lib/haml/util.rb +19 -15
- data/bundle/ruby/{3.1.0/gems/haml-5.2.2 → 3.2.0/gems/haml-6.4.0}/lib/haml/version.rb +1 -2
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml/whitespace.rb +8 -0
- data/bundle/ruby/3.2.0/gems/haml-6.4.0/lib/haml.rb +13 -0
- data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/Changelog.md +4 -0
- data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/Gemfile +1 -0
- data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/list_renderer.rb +2 -2
- data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/menu.rb +7 -5
- data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/version.rb +1 -1
- data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline.rb +17 -12
- data/bundle/ruby/3.2.0/gems/parallel-1.27.0/lib/parallel/version.rb +4 -0
- data/bundle/ruby/{3.1.0/gems/parallel-1.26.3 → 3.2.0/gems/parallel-1.27.0}/lib/parallel.rb +1 -1
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/config.rb +27 -26
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/history.rb +3 -3
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/io/ansi.rb +76 -138
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/io/dumb.rb +16 -2
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/io/windows.rb +77 -60
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/io.rb +14 -0
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/key_actor/base.rb +10 -4
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/key_actor/emacs.rb +96 -96
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/key_actor/vi_command.rb +182 -182
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/key_actor/vi_insert.rb +137 -137
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/key_stroke.rb +26 -16
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/line_editor.rb +324 -516
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/unicode/east_asian_width.rb +48 -23
- data/bundle/ruby/3.2.0/gems/reline-0.6.3/lib/reline/unicode.rb +421 -0
- data/bundle/ruby/3.2.0/gems/reline-0.6.3/lib/reline/version.rb +3 -0
- data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline.rb +41 -33
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/NEWS.md +219 -1
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/attribute.rb +7 -8
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/cdata.rb +1 -1
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/child.rb +2 -3
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/comment.rb +1 -1
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/doctype.rb +3 -8
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/document.rb +21 -5
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/element.rb +53 -59
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/encoding.rb +3 -6
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/functions.rb +3 -3
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/instruction.rb +1 -1
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/namespace.rb +4 -4
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/node.rb +2 -2
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/parsers/baseparser.rb +208 -116
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/parsers/pullparser.rb +4 -0
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/parsers/xpathparser.rb +4 -4
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/quickpath.rb +19 -18
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/rexml.rb +1 -1
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/security.rb +2 -2
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/source.rb +68 -8
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/text.rb +29 -57
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/validation/relaxng.rb +27 -26
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/validation/validation.rb +8 -8
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/xpath.rb +2 -13
- data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/xpath_parser.rb +44 -42
- data/bundle/ruby/{3.1.0/gems/ruby2ruby-2.5.1 → 3.2.0/gems/ruby2ruby-2.5.2}/History.rdoc +6 -0
- data/bundle/ruby/{3.1.0/gems/ruby2ruby-2.5.1 → 3.2.0/gems/ruby2ruby-2.5.2}/lib/ruby2ruby.rb +7 -4
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/History.rdoc +67 -0
- data/bundle/ruby/3.2.0/gems/ruby_parser-3.22.0/Manifest.txt +39 -0
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/README.rdoc +15 -3
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/compare/normalize.rb +19 -3
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/gauntlet.md +35 -5
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/lib/ruby_lexer.rb +9 -18
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/lib/ruby_lexer.rex.rb +1 -2
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/lib/ruby_parser.rb +18 -14
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby_parser.yy → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser2.yy} +15 -22
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby20_parser.rb → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser20.rb} +19 -22
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby21_parser.rb → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser21.rb} +19 -22
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby22_parser.rb → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser22.rb} +19 -22
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby23_parser.rb → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser23.rb} +19 -22
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby24_parser.rb → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser24.rb} +19 -22
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby25_parser.rb → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser25.rb} +19 -22
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby26_parser.rb → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser26.rb} +19 -22
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby27_parser.rb → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser27.rb} +21 -24
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby3_parser.yy → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser3.yy} +214 -79
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby30_parser.rb → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser30.rb} +3339 -3351
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3/lib/ruby31_parser.rb → 3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser31.rb} +3772 -3808
- data/bundle/ruby/3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser32.rb +13565 -0
- data/bundle/ruby/3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser33.rb +13653 -0
- data/bundle/ruby/3.2.0/gems/ruby_parser-3.22.0/lib/ruby_parser34.rb +13653 -0
- data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/lib/ruby_parser_extras.rb +109 -60
- data/bundle/ruby/{3.1.0/gems/sexp_processor-4.17.2 → 3.2.0/gems/sexp_processor-4.17.5}/History.rdoc +20 -0
- data/bundle/ruby/{3.1.0/gems/sexp_processor-4.17.2 → 3.2.0/gems/sexp_processor-4.17.5}/lib/pt_testcase.rb +1 -1
- data/bundle/ruby/{3.1.0/gems/sexp_processor-4.17.2 → 3.2.0/gems/sexp_processor-4.17.5}/lib/sexp.rb +1 -1
- data/bundle/ruby/{3.1.0/gems/sexp_processor-4.17.2 → 3.2.0/gems/sexp_processor-4.17.5}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/CHANGES +4 -0
- data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/encoding.rb +1 -1
- data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/version.rb +1 -1
- data/bundle/ruby/3.2.0/gems/terminal-table-4.0.0/History.rdoc +149 -0
- data/bundle/ruby/3.2.0/gems/terminal-table-4.0.0/README.md +417 -0
- data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/lib/terminal-table/cell.rb +9 -9
- data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/lib/terminal-table/row.rb +18 -4
- data/bundle/ruby/3.2.0/gems/terminal-table-4.0.0/lib/terminal-table/separator.rb +66 -0
- data/bundle/ruby/3.2.0/gems/terminal-table-4.0.0/lib/terminal-table/style.rb +284 -0
- data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/lib/terminal-table/table.rb +49 -18
- data/bundle/ruby/3.2.0/gems/terminal-table-4.0.0/lib/terminal-table/util.rb +13 -0
- data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/lib/terminal-table/version.rb +1 -1
- data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/lib/terminal-table.rb +2 -2
- data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/terminal-table.gemspec +3 -4
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/asciidoc.rb +12 -5
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/babel.rb +5 -0
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/builder.rb +4 -0
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/coffee.rb +14 -4
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/commonmarker.rb +41 -0
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/csv.rb +63 -0
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/erb.rb +130 -0
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/erubi.rb +41 -8
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/etanni.rb +7 -0
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/haml.rb +67 -1
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/kramdown.rb +59 -0
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/liquid.rb +93 -0
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/livescript.rb +11 -4
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/mapping.rb +9 -9
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/markaby.rb +11 -2
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/nokogiri.rb +13 -2
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/pandoc.rb +81 -0
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/pipeline.rb +6 -1
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/plain.rb +5 -1
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/prawn.rb +17 -6
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/radius.rb +96 -0
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/rdiscount.rb +82 -0
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/rdoc.rb +33 -0
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/redcarpet.rb +73 -0
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/redcloth.rb +40 -0
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/rst-pandoc.rb +33 -0
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/sass.rb +16 -3
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/slim.rb +18 -0
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/string.rb +10 -2
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/template.rb +189 -33
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/typescript.rb +5 -0
- data/bundle/ruby/3.2.0/gems/tilt-2.7.0/lib/tilt/yajl.rb +91 -0
- data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt.rb +9 -5
- data/bundle/ruby/3.2.0/gems/unicode-display_width-3.2.0/CHANGELOG.md +299 -0
- data/bundle/ruby/{3.1.0/gems/unicode-display_width-1.8.0 → 3.2.0/gems/unicode-display_width-3.2.0}/MIT-LICENSE.txt +1 -1
- data/bundle/ruby/3.2.0/gems/unicode-display_width-3.2.0/README.md +194 -0
- data/bundle/ruby/3.2.0/gems/unicode-display_width-3.2.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/3.2.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/constants.rb +10 -0
- data/bundle/ruby/3.2.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/emoji_support.rb +55 -0
- data/bundle/ruby/3.2.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/index.rb +34 -0
- data/bundle/ruby/3.2.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/no_string_ext.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/reline_ext.rb +14 -0
- data/bundle/ruby/3.2.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/string_ext.rb +9 -0
- data/bundle/ruby/3.2.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width.rb +247 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/CHANGELOG.md +202 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/CODE_OF_CONDUCT.md +74 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/Gemfile +9 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/Gemfile.lock +37 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/MIT-LICENSE.txt +20 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/README.md +205 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/data/emoji.marshal.gz +0 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/data/generate_constants.rb +344 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/constants.rb +50 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_basic.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_emoji_keycap.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_include_mqe.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_include_mqe_uqe.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_include_text.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_picto.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_picto_no_emoji.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_possible.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_prop_component.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_prop_emoji.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_prop_modifier.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_prop_modifier_base.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_prop_presentation.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_text.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_text_presentation.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_valid.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_valid_include_text.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_well_formed.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated/regex_well_formed_include_text.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_basic.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_emoji_keycap.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_include_mqe.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_include_text.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_picto.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_picto_no_emoji.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_possible.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_prop_component.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_prop_emoji.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_prop_modifier.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_prop_modifier_base.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_prop_presentation.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_text.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_text_presentation.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_valid.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_valid_include_text.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_well_formed.rb +8 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/generated_native/regex_well_formed_include_text.rb +8 -0
- data/bundle/ruby/{3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width → 3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji}/index.rb +5 -3
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/lazy_constants.rb +56 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji/list.rb +13 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/lib/unicode/emoji.rb +111 -0
- data/bundle/ruby/3.2.0/gems/unicode-emoji-4.2.0/unicode-emoji.gemspec +22 -0
- data/lib/brakeman/app_tree.rb +87 -25
- data/lib/brakeman/checks/base_check.rb +5 -2
- data/lib/brakeman/checks/check_deserialize.rb +4 -1
- data/lib/brakeman/checks/check_eol_rails.rb +1 -0
- data/lib/brakeman/checks/check_eol_ruby.rb +1 -0
- data/lib/brakeman/checks/check_evaluation.rb +45 -8
- data/lib/brakeman/checks/check_model_attr_accessible.rb +1 -0
- data/lib/brakeman/checks/check_model_attributes.rb +1 -1
- data/lib/brakeman/checks/check_render.rb +6 -27
- data/lib/brakeman/checks/check_render_rce.rb +43 -0
- data/lib/brakeman/checks/check_session_settings.rb +1 -1
- data/lib/brakeman/checks/check_sql.rb +15 -5
- data/lib/brakeman/checks/check_weak_rsa_key.rb +1 -1
- data/lib/brakeman/checks.rb +31 -25
- data/lib/brakeman/commandline.rb +22 -5
- data/lib/brakeman/file_parser.rb +2 -0
- data/lib/brakeman/file_path.rb +4 -0
- data/lib/brakeman/logger.rb +265 -0
- data/lib/brakeman/messages.rb +1 -1
- data/lib/brakeman/options.rb +22 -16
- data/lib/brakeman/parsers/haml6_embedded.rb +23 -0
- data/lib/brakeman/parsers/rails_erubi.rb +82 -0
- data/lib/brakeman/parsers/template_parser.rb +39 -22
- data/lib/brakeman/processor.rb +4 -2
- data/lib/brakeman/processors/alias_processor.rb +18 -4
- data/lib/brakeman/processors/base_processor.rb +2 -0
- data/lib/brakeman/processors/controller_alias_processor.rb +1 -1
- data/lib/brakeman/processors/controller_processor.rb +3 -3
- data/lib/brakeman/processors/{erubis_template_processor.rb → erubi_template_procesor.rb} +3 -3
- data/lib/brakeman/processors/haml6_template_processor.rb +92 -0
- data/lib/brakeman/processors/haml_template_processor.rb +17 -2
- data/lib/brakeman/processors/lib/file_type_detector.rb +9 -7
- data/lib/brakeman/processors/lib/rails2_config_processor.rb +5 -4
- data/lib/brakeman/processors/lib/rails2_route_processor.rb +1 -1
- data/lib/brakeman/processors/lib/rails3_config_processor.rb +11 -2
- data/lib/brakeman/processors/lib/render_helper.rb +39 -2
- data/lib/brakeman/processors/lib/render_path.rb +1 -1
- data/lib/brakeman/processors/model_processor.rb +1 -1
- data/lib/brakeman/processors/template_processor.rb +1 -1
- data/lib/brakeman/report/ignore/config.rb +1 -2
- data/lib/brakeman/report/pager.rb +1 -1
- data/lib/brakeman/report/report_html.rb +1 -1
- data/lib/brakeman/report/report_junit.rb +4 -57
- data/lib/brakeman/report/report_sarif.rb +122 -2
- data/lib/brakeman/report/templates/header.html.erb +8 -3
- data/lib/brakeman/report/templates/ignored_warnings.html.erb +3 -3
- data/lib/brakeman/rescanner.rb +40 -390
- data/lib/brakeman/scanner.rb +105 -96
- data/lib/brakeman/tracker/collection.rb +12 -2
- data/lib/brakeman/tracker/config.rb +17 -13
- data/lib/brakeman/tracker/constants.rb +17 -2
- data/lib/brakeman/tracker/controller.rb +1 -1
- data/lib/brakeman/tracker/file_cache.rb +83 -0
- data/lib/brakeman/tracker.rb +32 -17
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman.rb +130 -55
- data/lib/ruby_parser/bm_sexp.rb +14 -0
- metadata +459 -410
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/CHANGES.txt +0 -828
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/README.txt +0 -102
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/contrib/erubis +0 -3468
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -132
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/contrib/inline-require +0 -179
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/context.rb +0 -83
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -357
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -117
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -113
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -110
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -119
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -126
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -95
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -99
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -125
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -114
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -127
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -120
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -723
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/error.rb +0 -23
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -88
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -85
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -47
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -197
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -353
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -9
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/main.rb +0 -516
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -58
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -144
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis/util.rb +0 -22
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib/erubis.rb +0 -73
- data/bundle/ruby/3.1.0/gems/erubis-2.7.0/setup.rb +0 -1331
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/Gemfile +0 -16
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/TODO +0 -24
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/haml.gemspec +0 -45
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/attribute_builder.rb +0 -219
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/attribute_compiler.rb +0 -237
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/attribute_parser.rb +0 -150
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/buffer.rb +0 -182
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/compiler.rb +0 -330
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/engine.rb +0 -238
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/escapable.rb +0 -77
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/exec.rb +0 -347
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/filters.rb +0 -399
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/generator.rb +0 -42
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/action_view_extensions.rb +0 -60
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/action_view_mods.rb +0 -132
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/action_view_xss_mods.rb +0 -60
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/safe_erubi_template.rb +0 -20
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/safe_erubis_template.rb +0 -33
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/xss_mods.rb +0 -114
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers.rb +0 -709
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/options.rb +0 -273
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/plugin.rb +0 -54
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/railtie.rb +0 -53
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/sass_rails_filter.rb +0 -47
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template/options.rb +0 -27
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template.rb +0 -39
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/temple_engine.rb +0 -124
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml.rb +0 -25
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/yard/default/fulldoc/html/css/common.sass +0 -15
- data/bundle/ruby/3.1.0/gems/haml-5.2.2/yard/default/layout/html/footer.erb +0 -12
- data/bundle/ruby/3.1.0/gems/parallel-1.26.3/lib/parallel/version.rb +0 -4
- 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/ruby_parser-3.20.3/Manifest.txt +0 -48
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby20_parser.y +0 -2707
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby21_parser.y +0 -2724
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby22_parser.y +0 -2735
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby23_parser.y +0 -2737
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby24_parser.y +0 -2745
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby25_parser.y +0 -2745
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby26_parser.y +0 -2760
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby27_parser.y +0 -3360
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby30_parser.y +0 -3508
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby31_parser.y +0 -3542
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.rb +0 -13601
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.y +0 -3543
- 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/creole.rb +0 -14
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/csv.rb +0 -53
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/erb.rb +0 -65
- 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/kramdown.rb +0 -13
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/liquid.rb +0 -40
- 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/pandoc.rb +0 -39
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/radius.rb +0 -41
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/rdiscount.rb +0 -23
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/rdoc.rb +0 -19
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/redcarpet.rb +0 -31
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/redcloth.rb +0 -13
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/rst-pandoc.rb +0 -10
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/slim.rb +0 -5
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/wikicloth.rb +0 -12
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/yajl.rb +0 -81
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/CHANGELOG.md +0 -137
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/README.md +0 -124
- 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/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/lib/brakeman/parsers/erubis_patch.rb +0 -11
- data/lib/brakeman/parsers/rails2_erubis.rb +0 -9
- data/lib/brakeman/parsers/rails2_xss_plugin_erubis.rb +0 -52
- data/lib/brakeman/parsers/rails3_erubis.rb +0 -85
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/AUTHORS +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/COPYING +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/LICENSE +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/README.md +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/TODO +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/highline.gemspec +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/builtin_styles.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/color_scheme.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/compatibility.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/custom_errors.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/import.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/io_console_compatible.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/list.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/menu/item.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/paginator.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/question/answer_converter.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/question.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/question_asker.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/simulate.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/statement.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/string.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/string_extensions.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/style.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/template_renderer.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/terminal/io_console.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/terminal/ncurses.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/terminal/unix_stty.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/terminal.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/highline-3.1.1 → 3.2.0/gems/highline-3.1.2}/lib/highline/wrapper.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/parallel-1.26.3 → 3.2.0/gems/parallel-1.27.0}/MIT-LICENSE.txt +0 -0
- /data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/BSDL +0 -0
- /data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/COPYING +0 -0
- /data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/README.md +0 -0
- /data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/face.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/key_actor/composite.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/key_actor.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/kill_ring.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/license_of_rb-readline +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/LICENSE.txt +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/README.md +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/attlistdecl.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/dtd/attlistdecl.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/dtd/dtd.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/dtd/elementdecl.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/dtd/entitydecl.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/dtd/notationdecl.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/entity.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/formatters/default.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/formatters/pretty.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/formatters/transitive.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/light/node.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/output.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/parent.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/parseexception.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/parsers/lightparser.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/parsers/sax2parser.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/parsers/streamparser.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/parsers/treeparser.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/parsers/ultralightparser.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/sax2listener.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/streamlistener.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/undefinednamespaceexception.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/validation/validationexception.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/xmldecl.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml/xmltokens.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/rexml-3.3.8 → 3.2.0/gems/rexml-3.4.4}/lib/rexml.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/ruby2ruby-2.5.1 → 3.2.0/gems/ruby2ruby-2.5.2}/Manifest.txt +0 -0
- /data/bundle/ruby/{3.1.0/gems/ruby2ruby-2.5.1 → 3.2.0/gems/ruby2ruby-2.5.2}/README.rdoc +0 -0
- /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/debugging.md +0 -0
- /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/lib/rp_extensions.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/lib/rp_stringscanner.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/lib/ruby_lexer.rex +0 -0
- /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/lib/ruby_lexer_strings.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/tools/munge.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.20.3 → 3.2.0/gems/ruby_parser-3.22.0}/tools/ripper.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/sexp_processor-4.17.2 → 3.2.0/gems/sexp_processor-4.17.5}/Manifest.txt +0 -0
- /data/bundle/ruby/{3.1.0/gems/sexp_processor-4.17.2 → 3.2.0/gems/sexp_processor-4.17.5}/README.rdoc +0 -0
- /data/bundle/ruby/{3.1.0/gems/sexp_processor-4.17.2 → 3.2.0/gems/sexp_processor-4.17.5}/lib/composite_sexp_processor.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/sexp_processor-4.17.2 → 3.2.0/gems/sexp_processor-4.17.5}/lib/sexp_matcher.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/sexp_processor-4.17.2 → 3.2.0/gems/sexp_processor-4.17.5}/lib/strict_sexp.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/sexp_processor-4.17.2 → 3.2.0/gems/sexp_processor-4.17.5}/lib/unique.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/CHANGES +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/Gemfile +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/LICENSE +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/README.jp.md +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/README.md +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/code_attributes.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/command.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/controls.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/do_inserter.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/embedded.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/end_inserter.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/engine.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/erb_converter.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/filter.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/grammar.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/include.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/interpolation.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/logic_less/context.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/logic_less/filter.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/logic_less.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/parser.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/railtie.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/smart/escaper.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/smart/filter.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/smart/parser.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/smart.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/splat/builder.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/splat/filter.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/template.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/translator.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim/version.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/lib/slim.rb +0 -0
- /data/bundle/ruby/{3.1.0 → 3.2.0}/gems/slim-5.2.1/slim.gemspec +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/EXPRESSIONS.md +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/Gemfile +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/LICENSE +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/README.md +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/engine.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/erb/engine.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/erb/parser.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/erb/template.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/erb/trimming.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/exceptions.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filter.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/ambles.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/code_merger.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/control_flow.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/dynamic_inliner.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/dynamic_merger.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/eraser.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/escapable.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/multi_flattener.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/remove_bom.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/static_analyzer.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/static_merger.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/string_splitter.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/filters/validator.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/generator.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/generators/array.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/generators/array_buffer.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/generators/erb.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/generators/rails_output_buffer.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/generators/string_buffer.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/grammar.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/html/attribute_merger.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/html/attribute_remover.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/html/attribute_sorter.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/html/dispatcher.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/html/fast.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/html/filter.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/html/pretty.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/html/safe.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/map.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/mixins/dispatcher.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/mixins/engine_dsl.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/mixins/grammar_dsl.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/mixins/options.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/mixins/template.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/parser.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/static_analyzer.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/templates/rails.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/templates/tilt.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/templates.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple/utils.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/lib/temple.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/temple-0.10.3 → 3.2.0/gems/temple-0.10.4}/temple.gemspec +0 -0
- /data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/Gemfile +0 -0
- /data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/LICENSE.txt +0 -0
- /data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/Manifest +0 -0
- /data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/Todo.rdoc +0 -0
- /data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/lib/terminal-table/import.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/terminal-table-1.8.0 → 3.2.0/gems/terminal-table-4.0.0}/lib/terminal-table/table_helper.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/COPYING +0 -0
- /data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/_emacs_org.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/_handlebars.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/_jbuilder.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/_org.rb +0 -0
- /data/bundle/ruby/{3.1.0/gems/tilt-2.4.0 → 3.2.0/gems/tilt-2.7.0}/lib/tilt/cli.rb +0 -0
data/bundle/ruby/{3.1.0/gems/reline-0.5.10 → 3.2.0/gems/reline-0.6.3}/lib/reline/line_editor.rb
RENAMED
|
@@ -13,7 +13,6 @@ class Reline::LineEditor
|
|
|
13
13
|
attr_accessor :prompt_proc
|
|
14
14
|
attr_accessor :auto_indent_proc
|
|
15
15
|
attr_accessor :dig_perfect_match_proc
|
|
16
|
-
attr_writer :output
|
|
17
16
|
|
|
18
17
|
VI_MOTIONS = %i{
|
|
19
18
|
ed_prev_char
|
|
@@ -36,7 +35,6 @@ class Reline::LineEditor
|
|
|
36
35
|
|
|
37
36
|
module CompletionState
|
|
38
37
|
NORMAL = :normal
|
|
39
|
-
COMPLETION = :completion
|
|
40
38
|
MENU = :menu
|
|
41
39
|
MENU_WITH_PERFECT_MATCH = :menu_with_perfect_match
|
|
42
40
|
PERFECT_MATCH = :perfect_match
|
|
@@ -72,17 +70,21 @@ class Reline::LineEditor
|
|
|
72
70
|
|
|
73
71
|
MINIMUM_SCROLLBAR_HEIGHT = 1
|
|
74
72
|
|
|
75
|
-
def initialize(config
|
|
73
|
+
def initialize(config)
|
|
76
74
|
@config = config
|
|
77
75
|
@completion_append_character = ''
|
|
78
76
|
@screen_size = [0, 0] # Should be initialized with actual winsize in LineEditor#reset
|
|
79
|
-
reset_variables
|
|
77
|
+
reset_variables
|
|
80
78
|
end
|
|
81
79
|
|
|
82
80
|
def io_gate
|
|
83
81
|
Reline::IOGate
|
|
84
82
|
end
|
|
85
83
|
|
|
84
|
+
def encoding
|
|
85
|
+
io_gate.encoding
|
|
86
|
+
end
|
|
87
|
+
|
|
86
88
|
def set_pasting_state(in_pasting)
|
|
87
89
|
# While pasting, text to be inserted is stored to @continuous_insertion_buffer.
|
|
88
90
|
# After pasting, this buffer should be force inserted.
|
|
@@ -136,9 +138,9 @@ class Reline::LineEditor
|
|
|
136
138
|
end
|
|
137
139
|
end
|
|
138
140
|
|
|
139
|
-
def reset(prompt = ''
|
|
141
|
+
def reset(prompt = '')
|
|
140
142
|
@screen_size = Reline::IOGate.get_screen_size
|
|
141
|
-
reset_variables(prompt
|
|
143
|
+
reset_variables(prompt)
|
|
142
144
|
@rendered_screen.base_y = Reline::IOGate.cursor_pos.y
|
|
143
145
|
if ENV.key?('RELINE_ALT_SCROLLBAR')
|
|
144
146
|
@full_block = '::'
|
|
@@ -150,7 +152,7 @@ class Reline::LineEditor
|
|
|
150
152
|
@upper_half_block = '▀'
|
|
151
153
|
@lower_half_block = '▄'
|
|
152
154
|
@block_elem_width = 1
|
|
153
|
-
elsif
|
|
155
|
+
elsif encoding == Encoding::UTF_8
|
|
154
156
|
@full_block = '█'
|
|
155
157
|
@upper_half_block = '▀'
|
|
156
158
|
@lower_half_block = '▄'
|
|
@@ -219,10 +221,9 @@ class Reline::LineEditor
|
|
|
219
221
|
@eof
|
|
220
222
|
end
|
|
221
223
|
|
|
222
|
-
def reset_variables(prompt = ''
|
|
224
|
+
def reset_variables(prompt = '')
|
|
223
225
|
@prompt = prompt.gsub("\n", "\\n")
|
|
224
226
|
@mark_pointer = nil
|
|
225
|
-
@encoding = encoding
|
|
226
227
|
@is_multiline = false
|
|
227
228
|
@finished = false
|
|
228
229
|
@history_pointer = nil
|
|
@@ -239,7 +240,7 @@ class Reline::LineEditor
|
|
|
239
240
|
@searching_prompt = nil
|
|
240
241
|
@just_cursor_moving = false
|
|
241
242
|
@eof = false
|
|
242
|
-
@continuous_insertion_buffer = String.new(encoding:
|
|
243
|
+
@continuous_insertion_buffer = String.new(encoding: encoding)
|
|
243
244
|
@scroll_partial_screen = 0
|
|
244
245
|
@drop_terminate_spaces = false
|
|
245
246
|
@in_pasting = false
|
|
@@ -249,9 +250,9 @@ class Reline::LineEditor
|
|
|
249
250
|
@resized = false
|
|
250
251
|
@cache = {}
|
|
251
252
|
@rendered_screen = RenderedScreen.new(base_y: 0, lines: [], cursor_y: 0)
|
|
252
|
-
@
|
|
253
|
-
@
|
|
254
|
-
@
|
|
253
|
+
@undo_redo_history = [[[""], 0, 0]]
|
|
254
|
+
@undo_redo_index = 0
|
|
255
|
+
@restoring = false
|
|
255
256
|
@prev_action_state = NullActionState
|
|
256
257
|
@next_action_state = NullActionState
|
|
257
258
|
reset_line
|
|
@@ -259,11 +260,10 @@ class Reline::LineEditor
|
|
|
259
260
|
|
|
260
261
|
def reset_line
|
|
261
262
|
@byte_pointer = 0
|
|
262
|
-
@buffer_of_lines = [String.new(encoding:
|
|
263
|
+
@buffer_of_lines = [String.new(encoding: encoding)]
|
|
263
264
|
@line_index = 0
|
|
264
265
|
@cache.clear
|
|
265
266
|
@line_backup_in_history = nil
|
|
266
|
-
@multibyte_buffer = String.new(encoding: 'ASCII-8BIT')
|
|
267
267
|
end
|
|
268
268
|
|
|
269
269
|
def multiline_on
|
|
@@ -275,7 +275,7 @@ class Reline::LineEditor
|
|
|
275
275
|
end
|
|
276
276
|
|
|
277
277
|
private def insert_new_line(cursor_line, next_line)
|
|
278
|
-
@buffer_of_lines.insert(@line_index + 1, String.new(next_line, encoding:
|
|
278
|
+
@buffer_of_lines.insert(@line_index + 1, String.new(next_line, encoding: encoding))
|
|
279
279
|
@buffer_of_lines[@line_index] = cursor_line
|
|
280
280
|
@line_index += 1
|
|
281
281
|
@byte_pointer = 0
|
|
@@ -297,8 +297,8 @@ class Reline::LineEditor
|
|
|
297
297
|
end
|
|
298
298
|
end
|
|
299
299
|
|
|
300
|
-
private def
|
|
301
|
-
Reline::Unicode.
|
|
300
|
+
private def split_line_by_width(str, max_width, offset: 0)
|
|
301
|
+
Reline::Unicode.split_line_by_width(str, max_width, encoding, offset: offset)
|
|
302
302
|
end
|
|
303
303
|
|
|
304
304
|
def current_byte_pointer_cursor
|
|
@@ -388,8 +388,8 @@ class Reline::LineEditor
|
|
|
388
388
|
if (cached = cached_wraps[[prompt, line]])
|
|
389
389
|
next cached
|
|
390
390
|
end
|
|
391
|
-
*wrapped_prompts, code_line_prompt =
|
|
392
|
-
wrapped_lines =
|
|
391
|
+
*wrapped_prompts, code_line_prompt = split_line_by_width(prompt, width)
|
|
392
|
+
wrapped_lines = split_line_by_width(line, width, offset: calculate_width(code_line_prompt, true))
|
|
393
393
|
wrapped_prompts.map { |p| [p, ''] } + [[code_line_prompt, wrapped_lines.first]] + wrapped_lines.drop(1).map { |c| ['', c] }
|
|
394
394
|
end
|
|
395
395
|
end
|
|
@@ -413,7 +413,7 @@ class Reline::LineEditor
|
|
|
413
413
|
# do nothing
|
|
414
414
|
elsif level == :blank
|
|
415
415
|
Reline::IOGate.move_cursor_column base_x
|
|
416
|
-
|
|
416
|
+
Reline::IOGate.write "#{Reline::IOGate.reset_color_sequence}#{' ' * width}"
|
|
417
417
|
else
|
|
418
418
|
x, w, content = new_items[level]
|
|
419
419
|
cover_begin = base_x != 0 && new_levels[base_x - 1] == level
|
|
@@ -423,7 +423,7 @@ class Reline::LineEditor
|
|
|
423
423
|
content, pos = Reline::Unicode.take_mbchar_range(content, base_x - x, width, cover_begin: cover_begin, cover_end: cover_end, padding: true)
|
|
424
424
|
end
|
|
425
425
|
Reline::IOGate.move_cursor_column x + pos
|
|
426
|
-
|
|
426
|
+
Reline::IOGate.write "#{Reline::IOGate.reset_color_sequence}#{content}#{Reline::IOGate.reset_color_sequence}"
|
|
427
427
|
end
|
|
428
428
|
base_x += width
|
|
429
429
|
end
|
|
@@ -436,8 +436,8 @@ class Reline::LineEditor
|
|
|
436
436
|
# Calculate cursor position in word wrapped content.
|
|
437
437
|
def wrapped_cursor_position
|
|
438
438
|
prompt_width = calculate_width(prompt_list[@line_index], true)
|
|
439
|
-
line_before_cursor = whole_lines[@line_index].byteslice(0, @byte_pointer)
|
|
440
|
-
wrapped_line_before_cursor =
|
|
439
|
+
line_before_cursor = Reline::Unicode.escape_for_print(whole_lines[@line_index].byteslice(0, @byte_pointer))
|
|
440
|
+
wrapped_line_before_cursor = split_line_by_width(' ' * prompt_width + line_before_cursor, screen_width)
|
|
441
441
|
wrapped_cursor_y = wrapped_prompt_and_input_lines[0...@line_index].sum(&:size) + wrapped_line_before_cursor.size - 1
|
|
442
442
|
wrapped_cursor_x = calculate_width(wrapped_line_before_cursor.last)
|
|
443
443
|
[wrapped_cursor_x, wrapped_cursor_y]
|
|
@@ -459,18 +459,15 @@ class Reline::LineEditor
|
|
|
459
459
|
end
|
|
460
460
|
|
|
461
461
|
def render_finished
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
462
|
+
Reline::IOGate.buffered_output do
|
|
463
|
+
render_differential([], 0, 0)
|
|
464
|
+
lines = @buffer_of_lines.size.times.map do |i|
|
|
465
|
+
line = Reline::Unicode.strip_non_printing_start_end(prompt_list[i]) + modified_lines[i]
|
|
466
|
+
wrapped_lines = split_line_by_width(line, screen_width)
|
|
467
|
+
wrapped_lines.last.empty? ? "#{line} " : line
|
|
468
|
+
end
|
|
469
|
+
Reline::IOGate.write lines.map { |l| "#{l}\r\n" }.join
|
|
467
470
|
end
|
|
468
|
-
@output.puts lines.map { |l| "#{l}\r\n" }.join
|
|
469
|
-
end
|
|
470
|
-
|
|
471
|
-
def print_nomultiline_prompt
|
|
472
|
-
# Readline's test `TestRelineAsReadline#test_readline` requires first output to be prompt, not cursor reset escape sequence.
|
|
473
|
-
@output.write @prompt if @prompt && !@is_multiline
|
|
474
471
|
end
|
|
475
472
|
|
|
476
473
|
def render
|
|
@@ -499,13 +496,16 @@ class Reline::LineEditor
|
|
|
499
496
|
end
|
|
500
497
|
end
|
|
501
498
|
|
|
502
|
-
|
|
499
|
+
Reline::IOGate.buffered_output do
|
|
500
|
+
render_differential new_lines, wrapped_cursor_x, wrapped_cursor_y - screen_scroll_top
|
|
501
|
+
end
|
|
503
502
|
end
|
|
504
503
|
|
|
505
504
|
# Reflects lines to be rendered and new cursor position to the screen
|
|
506
505
|
# by calculating the difference from the previous render.
|
|
507
506
|
|
|
508
507
|
private def render_differential(new_lines, new_cursor_x, new_cursor_y)
|
|
508
|
+
Reline::IOGate.disable_auto_linewrap(true) if Reline::IOGate.win?
|
|
509
509
|
rendered_lines = @rendered_screen.lines
|
|
510
510
|
cursor_y = @rendered_screen.cursor_y
|
|
511
511
|
if new_lines != rendered_lines
|
|
@@ -534,8 +534,11 @@ class Reline::LineEditor
|
|
|
534
534
|
Reline::IOGate.show_cursor
|
|
535
535
|
end
|
|
536
536
|
Reline::IOGate.move_cursor_column new_cursor_x
|
|
537
|
+
new_cursor_y = new_cursor_y.clamp(0, screen_height - 1)
|
|
537
538
|
Reline::IOGate.move_cursor_down new_cursor_y - cursor_y
|
|
538
539
|
@rendered_screen.cursor_y = new_cursor_y
|
|
540
|
+
ensure
|
|
541
|
+
Reline::IOGate.disable_auto_linewrap(false) if Reline::IOGate.win?
|
|
539
542
|
end
|
|
540
543
|
|
|
541
544
|
private def clear_rendered_screen_cache
|
|
@@ -570,8 +573,9 @@ class Reline::LineEditor
|
|
|
570
573
|
@context
|
|
571
574
|
end
|
|
572
575
|
|
|
573
|
-
def retrieve_completion_block(
|
|
574
|
-
@line_editor.retrieve_completion_block
|
|
576
|
+
def retrieve_completion_block(_unused = false)
|
|
577
|
+
preposing, target, postposing, _quote = @line_editor.retrieve_completion_block
|
|
578
|
+
[preposing, target, postposing]
|
|
575
579
|
end
|
|
576
580
|
|
|
577
581
|
def call_completion_proc_with_checking_args(pre, target, post)
|
|
@@ -791,98 +795,73 @@ class Reline::LineEditor
|
|
|
791
795
|
@config.editing_mode
|
|
792
796
|
end
|
|
793
797
|
|
|
794
|
-
private def menu(
|
|
798
|
+
private def menu(list)
|
|
795
799
|
@menu_info = MenuInfo.new(list)
|
|
796
800
|
end
|
|
797
801
|
|
|
798
|
-
private def
|
|
799
|
-
|
|
800
|
-
list
|
|
801
|
-
|
|
802
|
-
|
|
802
|
+
private def filter_normalize_candidates(target, list)
|
|
803
|
+
target = target.downcase if @config.completion_ignore_case
|
|
804
|
+
list.select do |item|
|
|
805
|
+
next unless item
|
|
806
|
+
unless Encoding.compatible?(target.encoding, item.encoding)
|
|
807
|
+
# Workaround for Readline test
|
|
808
|
+
if defined?(::Readline) && ::Readline == ::Reline
|
|
809
|
+
raise Encoding::CompatibilityError, "incompatible character encodings: #{target.encoding} and #{item.encoding}"
|
|
810
|
+
end
|
|
803
811
|
end
|
|
812
|
+
|
|
804
813
|
if @config.completion_ignore_case
|
|
805
|
-
|
|
814
|
+
item.downcase.start_with?(target)
|
|
806
815
|
else
|
|
807
|
-
|
|
808
|
-
end
|
|
809
|
-
}.uniq
|
|
810
|
-
if is_menu
|
|
811
|
-
menu(target, list)
|
|
812
|
-
return nil
|
|
813
|
-
end
|
|
814
|
-
completed = list.inject { |memo, item|
|
|
815
|
-
begin
|
|
816
|
-
memo_mbchars = memo.unicode_normalize.grapheme_clusters
|
|
817
|
-
item_mbchars = item.unicode_normalize.grapheme_clusters
|
|
818
|
-
rescue Encoding::CompatibilityError
|
|
819
|
-
memo_mbchars = memo.grapheme_clusters
|
|
820
|
-
item_mbchars = item.grapheme_clusters
|
|
816
|
+
item.start_with?(target)
|
|
821
817
|
end
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
result << memo_mbchars[i]
|
|
828
|
-
else
|
|
829
|
-
break
|
|
830
|
-
end
|
|
831
|
-
else
|
|
832
|
-
if memo_mbchars[i] == item_mbchars[i]
|
|
833
|
-
result << memo_mbchars[i]
|
|
834
|
-
else
|
|
835
|
-
break
|
|
836
|
-
end
|
|
837
|
-
end
|
|
838
|
-
end
|
|
839
|
-
result
|
|
840
|
-
}
|
|
841
|
-
[target, preposing, completed, postposing]
|
|
818
|
+
end.map do |item|
|
|
819
|
+
item.unicode_normalize
|
|
820
|
+
rescue Encoding::CompatibilityError
|
|
821
|
+
item
|
|
822
|
+
end.uniq
|
|
842
823
|
end
|
|
843
824
|
|
|
844
|
-
private def perform_completion(
|
|
825
|
+
private def perform_completion(preposing, target, postposing, quote, list)
|
|
826
|
+
candidates = filter_normalize_candidates(target, list)
|
|
827
|
+
|
|
845
828
|
case @completion_state
|
|
846
|
-
when CompletionState::NORMAL
|
|
847
|
-
@completion_state = CompletionState::COMPLETION
|
|
848
829
|
when CompletionState::PERFECT_MATCH
|
|
849
|
-
@dig_perfect_match_proc
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
is_menu = false
|
|
859
|
-
end
|
|
860
|
-
result = complete_internal_proc(list, is_menu)
|
|
861
|
-
if @completion_state == CompletionState::MENU_WITH_PERFECT_MATCH
|
|
830
|
+
if @dig_perfect_match_proc
|
|
831
|
+
@dig_perfect_match_proc.call(@perfect_matched)
|
|
832
|
+
return
|
|
833
|
+
end
|
|
834
|
+
when CompletionState::MENU
|
|
835
|
+
menu(candidates)
|
|
836
|
+
return
|
|
837
|
+
when CompletionState::MENU_WITH_PERFECT_MATCH
|
|
838
|
+
menu(candidates)
|
|
862
839
|
@completion_state = CompletionState::PERFECT_MATCH
|
|
840
|
+
return
|
|
863
841
|
end
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
return if completed.
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
@
|
|
842
|
+
|
|
843
|
+
completed = Reline::Unicode.common_prefix(candidates, ignore_case: @config.completion_ignore_case)
|
|
844
|
+
return if completed.empty?
|
|
845
|
+
|
|
846
|
+
append_character = ''
|
|
847
|
+
if candidates.include?(completed)
|
|
848
|
+
if candidates.one?
|
|
849
|
+
append_character = quote || completion_append_character.to_s
|
|
850
|
+
@completion_state = CompletionState::PERFECT_MATCH
|
|
851
|
+
elsif @config.show_all_if_ambiguous
|
|
852
|
+
menu(candidates)
|
|
853
|
+
@completion_state = CompletionState::PERFECT_MATCH
|
|
876
854
|
else
|
|
877
|
-
@completion_state = CompletionState::
|
|
878
|
-
perform_completion(list, true) if @config.show_all_if_ambiguous
|
|
879
|
-
end
|
|
880
|
-
if not just_show_list and target < completed
|
|
881
|
-
@buffer_of_lines[@line_index] = (preposing + completed + completion_append_character.to_s + postposing).split("\n")[@line_index] || String.new(encoding: @encoding)
|
|
882
|
-
line_to_pointer = (preposing + completed + completion_append_character.to_s).split("\n")[@line_index] || String.new(encoding: @encoding)
|
|
883
|
-
@byte_pointer = line_to_pointer.bytesize
|
|
855
|
+
@completion_state = CompletionState::MENU_WITH_PERFECT_MATCH
|
|
884
856
|
end
|
|
857
|
+
@perfect_matched = completed
|
|
858
|
+
else
|
|
859
|
+
@completion_state = CompletionState::MENU
|
|
860
|
+
menu(candidates) if @config.show_all_if_ambiguous
|
|
885
861
|
end
|
|
862
|
+
@buffer_of_lines[@line_index] = (preposing + completed + append_character + postposing).split("\n")[@line_index] || String.new(encoding: encoding)
|
|
863
|
+
line_to_pointer = (preposing + completed + append_character).split("\n")[@line_index] || String.new(encoding: encoding)
|
|
864
|
+
@byte_pointer = line_to_pointer.bytesize
|
|
886
865
|
end
|
|
887
866
|
|
|
888
867
|
def dialog_proc_scope_completion_journey_data
|
|
@@ -911,8 +890,8 @@ class Reline::LineEditor
|
|
|
911
890
|
end
|
|
912
891
|
|
|
913
892
|
private def retrieve_completion_journey_state
|
|
914
|
-
preposing, target, postposing = retrieve_completion_block
|
|
915
|
-
list = call_completion_proc
|
|
893
|
+
preposing, target, postposing, quote = retrieve_completion_block
|
|
894
|
+
list = call_completion_proc(preposing, target, postposing, quote)
|
|
916
895
|
return unless list.is_a?(Array)
|
|
917
896
|
|
|
918
897
|
candidates = list.select{ |item| item.start_with?(target) }
|
|
@@ -925,28 +904,36 @@ class Reline::LineEditor
|
|
|
925
904
|
)
|
|
926
905
|
end
|
|
927
906
|
|
|
928
|
-
private def run_for_operators(key, method_symbol
|
|
907
|
+
private def run_for_operators(key, method_symbol)
|
|
908
|
+
# Reject multibyte input (converted to ed_insert) in vi_command mode
|
|
909
|
+
return if method_symbol == :ed_insert && @config.editing_mode_is?(:vi_command) && !@waiting_proc
|
|
910
|
+
|
|
911
|
+
if ARGUMENT_DIGIT_METHODS.include?(method_symbol) && !@waiting_proc
|
|
912
|
+
wrap_method_call(method_symbol, key, false)
|
|
913
|
+
return
|
|
914
|
+
end
|
|
915
|
+
|
|
929
916
|
if @vi_waiting_operator
|
|
930
|
-
if VI_MOTIONS.include?(method_symbol)
|
|
917
|
+
if @waiting_proc || VI_MOTIONS.include?(method_symbol)
|
|
931
918
|
old_byte_pointer = @byte_pointer
|
|
932
919
|
@vi_arg = (@vi_arg || 1) * @vi_waiting_operator_arg
|
|
933
|
-
|
|
920
|
+
wrap_method_call(method_symbol, key, true)
|
|
934
921
|
unless @waiting_proc
|
|
935
922
|
byte_pointer_diff = @byte_pointer - old_byte_pointer
|
|
936
923
|
@byte_pointer = old_byte_pointer
|
|
937
|
-
|
|
938
|
-
wrap_method_call(@vi_waiting_operator, method_obj, byte_pointer_diff)
|
|
924
|
+
__send__(@vi_waiting_operator, byte_pointer_diff)
|
|
939
925
|
cleanup_waiting
|
|
940
926
|
end
|
|
941
927
|
else
|
|
942
928
|
# Ignores operator when not motion is given.
|
|
943
|
-
|
|
929
|
+
wrap_method_call(method_symbol, key, false)
|
|
944
930
|
cleanup_waiting
|
|
945
931
|
end
|
|
946
|
-
@vi_arg = nil
|
|
947
932
|
else
|
|
948
|
-
|
|
933
|
+
wrap_method_call(method_symbol, key, false)
|
|
949
934
|
end
|
|
935
|
+
@vi_arg = nil
|
|
936
|
+
@kill_ring.process
|
|
950
937
|
end
|
|
951
938
|
|
|
952
939
|
private def argumentable?(method_obj)
|
|
@@ -959,20 +946,23 @@ class Reline::LineEditor
|
|
|
959
946
|
method_obj and method_obj.parameters.any? { |param| param[0] == :key and param[1] == :inclusive }
|
|
960
947
|
end
|
|
961
948
|
|
|
962
|
-
def wrap_method_call(method_symbol,
|
|
963
|
-
if @
|
|
964
|
-
|
|
965
|
-
|
|
949
|
+
def wrap_method_call(method_symbol, key, with_operator)
|
|
950
|
+
if @waiting_proc
|
|
951
|
+
@waiting_proc.call(key, method_symbol)
|
|
952
|
+
return
|
|
966
953
|
end
|
|
954
|
+
|
|
955
|
+
return unless respond_to?(method_symbol, true)
|
|
956
|
+
method_obj = method(method_symbol)
|
|
967
957
|
if @vi_arg and argumentable?(method_obj)
|
|
968
|
-
if
|
|
969
|
-
method_obj.(key, arg: @vi_arg, inclusive:
|
|
958
|
+
if inclusive?(method_obj)
|
|
959
|
+
method_obj.(key, arg: @vi_arg, inclusive: with_operator)
|
|
970
960
|
else
|
|
971
961
|
method_obj.(key, arg: @vi_arg)
|
|
972
962
|
end
|
|
973
963
|
else
|
|
974
|
-
if
|
|
975
|
-
method_obj.(key, inclusive:
|
|
964
|
+
if inclusive?(method_obj)
|
|
965
|
+
method_obj.(key, inclusive: with_operator)
|
|
976
966
|
else
|
|
977
967
|
method_obj.(key)
|
|
978
968
|
end
|
|
@@ -987,90 +977,20 @@ class Reline::LineEditor
|
|
|
987
977
|
@drop_terminate_spaces = false
|
|
988
978
|
end
|
|
989
979
|
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
cleanup_waiting
|
|
993
|
-
elsif @waiting_proc
|
|
994
|
-
old_byte_pointer = @byte_pointer
|
|
995
|
-
@waiting_proc.call(key)
|
|
996
|
-
if @vi_waiting_operator
|
|
997
|
-
byte_pointer_diff = @byte_pointer - old_byte_pointer
|
|
998
|
-
@byte_pointer = old_byte_pointer
|
|
999
|
-
method_obj = method(@vi_waiting_operator)
|
|
1000
|
-
wrap_method_call(@vi_waiting_operator, method_obj, byte_pointer_diff)
|
|
1001
|
-
cleanup_waiting
|
|
1002
|
-
end
|
|
1003
|
-
@kill_ring.process
|
|
1004
|
-
return
|
|
1005
|
-
end
|
|
980
|
+
ARGUMENT_DIGIT_METHODS = %i[ed_digit vi_zero ed_argument_digit]
|
|
981
|
+
VI_WAITING_ACCEPT_METHODS = %i[vi_change_meta vi_delete_meta vi_yank ed_insert ed_argument_digit]
|
|
1006
982
|
|
|
1007
|
-
|
|
1008
|
-
|
|
983
|
+
private def process_key(key, method_symbol)
|
|
984
|
+
if @waiting_proc
|
|
985
|
+
cleanup_waiting unless key.size == 1
|
|
1009
986
|
end
|
|
1010
|
-
if
|
|
1011
|
-
|
|
1012
|
-
run_for_operators(key, method_symbol) do |with_operator|
|
|
1013
|
-
wrap_method_call(method_symbol, method_obj, key, with_operator)
|
|
1014
|
-
end
|
|
1015
|
-
else
|
|
1016
|
-
wrap_method_call(method_symbol, method_obj, key) if method_obj
|
|
1017
|
-
end
|
|
1018
|
-
@kill_ring.process
|
|
1019
|
-
if @vi_arg
|
|
1020
|
-
@vi_arg = nil
|
|
1021
|
-
end
|
|
1022
|
-
elsif @vi_arg
|
|
1023
|
-
if key.chr =~ /[0-9]/
|
|
1024
|
-
ed_argument_digit(key)
|
|
1025
|
-
else
|
|
1026
|
-
if argumentable?(method_obj)
|
|
1027
|
-
run_for_operators(key, method_symbol) do |with_operator|
|
|
1028
|
-
wrap_method_call(method_symbol, method_obj, key, with_operator)
|
|
1029
|
-
end
|
|
1030
|
-
elsif method_obj
|
|
1031
|
-
wrap_method_call(method_symbol, method_obj, key)
|
|
1032
|
-
else
|
|
1033
|
-
ed_insert(key) unless @config.editing_mode_is?(:vi_command)
|
|
1034
|
-
end
|
|
1035
|
-
@kill_ring.process
|
|
1036
|
-
if @vi_arg
|
|
1037
|
-
@vi_arg = nil
|
|
1038
|
-
end
|
|
1039
|
-
end
|
|
1040
|
-
elsif method_obj
|
|
1041
|
-
if method_symbol == :ed_argument_digit
|
|
1042
|
-
wrap_method_call(method_symbol, method_obj, key)
|
|
1043
|
-
else
|
|
1044
|
-
run_for_operators(key, method_symbol) do |with_operator|
|
|
1045
|
-
wrap_method_call(method_symbol, method_obj, key, with_operator)
|
|
1046
|
-
end
|
|
1047
|
-
end
|
|
1048
|
-
@kill_ring.process
|
|
1049
|
-
else
|
|
1050
|
-
ed_insert(key) unless @config.editing_mode_is?(:vi_command)
|
|
987
|
+
if @vi_waiting_operator
|
|
988
|
+
cleanup_waiting unless VI_WAITING_ACCEPT_METHODS.include?(method_symbol) || VI_MOTIONS.include?(method_symbol)
|
|
1051
989
|
end
|
|
1052
|
-
end
|
|
1053
990
|
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
if @multibyte_buffer.dup.force_encoding(@encoding).valid_encoding?
|
|
1058
|
-
process_key(@multibyte_buffer.dup.force_encoding(@encoding), nil)
|
|
1059
|
-
@multibyte_buffer.clear
|
|
1060
|
-
else
|
|
1061
|
-
# invalid
|
|
1062
|
-
return
|
|
1063
|
-
end
|
|
1064
|
-
else # single byte
|
|
1065
|
-
return if key.char >= 128 # maybe, first byte of multi byte
|
|
1066
|
-
method_symbol = @config.editing_mode.get_method(key.combined_char)
|
|
1067
|
-
process_key(key.combined_char, method_symbol)
|
|
1068
|
-
@multibyte_buffer.clear
|
|
1069
|
-
end
|
|
1070
|
-
if @config.editing_mode_is?(:vi_command) and @byte_pointer > 0 and @byte_pointer == current_line.bytesize
|
|
1071
|
-
byte_size = Reline::Unicode.get_prev_mbchar_size(@buffer_of_lines[@line_index], @byte_pointer)
|
|
1072
|
-
@byte_pointer -= byte_size
|
|
1073
|
-
end
|
|
991
|
+
process_insert(force: method_symbol != :ed_insert)
|
|
992
|
+
|
|
993
|
+
run_for_operators(key, method_symbol)
|
|
1074
994
|
end
|
|
1075
995
|
|
|
1076
996
|
def update(key)
|
|
@@ -1084,25 +1004,22 @@ class Reline::LineEditor
|
|
|
1084
1004
|
end
|
|
1085
1005
|
|
|
1086
1006
|
def input_key(key)
|
|
1087
|
-
|
|
1007
|
+
old_buffer_of_lines = @buffer_of_lines.dup
|
|
1088
1008
|
@config.reset_oneshot_key_bindings
|
|
1089
|
-
@dialogs.each do |dialog|
|
|
1090
|
-
if key.char.instance_of?(Symbol) and key.char == dialog.name
|
|
1091
|
-
return
|
|
1092
|
-
end
|
|
1093
|
-
end
|
|
1094
1009
|
if key.char.nil?
|
|
1095
1010
|
process_insert(force: true)
|
|
1096
1011
|
@eof = buffer_empty?
|
|
1097
1012
|
finish
|
|
1098
1013
|
return
|
|
1099
1014
|
end
|
|
1015
|
+
return if @dialogs.any? { |dialog| dialog.name == key.method_symbol }
|
|
1016
|
+
|
|
1100
1017
|
@completion_occurs = false
|
|
1101
1018
|
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1019
|
+
process_key(key.char, key.method_symbol)
|
|
1020
|
+
if @config.editing_mode_is?(:vi_command) and @byte_pointer > 0 and @byte_pointer == current_line.bytesize
|
|
1021
|
+
byte_size = Reline::Unicode.get_prev_mbchar_size(@buffer_of_lines[@line_index], @byte_pointer)
|
|
1022
|
+
@byte_pointer -= byte_size
|
|
1106
1023
|
end
|
|
1107
1024
|
|
|
1108
1025
|
@prev_action_state, @next_action_state = @next_action_state, NullActionState
|
|
@@ -1112,15 +1029,16 @@ class Reline::LineEditor
|
|
|
1112
1029
|
@completion_journey_state = nil
|
|
1113
1030
|
end
|
|
1114
1031
|
|
|
1115
|
-
|
|
1116
|
-
|
|
1032
|
+
modified = old_buffer_of_lines != @buffer_of_lines
|
|
1033
|
+
|
|
1034
|
+
push_undo_redo(modified) unless @restoring
|
|
1035
|
+
@restoring = false
|
|
1117
1036
|
|
|
1118
1037
|
if @in_pasting
|
|
1119
1038
|
clear_dialogs
|
|
1120
1039
|
return
|
|
1121
1040
|
end
|
|
1122
1041
|
|
|
1123
|
-
modified = @old_buffer_of_lines != @buffer_of_lines
|
|
1124
1042
|
if !@completion_occurs && modified && !@config.disable_completion && @config.autocompletion
|
|
1125
1043
|
# Auto complete starts only when edited
|
|
1126
1044
|
process_insert(force: true)
|
|
@@ -1129,26 +1047,17 @@ class Reline::LineEditor
|
|
|
1129
1047
|
modified
|
|
1130
1048
|
end
|
|
1131
1049
|
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1050
|
+
MAX_UNDO_REDO_HISTORY_SIZE = 100
|
|
1051
|
+
def push_undo_redo(modified)
|
|
1052
|
+
if modified
|
|
1053
|
+
@undo_redo_history = @undo_redo_history[0..@undo_redo_index]
|
|
1054
|
+
@undo_redo_history.push([@buffer_of_lines.dup, @byte_pointer, @line_index])
|
|
1055
|
+
if @undo_redo_history.size > MAX_UNDO_REDO_HISTORY_SIZE
|
|
1056
|
+
@undo_redo_history.shift
|
|
1057
|
+
end
|
|
1058
|
+
@undo_redo_index = @undo_redo_history.size - 1
|
|
1139
1059
|
else
|
|
1140
|
-
@
|
|
1141
|
-
@input_lines_position += 1
|
|
1142
|
-
@input_lines.push([@buffer_of_lines.dup, @byte_pointer, @line_index])
|
|
1143
|
-
end
|
|
1144
|
-
trim_input_lines
|
|
1145
|
-
end
|
|
1146
|
-
|
|
1147
|
-
MAX_INPUT_LINES = 100
|
|
1148
|
-
def trim_input_lines
|
|
1149
|
-
if @input_lines.size > MAX_INPUT_LINES
|
|
1150
|
-
@input_lines.shift
|
|
1151
|
-
@input_lines_position -= 1
|
|
1060
|
+
@undo_redo_history[@undo_redo_index] = [@buffer_of_lines.dup, @byte_pointer, @line_index]
|
|
1152
1061
|
end
|
|
1153
1062
|
end
|
|
1154
1063
|
|
|
@@ -1162,9 +1071,8 @@ class Reline::LineEditor
|
|
|
1162
1071
|
end
|
|
1163
1072
|
end
|
|
1164
1073
|
|
|
1165
|
-
def call_completion_proc
|
|
1166
|
-
|
|
1167
|
-
pre, target, post = result
|
|
1074
|
+
def call_completion_proc(pre, target, post, quote)
|
|
1075
|
+
Reline.core.instance_variable_set(:@completion_quote_character, quote)
|
|
1168
1076
|
result = call_completion_proc_with_checking_args(pre, target, post)
|
|
1169
1077
|
Reline.core.instance_variable_set(:@completion_quote_character, nil)
|
|
1170
1078
|
result
|
|
@@ -1228,84 +1136,32 @@ class Reline::LineEditor
|
|
|
1228
1136
|
process_auto_indent
|
|
1229
1137
|
end
|
|
1230
1138
|
|
|
1231
|
-
def
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
@line_index = line_index
|
|
1235
|
-
if byte_pointer
|
|
1236
|
-
@byte_pointer = byte_pointer
|
|
1237
|
-
else
|
|
1238
|
-
calculate_nearest_cursor(cursor)
|
|
1239
|
-
end
|
|
1240
|
-
process_auto_indent
|
|
1241
|
-
end
|
|
1242
|
-
|
|
1243
|
-
def retrieve_completion_block(set_completion_quote_character = false)
|
|
1244
|
-
if Reline.completer_word_break_characters.empty?
|
|
1245
|
-
word_break_regexp = nil
|
|
1246
|
-
else
|
|
1247
|
-
word_break_regexp = /\A[#{Regexp.escape(Reline.completer_word_break_characters)}]/
|
|
1248
|
-
end
|
|
1249
|
-
if Reline.completer_quote_characters.empty?
|
|
1250
|
-
quote_characters_regexp = nil
|
|
1251
|
-
else
|
|
1252
|
-
quote_characters_regexp = /\A[#{Regexp.escape(Reline.completer_quote_characters)}]/
|
|
1253
|
-
end
|
|
1254
|
-
before = current_line.byteslice(0, @byte_pointer)
|
|
1255
|
-
rest = nil
|
|
1256
|
-
break_pointer = nil
|
|
1139
|
+
def retrieve_completion_block
|
|
1140
|
+
quote_characters = Reline.completer_quote_characters
|
|
1141
|
+
before = current_line.byteslice(0, @byte_pointer).grapheme_clusters
|
|
1257
1142
|
quote = nil
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
elsif quote and slice.start_with?(escaped_quote)
|
|
1272
|
-
# skip
|
|
1273
|
-
i += 2
|
|
1274
|
-
elsif quote_characters_regexp and slice =~ quote_characters_regexp # find new "
|
|
1275
|
-
rest = $'
|
|
1276
|
-
quote = $&
|
|
1277
|
-
closing_quote = /(?!\\)#{Regexp.escape(quote)}/
|
|
1278
|
-
escaped_quote = /\\#{Regexp.escape(quote)}/
|
|
1279
|
-
i += 1
|
|
1280
|
-
break_pointer = i - 1
|
|
1281
|
-
elsif word_break_regexp and not quote and slice =~ word_break_regexp
|
|
1282
|
-
rest = $'
|
|
1283
|
-
i += 1
|
|
1284
|
-
before = current_line.byteslice(i, @byte_pointer - i)
|
|
1285
|
-
break_pointer = i
|
|
1286
|
-
else
|
|
1287
|
-
i += 1
|
|
1288
|
-
end
|
|
1289
|
-
end
|
|
1290
|
-
postposing = current_line.byteslice(@byte_pointer, current_line.bytesize - @byte_pointer)
|
|
1291
|
-
if rest
|
|
1292
|
-
preposing = current_line.byteslice(0, break_pointer)
|
|
1293
|
-
target = rest
|
|
1294
|
-
if set_completion_quote_character and quote
|
|
1295
|
-
Reline.core.instance_variable_set(:@completion_quote_character, quote)
|
|
1296
|
-
if postposing !~ /(?!\\)#{Regexp.escape(quote)}/ # closing quote
|
|
1297
|
-
insert_text(quote)
|
|
1143
|
+
# Calculate closing quote when cursor is at the end of the line
|
|
1144
|
+
if current_line.bytesize == @byte_pointer && !quote_characters.empty?
|
|
1145
|
+
escaped = false
|
|
1146
|
+
before.each do |c|
|
|
1147
|
+
if escaped
|
|
1148
|
+
escaped = false
|
|
1149
|
+
next
|
|
1150
|
+
elsif c == '\\'
|
|
1151
|
+
escaped = true
|
|
1152
|
+
elsif quote
|
|
1153
|
+
quote = nil if c == quote
|
|
1154
|
+
elsif quote_characters.include?(c)
|
|
1155
|
+
quote = c
|
|
1298
1156
|
end
|
|
1299
1157
|
end
|
|
1300
|
-
else
|
|
1301
|
-
preposing = ''
|
|
1302
|
-
if break_pointer
|
|
1303
|
-
preposing = current_line.byteslice(0, break_pointer)
|
|
1304
|
-
else
|
|
1305
|
-
preposing = ''
|
|
1306
|
-
end
|
|
1307
|
-
target = before
|
|
1308
1158
|
end
|
|
1159
|
+
|
|
1160
|
+
word_break_characters = quote_characters + Reline.completer_word_break_characters
|
|
1161
|
+
break_index = before.rindex { |c| word_break_characters.include?(c) || quote_characters.include?(c) } || -1
|
|
1162
|
+
preposing = before.take(break_index + 1).join
|
|
1163
|
+
target = before.drop(break_index + 1).join
|
|
1164
|
+
postposing = current_line.byteslice(@byte_pointer, current_line.bytesize - @byte_pointer)
|
|
1309
1165
|
lines = whole_lines
|
|
1310
1166
|
if @line_index > 0
|
|
1311
1167
|
preposing = lines[0..(@line_index - 1)].join("\n") + "\n" + preposing
|
|
@@ -1313,7 +1169,7 @@ class Reline::LineEditor
|
|
|
1313
1169
|
if (lines.size - 1) > @line_index
|
|
1314
1170
|
postposing = postposing + "\n" + lines[(@line_index + 1)..-1].join("\n")
|
|
1315
1171
|
end
|
|
1316
|
-
[preposing.encode(
|
|
1172
|
+
[preposing.encode(encoding), target.encode(encoding), postposing.encode(encoding), quote&.encode(encoding)]
|
|
1317
1173
|
end
|
|
1318
1174
|
|
|
1319
1175
|
def confirm_multiline_termination
|
|
@@ -1322,15 +1178,13 @@ class Reline::LineEditor
|
|
|
1322
1178
|
end
|
|
1323
1179
|
|
|
1324
1180
|
def insert_multiline_text(text)
|
|
1325
|
-
save_old_buffer
|
|
1326
1181
|
pre = @buffer_of_lines[@line_index].byteslice(0, @byte_pointer)
|
|
1327
1182
|
post = @buffer_of_lines[@line_index].byteslice(@byte_pointer..)
|
|
1328
|
-
lines = (pre + text.gsub(/\r\n?/, "\n") + post).split("\n", -1)
|
|
1183
|
+
lines = (pre + Reline::Unicode.safe_encode(text, encoding).gsub(/\r\n?/, "\n") + post).split("\n", -1)
|
|
1329
1184
|
lines << '' if lines.empty?
|
|
1330
1185
|
@buffer_of_lines[@line_index, 1] = lines
|
|
1331
1186
|
@line_index += lines.size - 1
|
|
1332
1187
|
@byte_pointer = @buffer_of_lines[@line_index].bytesize - post.bytesize
|
|
1333
|
-
push_input_lines
|
|
1334
1188
|
end
|
|
1335
1189
|
|
|
1336
1190
|
def insert_text(text)
|
|
@@ -1370,7 +1224,7 @@ class Reline::LineEditor
|
|
|
1370
1224
|
last += current_line.bytesize if last < 0
|
|
1371
1225
|
first += current_line.bytesize if first < 0
|
|
1372
1226
|
range = range.exclude_end? ? first...last : first..last
|
|
1373
|
-
line = current_line.bytes.reject.with_index{ |c, i| range.include?(i) }.map{ |c| c.chr(Encoding::ASCII_8BIT) }.join.force_encoding(
|
|
1227
|
+
line = current_line.bytes.reject.with_index{ |c, i| range.include?(i) }.map{ |c| c.chr(Encoding::ASCII_8BIT) }.join.force_encoding(encoding)
|
|
1374
1228
|
set_current_line(line)
|
|
1375
1229
|
else
|
|
1376
1230
|
set_current_line(current_line.byteslice(0, start))
|
|
@@ -1444,10 +1298,11 @@ class Reline::LineEditor
|
|
|
1444
1298
|
@completion_occurs = move_completed_list(:down)
|
|
1445
1299
|
else
|
|
1446
1300
|
@completion_journey_state = nil
|
|
1447
|
-
|
|
1301
|
+
pre, target, post, quote = retrieve_completion_block
|
|
1302
|
+
result = call_completion_proc(pre, target, post, quote)
|
|
1448
1303
|
if result.is_a?(Array)
|
|
1449
1304
|
@completion_occurs = true
|
|
1450
|
-
perform_completion(
|
|
1305
|
+
perform_completion(pre, target, post, quote, result)
|
|
1451
1306
|
end
|
|
1452
1307
|
end
|
|
1453
1308
|
end
|
|
@@ -1495,21 +1350,11 @@ class Reline::LineEditor
|
|
|
1495
1350
|
# digit or if the existing argument is already greater than a
|
|
1496
1351
|
# million.
|
|
1497
1352
|
# GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself.
|
|
1498
|
-
private def ed_insert(
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
return
|
|
1504
|
-
end
|
|
1505
|
-
str = key
|
|
1506
|
-
else
|
|
1507
|
-
begin
|
|
1508
|
-
key.chr.encode(Encoding::UTF_8)
|
|
1509
|
-
rescue Encoding::UndefinedConversionError
|
|
1510
|
-
return
|
|
1511
|
-
end
|
|
1512
|
-
str = key.chr
|
|
1353
|
+
private def ed_insert(str)
|
|
1354
|
+
begin
|
|
1355
|
+
str.encode(Encoding::UTF_8)
|
|
1356
|
+
rescue Encoding::UndefinedConversionError
|
|
1357
|
+
return
|
|
1513
1358
|
end
|
|
1514
1359
|
if @in_pasting
|
|
1515
1360
|
@continuous_insertion_buffer << str
|
|
@@ -1520,24 +1365,26 @@ class Reline::LineEditor
|
|
|
1520
1365
|
|
|
1521
1366
|
insert_text(str)
|
|
1522
1367
|
end
|
|
1523
|
-
alias_method :ed_digit, :ed_insert
|
|
1524
1368
|
alias_method :self_insert, :ed_insert
|
|
1525
1369
|
|
|
1526
|
-
private def
|
|
1527
|
-
@
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1370
|
+
private def ed_digit(key)
|
|
1371
|
+
if @vi_arg
|
|
1372
|
+
ed_argument_digit(key)
|
|
1373
|
+
else
|
|
1374
|
+
ed_insert(key)
|
|
1375
|
+
end
|
|
1376
|
+
end
|
|
1377
|
+
|
|
1378
|
+
private def insert_raw_char(str, arg: 1)
|
|
1379
|
+
arg.times do
|
|
1380
|
+
if str == "\C-j" or str == "\C-m"
|
|
1381
|
+
key_newline(str)
|
|
1382
|
+
elsif str != "\0"
|
|
1383
|
+
# Ignore NUL.
|
|
1384
|
+
ed_insert(str)
|
|
1536
1385
|
end
|
|
1537
|
-
|
|
1538
|
-
}
|
|
1386
|
+
end
|
|
1539
1387
|
end
|
|
1540
|
-
alias_method :quoted_insert, :ed_quoted_insert
|
|
1541
1388
|
|
|
1542
1389
|
private def ed_next_char(key, arg: 1)
|
|
1543
1390
|
byte_size = Reline::Unicode.get_next_mbchar_size(current_line, @byte_pointer)
|
|
@@ -1566,42 +1413,47 @@ class Reline::LineEditor
|
|
|
1566
1413
|
alias_method :backward_char, :ed_prev_char
|
|
1567
1414
|
|
|
1568
1415
|
private def vi_first_print(key)
|
|
1569
|
-
@byte_pointer
|
|
1416
|
+
@byte_pointer = Reline::Unicode.vi_first_print(current_line)
|
|
1570
1417
|
end
|
|
1571
1418
|
|
|
1572
1419
|
private def ed_move_to_beg(key)
|
|
1573
1420
|
@byte_pointer = 0
|
|
1574
1421
|
end
|
|
1575
1422
|
alias_method :beginning_of_line, :ed_move_to_beg
|
|
1576
|
-
|
|
1423
|
+
|
|
1424
|
+
private def vi_zero(key)
|
|
1425
|
+
if @vi_arg
|
|
1426
|
+
ed_argument_digit(key)
|
|
1427
|
+
else
|
|
1428
|
+
ed_move_to_beg(key)
|
|
1429
|
+
end
|
|
1430
|
+
end
|
|
1577
1431
|
|
|
1578
1432
|
private def ed_move_to_end(key)
|
|
1579
1433
|
@byte_pointer = current_line.bytesize
|
|
1580
1434
|
end
|
|
1581
1435
|
alias_method :end_of_line, :ed_move_to_end
|
|
1582
1436
|
|
|
1583
|
-
private def generate_searcher(
|
|
1584
|
-
search_word = String.new(encoding:
|
|
1585
|
-
multibyte_buf = String.new(encoding: 'ASCII-8BIT')
|
|
1437
|
+
private def generate_searcher(direction)
|
|
1438
|
+
search_word = String.new(encoding: encoding)
|
|
1586
1439
|
hit_pointer = nil
|
|
1587
|
-
lambda do |key|
|
|
1440
|
+
lambda do |key, key_symbol|
|
|
1588
1441
|
search_again = false
|
|
1589
|
-
case
|
|
1590
|
-
when
|
|
1442
|
+
case key_symbol
|
|
1443
|
+
when :em_delete_prev_char, :backward_delete_char
|
|
1591
1444
|
grapheme_clusters = search_word.grapheme_clusters
|
|
1592
1445
|
if grapheme_clusters.size > 0
|
|
1593
1446
|
grapheme_clusters.pop
|
|
1594
1447
|
search_word = grapheme_clusters.join
|
|
1595
1448
|
end
|
|
1596
|
-
when
|
|
1597
|
-
search_again =
|
|
1598
|
-
|
|
1449
|
+
when :reverse_search_history, :vi_search_prev
|
|
1450
|
+
search_again = direction == :reverse
|
|
1451
|
+
direction = :reverse
|
|
1452
|
+
when :forward_search_history, :vi_search_next
|
|
1453
|
+
search_again = direction == :forward
|
|
1454
|
+
direction = :forward
|
|
1599
1455
|
else
|
|
1600
|
-
|
|
1601
|
-
if multibyte_buf.dup.force_encoding(@encoding).valid_encoding?
|
|
1602
|
-
search_word << multibyte_buf.dup.force_encoding(@encoding)
|
|
1603
|
-
multibyte_buf.clear
|
|
1604
|
-
end
|
|
1456
|
+
search_word << key
|
|
1605
1457
|
end
|
|
1606
1458
|
hit = nil
|
|
1607
1459
|
if not search_word.empty? and @line_backup_in_history&.include?(search_word)
|
|
@@ -1613,11 +1465,11 @@ class Reline::LineEditor
|
|
|
1613
1465
|
search_word = Reline.last_incremental_search
|
|
1614
1466
|
end
|
|
1615
1467
|
if @history_pointer
|
|
1616
|
-
case
|
|
1617
|
-
when
|
|
1468
|
+
case direction
|
|
1469
|
+
when :reverse
|
|
1618
1470
|
history_pointer_base = 0
|
|
1619
1471
|
history = Reline::HISTORY[0..(@history_pointer - 1)]
|
|
1620
|
-
when
|
|
1472
|
+
when :forward
|
|
1621
1473
|
history_pointer_base = @history_pointer + 1
|
|
1622
1474
|
history = Reline::HISTORY[(@history_pointer + 1)..-1]
|
|
1623
1475
|
end
|
|
@@ -1626,11 +1478,11 @@ class Reline::LineEditor
|
|
|
1626
1478
|
history = Reline::HISTORY
|
|
1627
1479
|
end
|
|
1628
1480
|
elsif @history_pointer
|
|
1629
|
-
case
|
|
1630
|
-
when
|
|
1481
|
+
case direction
|
|
1482
|
+
when :reverse
|
|
1631
1483
|
history_pointer_base = 0
|
|
1632
1484
|
history = Reline::HISTORY[0..@history_pointer]
|
|
1633
|
-
when
|
|
1485
|
+
when :forward
|
|
1634
1486
|
history_pointer_base = @history_pointer
|
|
1635
1487
|
history = Reline::HISTORY[@history_pointer..-1]
|
|
1636
1488
|
end
|
|
@@ -1638,12 +1490,12 @@ class Reline::LineEditor
|
|
|
1638
1490
|
history_pointer_base = 0
|
|
1639
1491
|
history = Reline::HISTORY
|
|
1640
1492
|
end
|
|
1641
|
-
case
|
|
1642
|
-
when
|
|
1493
|
+
case direction
|
|
1494
|
+
when :reverse
|
|
1643
1495
|
hit_index = history.rindex { |item|
|
|
1644
1496
|
item.include?(search_word)
|
|
1645
1497
|
}
|
|
1646
|
-
when
|
|
1498
|
+
when :forward
|
|
1647
1499
|
hit_index = history.index { |item|
|
|
1648
1500
|
item.include?(search_word)
|
|
1649
1501
|
}
|
|
@@ -1653,80 +1505,48 @@ class Reline::LineEditor
|
|
|
1653
1505
|
hit = Reline::HISTORY[hit_pointer]
|
|
1654
1506
|
end
|
|
1655
1507
|
end
|
|
1656
|
-
|
|
1657
|
-
when "\C-r".ord
|
|
1658
|
-
prompt_name = 'reverse-i-search'
|
|
1659
|
-
when "\C-s".ord
|
|
1660
|
-
prompt_name = 'i-search'
|
|
1661
|
-
end
|
|
1508
|
+
prompt_name = direction == :forward ? 'i-search' : 'reverse-i-search'
|
|
1662
1509
|
prompt_name = "failed #{prompt_name}" unless hit
|
|
1663
1510
|
[search_word, prompt_name, hit_pointer]
|
|
1664
1511
|
end
|
|
1665
1512
|
end
|
|
1666
1513
|
|
|
1667
|
-
private def incremental_search_history(
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
termination_keys
|
|
1674
|
-
|
|
1675
|
-
@waiting_proc = ->(k) {
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
buffer = Reline::HISTORY[@history_pointer]
|
|
1680
|
-
else
|
|
1681
|
-
buffer = @line_backup_in_history
|
|
1682
|
-
end
|
|
1683
|
-
@buffer_of_lines = buffer.split("\n")
|
|
1684
|
-
@buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty?
|
|
1685
|
-
@line_index = @buffer_of_lines.size - 1
|
|
1514
|
+
private def incremental_search_history(direction)
|
|
1515
|
+
backup = @buffer_of_lines.dup, @line_index, @byte_pointer, @history_pointer, @line_backup_in_history
|
|
1516
|
+
searcher = generate_searcher(direction)
|
|
1517
|
+
prompt_name = direction == :forward ? 'i-search' : 'reverse-i-search'
|
|
1518
|
+
@searching_prompt = "(#{prompt_name})`': "
|
|
1519
|
+
termination_keys = ["\C-j"]
|
|
1520
|
+
termination_keys.concat(@config.isearch_terminators.chars) if @config.isearch_terminators
|
|
1521
|
+
accept_key_syms = [:em_delete_prev_char, :backward_delete_char, :vi_search_prev, :vi_search_next, :reverse_search_history, :forward_search_history]
|
|
1522
|
+
@waiting_proc = ->(k, key_symbol) {
|
|
1523
|
+
if k == "\C-g"
|
|
1524
|
+
# cancel search and restore buffer
|
|
1525
|
+
@buffer_of_lines, @line_index, @byte_pointer, @history_pointer, @line_backup_in_history = backup
|
|
1686
1526
|
@searching_prompt = nil
|
|
1687
1527
|
@waiting_proc = nil
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
@
|
|
1692
|
-
@
|
|
1693
|
-
move_history(
|
|
1528
|
+
elsif !termination_keys.include?(k) && (k.match?(/[[:print:]]/) || accept_key_syms.include?(key_symbol))
|
|
1529
|
+
search_word, prompt_name, hit_pointer = searcher.call(k, key_symbol)
|
|
1530
|
+
Reline.last_incremental_search = search_word
|
|
1531
|
+
@searching_prompt = "(%s)`%s'" % [prompt_name, search_word]
|
|
1532
|
+
@searching_prompt += ': ' unless @is_multiline
|
|
1533
|
+
move_history(hit_pointer, line: :end, cursor: :end) if hit_pointer
|
|
1534
|
+
else
|
|
1535
|
+
# terminaton_keys and other keys will terminalte
|
|
1536
|
+
move_history(@history_pointer, line: :end, cursor: :start)
|
|
1694
1537
|
@searching_prompt = nil
|
|
1695
1538
|
@waiting_proc = nil
|
|
1696
|
-
@byte_pointer = 0
|
|
1697
|
-
else
|
|
1698
|
-
chr = k.is_a?(String) ? k : k.chr(Encoding::ASCII_8BIT)
|
|
1699
|
-
if chr.match?(/[[:print:]]/) or k == "\C-h".ord or k == "\C-?".ord or k == "\C-r".ord or k == "\C-s".ord
|
|
1700
|
-
search_word, prompt_name, hit_pointer = searcher.call(k)
|
|
1701
|
-
Reline.last_incremental_search = search_word
|
|
1702
|
-
@searching_prompt = "(%s)`%s'" % [prompt_name, search_word]
|
|
1703
|
-
@searching_prompt += ': ' unless @is_multiline
|
|
1704
|
-
move_history(hit_pointer, line: :end, cursor: :end, save_buffer: false) if hit_pointer
|
|
1705
|
-
else
|
|
1706
|
-
if @history_pointer
|
|
1707
|
-
line = Reline::HISTORY[@history_pointer]
|
|
1708
|
-
else
|
|
1709
|
-
line = @line_backup_in_history
|
|
1710
|
-
end
|
|
1711
|
-
@line_backup_in_history = whole_buffer
|
|
1712
|
-
@buffer_of_lines = line.split("\n")
|
|
1713
|
-
@buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty?
|
|
1714
|
-
@line_index = @buffer_of_lines.size - 1
|
|
1715
|
-
@searching_prompt = nil
|
|
1716
|
-
@waiting_proc = nil
|
|
1717
|
-
@byte_pointer = 0
|
|
1718
|
-
end
|
|
1719
1539
|
end
|
|
1720
1540
|
}
|
|
1721
1541
|
end
|
|
1722
1542
|
|
|
1723
1543
|
private def vi_search_prev(key)
|
|
1724
|
-
incremental_search_history(
|
|
1544
|
+
incremental_search_history(:reverse)
|
|
1725
1545
|
end
|
|
1726
1546
|
alias_method :reverse_search_history, :vi_search_prev
|
|
1727
1547
|
|
|
1728
1548
|
private def vi_search_next(key)
|
|
1729
|
-
incremental_search_history(
|
|
1549
|
+
incremental_search_history(:forward)
|
|
1730
1550
|
end
|
|
1731
1551
|
alias_method :forward_search_history, :vi_search_next
|
|
1732
1552
|
|
|
@@ -1770,14 +1590,14 @@ class Reline::LineEditor
|
|
|
1770
1590
|
end
|
|
1771
1591
|
alias_method :history_search_forward, :ed_search_next_history
|
|
1772
1592
|
|
|
1773
|
-
private def move_history(history_pointer, line:, cursor
|
|
1593
|
+
private def move_history(history_pointer, line:, cursor:)
|
|
1774
1594
|
history_pointer ||= Reline::HISTORY.size
|
|
1775
1595
|
return if history_pointer < 0 || history_pointer > Reline::HISTORY.size
|
|
1776
1596
|
old_history_pointer = @history_pointer || Reline::HISTORY.size
|
|
1777
1597
|
if old_history_pointer == Reline::HISTORY.size
|
|
1778
|
-
@line_backup_in_history =
|
|
1598
|
+
@line_backup_in_history = whole_buffer
|
|
1779
1599
|
else
|
|
1780
|
-
Reline::HISTORY[old_history_pointer] = whole_buffer
|
|
1600
|
+
Reline::HISTORY[old_history_pointer] = whole_buffer
|
|
1781
1601
|
end
|
|
1782
1602
|
if history_pointer == Reline::HISTORY.size
|
|
1783
1603
|
buf = @line_backup_in_history
|
|
@@ -1787,7 +1607,7 @@ class Reline::LineEditor
|
|
|
1787
1607
|
@history_pointer = history_pointer
|
|
1788
1608
|
end
|
|
1789
1609
|
@buffer_of_lines = buf.split("\n")
|
|
1790
|
-
@buffer_of_lines = [String.new(encoding:
|
|
1610
|
+
@buffer_of_lines = [String.new(encoding: encoding)] if @buffer_of_lines.empty?
|
|
1791
1611
|
@line_index = line == :start ? 0 : line == :end ? @buffer_of_lines.size - 1 : line
|
|
1792
1612
|
@byte_pointer = cursor == :start ? 0 : cursor == :end ? current_line.bytesize : cursor
|
|
1793
1613
|
end
|
|
@@ -1826,6 +1646,16 @@ class Reline::LineEditor
|
|
|
1826
1646
|
end
|
|
1827
1647
|
alias_method :next_history, :ed_next_history
|
|
1828
1648
|
|
|
1649
|
+
private def ed_beginning_of_history(key)
|
|
1650
|
+
move_history(0, line: :end, cursor: :end)
|
|
1651
|
+
end
|
|
1652
|
+
alias_method :beginning_of_history, :ed_beginning_of_history
|
|
1653
|
+
|
|
1654
|
+
private def ed_end_of_history(key)
|
|
1655
|
+
move_history(Reline::HISTORY.size, line: :end, cursor: :end)
|
|
1656
|
+
end
|
|
1657
|
+
alias_method :end_of_history, :ed_end_of_history
|
|
1658
|
+
|
|
1829
1659
|
private def ed_newline(key)
|
|
1830
1660
|
process_insert(force: true)
|
|
1831
1661
|
if @is_multiline
|
|
@@ -1837,17 +1667,10 @@ class Reline::LineEditor
|
|
|
1837
1667
|
finish
|
|
1838
1668
|
end
|
|
1839
1669
|
else
|
|
1840
|
-
if @line_index ==
|
|
1841
|
-
if confirm_multiline_termination
|
|
1842
|
-
finish
|
|
1843
|
-
else
|
|
1844
|
-
key_newline(key)
|
|
1845
|
-
end
|
|
1846
|
-
else
|
|
1847
|
-
# should check confirm_multiline_termination to finish?
|
|
1848
|
-
@line_index = @buffer_of_lines.size - 1
|
|
1849
|
-
@byte_pointer = current_line.bytesize
|
|
1670
|
+
if @line_index == @buffer_of_lines.size - 1 && confirm_multiline_termination
|
|
1850
1671
|
finish
|
|
1672
|
+
else
|
|
1673
|
+
key_newline(key)
|
|
1851
1674
|
end
|
|
1852
1675
|
end
|
|
1853
1676
|
else
|
|
@@ -1855,6 +1678,11 @@ class Reline::LineEditor
|
|
|
1855
1678
|
end
|
|
1856
1679
|
end
|
|
1857
1680
|
|
|
1681
|
+
private def ed_force_submit(_key)
|
|
1682
|
+
process_insert(force: true)
|
|
1683
|
+
finish
|
|
1684
|
+
end
|
|
1685
|
+
|
|
1858
1686
|
private def em_delete_prev_char(key, arg: 1)
|
|
1859
1687
|
arg.times do
|
|
1860
1688
|
if @byte_pointer == 0 and @line_index > 0
|
|
@@ -1921,7 +1749,7 @@ class Reline::LineEditor
|
|
|
1921
1749
|
alias_method :kill_whole_line, :em_kill_line
|
|
1922
1750
|
|
|
1923
1751
|
private def em_delete(key)
|
|
1924
|
-
if buffer_empty? and key == "\C-d"
|
|
1752
|
+
if buffer_empty? and key == "\C-d"
|
|
1925
1753
|
@eof = true
|
|
1926
1754
|
finish
|
|
1927
1755
|
elsif @byte_pointer < current_line.bytesize
|
|
@@ -1939,9 +1767,11 @@ class Reline::LineEditor
|
|
|
1939
1767
|
if current_line.empty? or @byte_pointer < current_line.bytesize
|
|
1940
1768
|
em_delete(key)
|
|
1941
1769
|
elsif !@config.autocompletion # show completed list
|
|
1942
|
-
|
|
1770
|
+
pre, target, post, quote = retrieve_completion_block
|
|
1771
|
+
result = call_completion_proc(pre, target, post, quote)
|
|
1943
1772
|
if result.is_a?(Array)
|
|
1944
|
-
|
|
1773
|
+
candidates = filter_normalize_candidates(target, result)
|
|
1774
|
+
menu(candidates)
|
|
1945
1775
|
end
|
|
1946
1776
|
end
|
|
1947
1777
|
end
|
|
@@ -1973,7 +1803,7 @@ class Reline::LineEditor
|
|
|
1973
1803
|
|
|
1974
1804
|
private def em_next_word(key)
|
|
1975
1805
|
if current_line.bytesize > @byte_pointer
|
|
1976
|
-
byte_size
|
|
1806
|
+
byte_size = Reline::Unicode.em_forward_word(current_line, @byte_pointer)
|
|
1977
1807
|
@byte_pointer += byte_size
|
|
1978
1808
|
end
|
|
1979
1809
|
end
|
|
@@ -1981,7 +1811,7 @@ class Reline::LineEditor
|
|
|
1981
1811
|
|
|
1982
1812
|
private def ed_prev_word(key)
|
|
1983
1813
|
if @byte_pointer > 0
|
|
1984
|
-
byte_size
|
|
1814
|
+
byte_size = Reline::Unicode.em_backward_word(current_line, @byte_pointer)
|
|
1985
1815
|
@byte_pointer -= byte_size
|
|
1986
1816
|
end
|
|
1987
1817
|
end
|
|
@@ -1989,7 +1819,7 @@ class Reline::LineEditor
|
|
|
1989
1819
|
|
|
1990
1820
|
private def em_delete_next_word(key)
|
|
1991
1821
|
if current_line.bytesize > @byte_pointer
|
|
1992
|
-
byte_size
|
|
1822
|
+
byte_size = Reline::Unicode.em_forward_word(current_line, @byte_pointer)
|
|
1993
1823
|
line, word = byteslice!(current_line, @byte_pointer, byte_size)
|
|
1994
1824
|
set_current_line(line)
|
|
1995
1825
|
@kill_ring.append(word)
|
|
@@ -1999,7 +1829,7 @@ class Reline::LineEditor
|
|
|
1999
1829
|
|
|
2000
1830
|
private def ed_delete_prev_word(key)
|
|
2001
1831
|
if @byte_pointer > 0
|
|
2002
|
-
byte_size
|
|
1832
|
+
byte_size = Reline::Unicode.em_backward_word(current_line, @byte_pointer)
|
|
2003
1833
|
line, word = byteslice!(current_line, @byte_pointer - byte_size, byte_size)
|
|
2004
1834
|
set_current_line(line, @byte_pointer - byte_size)
|
|
2005
1835
|
@kill_ring.append(word, true)
|
|
@@ -2039,7 +1869,7 @@ class Reline::LineEditor
|
|
|
2039
1869
|
|
|
2040
1870
|
private def em_capitol_case(key)
|
|
2041
1871
|
if current_line.bytesize > @byte_pointer
|
|
2042
|
-
byte_size,
|
|
1872
|
+
byte_size, new_str = Reline::Unicode.em_forward_word_with_capitalization(current_line, @byte_pointer)
|
|
2043
1873
|
before = current_line.byteslice(0, @byte_pointer)
|
|
2044
1874
|
after = current_line.byteslice((@byte_pointer + byte_size)..-1)
|
|
2045
1875
|
set_current_line(before + new_str + after, @byte_pointer + new_str.bytesize)
|
|
@@ -2049,7 +1879,7 @@ class Reline::LineEditor
|
|
|
2049
1879
|
|
|
2050
1880
|
private def em_lower_case(key)
|
|
2051
1881
|
if current_line.bytesize > @byte_pointer
|
|
2052
|
-
byte_size
|
|
1882
|
+
byte_size = Reline::Unicode.em_forward_word(current_line, @byte_pointer)
|
|
2053
1883
|
part = current_line.byteslice(@byte_pointer, byte_size).grapheme_clusters.map { |mbchar|
|
|
2054
1884
|
mbchar =~ /[A-Z]/ ? mbchar.downcase : mbchar
|
|
2055
1885
|
}.join
|
|
@@ -2062,7 +1892,7 @@ class Reline::LineEditor
|
|
|
2062
1892
|
|
|
2063
1893
|
private def em_upper_case(key)
|
|
2064
1894
|
if current_line.bytesize > @byte_pointer
|
|
2065
|
-
byte_size
|
|
1895
|
+
byte_size = Reline::Unicode.em_forward_word(current_line, @byte_pointer)
|
|
2066
1896
|
part = current_line.byteslice(@byte_pointer, byte_size).grapheme_clusters.map { |mbchar|
|
|
2067
1897
|
mbchar =~ /[a-z]/ ? mbchar.upcase : mbchar
|
|
2068
1898
|
}.join
|
|
@@ -2075,7 +1905,7 @@ class Reline::LineEditor
|
|
|
2075
1905
|
|
|
2076
1906
|
private def em_kill_region(key)
|
|
2077
1907
|
if @byte_pointer > 0
|
|
2078
|
-
byte_size
|
|
1908
|
+
byte_size = Reline::Unicode.em_big_backward_word(current_line, @byte_pointer)
|
|
2079
1909
|
line, deleted = byteslice!(current_line, @byte_pointer - byte_size, byte_size)
|
|
2080
1910
|
set_current_line(line, @byte_pointer - byte_size)
|
|
2081
1911
|
@kill_ring.append(deleted, true)
|
|
@@ -2106,7 +1936,7 @@ class Reline::LineEditor
|
|
|
2106
1936
|
|
|
2107
1937
|
private def vi_next_word(key, arg: 1)
|
|
2108
1938
|
if current_line.bytesize > @byte_pointer
|
|
2109
|
-
byte_size
|
|
1939
|
+
byte_size = Reline::Unicode.vi_forward_word(current_line, @byte_pointer, @drop_terminate_spaces)
|
|
2110
1940
|
@byte_pointer += byte_size
|
|
2111
1941
|
end
|
|
2112
1942
|
arg -= 1
|
|
@@ -2115,7 +1945,7 @@ class Reline::LineEditor
|
|
|
2115
1945
|
|
|
2116
1946
|
private def vi_prev_word(key, arg: 1)
|
|
2117
1947
|
if @byte_pointer > 0
|
|
2118
|
-
byte_size
|
|
1948
|
+
byte_size = Reline::Unicode.vi_backward_word(current_line, @byte_pointer)
|
|
2119
1949
|
@byte_pointer -= byte_size
|
|
2120
1950
|
end
|
|
2121
1951
|
arg -= 1
|
|
@@ -2124,7 +1954,7 @@ class Reline::LineEditor
|
|
|
2124
1954
|
|
|
2125
1955
|
private def vi_end_word(key, arg: 1, inclusive: false)
|
|
2126
1956
|
if current_line.bytesize > @byte_pointer
|
|
2127
|
-
byte_size
|
|
1957
|
+
byte_size = Reline::Unicode.vi_forward_end_word(current_line, @byte_pointer)
|
|
2128
1958
|
@byte_pointer += byte_size
|
|
2129
1959
|
end
|
|
2130
1960
|
arg -= 1
|
|
@@ -2139,7 +1969,7 @@ class Reline::LineEditor
|
|
|
2139
1969
|
|
|
2140
1970
|
private def vi_next_big_word(key, arg: 1)
|
|
2141
1971
|
if current_line.bytesize > @byte_pointer
|
|
2142
|
-
byte_size
|
|
1972
|
+
byte_size = Reline::Unicode.vi_big_forward_word(current_line, @byte_pointer)
|
|
2143
1973
|
@byte_pointer += byte_size
|
|
2144
1974
|
end
|
|
2145
1975
|
arg -= 1
|
|
@@ -2148,7 +1978,7 @@ class Reline::LineEditor
|
|
|
2148
1978
|
|
|
2149
1979
|
private def vi_prev_big_word(key, arg: 1)
|
|
2150
1980
|
if @byte_pointer > 0
|
|
2151
|
-
byte_size
|
|
1981
|
+
byte_size = Reline::Unicode.vi_big_backward_word(current_line, @byte_pointer)
|
|
2152
1982
|
@byte_pointer -= byte_size
|
|
2153
1983
|
end
|
|
2154
1984
|
arg -= 1
|
|
@@ -2157,7 +1987,7 @@ class Reline::LineEditor
|
|
|
2157
1987
|
|
|
2158
1988
|
private def vi_end_big_word(key, arg: 1, inclusive: false)
|
|
2159
1989
|
if current_line.bytesize > @byte_pointer
|
|
2160
|
-
byte_size
|
|
1990
|
+
byte_size = Reline::Unicode.vi_big_forward_end_word(current_line, @byte_pointer)
|
|
2161
1991
|
@byte_pointer += byte_size
|
|
2162
1992
|
end
|
|
2163
1993
|
arg -= 1
|
|
@@ -2312,7 +2142,7 @@ class Reline::LineEditor
|
|
|
2312
2142
|
}
|
|
2313
2143
|
system("#{ENV['EDITOR']} #{path}")
|
|
2314
2144
|
@buffer_of_lines = File.read(path).split("\n")
|
|
2315
|
-
@buffer_of_lines = [String.new(encoding:
|
|
2145
|
+
@buffer_of_lines = [String.new(encoding: encoding)] if @buffer_of_lines.empty?
|
|
2316
2146
|
@line_index = 0
|
|
2317
2147
|
finish
|
|
2318
2148
|
end
|
|
@@ -2337,20 +2167,9 @@ class Reline::LineEditor
|
|
|
2337
2167
|
end
|
|
2338
2168
|
|
|
2339
2169
|
private def ed_argument_digit(key)
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
unescaped_key = key ^ 0b10000000
|
|
2344
|
-
unless unescaped_key.chr.to_i.zero?
|
|
2345
|
-
@vi_arg = unescaped_key.chr.to_i
|
|
2346
|
-
end
|
|
2347
|
-
end
|
|
2348
|
-
else
|
|
2349
|
-
@vi_arg = key.chr.to_i
|
|
2350
|
-
end
|
|
2351
|
-
else
|
|
2352
|
-
@vi_arg = @vi_arg * 10 + key.chr.to_i
|
|
2353
|
-
end
|
|
2170
|
+
# key is expected to be `ESC digit` or `digit`
|
|
2171
|
+
num = key[/\d/].to_i
|
|
2172
|
+
@vi_arg = (@vi_arg || 0) * 10 + num
|
|
2354
2173
|
end
|
|
2355
2174
|
|
|
2356
2175
|
private def vi_to_column(key, arg: 0)
|
|
@@ -2363,13 +2182,13 @@ class Reline::LineEditor
|
|
|
2363
2182
|
end
|
|
2364
2183
|
|
|
2365
2184
|
private def vi_replace_char(key, arg: 1)
|
|
2366
|
-
@waiting_proc = ->(k) {
|
|
2185
|
+
@waiting_proc = ->(k, _sym) {
|
|
2367
2186
|
if arg == 1
|
|
2368
2187
|
byte_size = Reline::Unicode.get_next_mbchar_size(current_line, @byte_pointer)
|
|
2369
2188
|
before = current_line.byteslice(0, @byte_pointer)
|
|
2370
2189
|
remaining_point = @byte_pointer + byte_size
|
|
2371
2190
|
after = current_line.byteslice(remaining_point, current_line.bytesize - remaining_point)
|
|
2372
|
-
set_current_line(before + k
|
|
2191
|
+
set_current_line(before + k + after)
|
|
2373
2192
|
@waiting_proc = nil
|
|
2374
2193
|
elsif arg > 1
|
|
2375
2194
|
byte_size = 0
|
|
@@ -2379,7 +2198,7 @@ class Reline::LineEditor
|
|
|
2379
2198
|
before = current_line.byteslice(0, @byte_pointer)
|
|
2380
2199
|
remaining_point = @byte_pointer + byte_size
|
|
2381
2200
|
after = current_line.byteslice(remaining_point, current_line.bytesize - remaining_point)
|
|
2382
|
-
replaced = k
|
|
2201
|
+
replaced = k * arg
|
|
2383
2202
|
set_current_line(before + replaced + after, @byte_pointer + replaced.bytesize)
|
|
2384
2203
|
@waiting_proc = nil
|
|
2385
2204
|
end
|
|
@@ -2387,19 +2206,14 @@ class Reline::LineEditor
|
|
|
2387
2206
|
end
|
|
2388
2207
|
|
|
2389
2208
|
private def vi_next_char(key, arg: 1, inclusive: false)
|
|
2390
|
-
@waiting_proc = ->(key_for_proc) { search_next_char(key_for_proc, arg, inclusive: inclusive) }
|
|
2209
|
+
@waiting_proc = ->(key_for_proc, _sym) { search_next_char(key_for_proc, arg, inclusive: inclusive) }
|
|
2391
2210
|
end
|
|
2392
2211
|
|
|
2393
2212
|
private def vi_to_next_char(key, arg: 1, inclusive: false)
|
|
2394
|
-
@waiting_proc = ->(key_for_proc) { search_next_char(key_for_proc, arg, need_prev_char: true, inclusive: inclusive) }
|
|
2213
|
+
@waiting_proc = ->(key_for_proc, _sym) { search_next_char(key_for_proc, arg, need_prev_char: true, inclusive: inclusive) }
|
|
2395
2214
|
end
|
|
2396
2215
|
|
|
2397
2216
|
private def search_next_char(key, arg, need_prev_char: false, inclusive: false)
|
|
2398
|
-
if key.instance_of?(String)
|
|
2399
|
-
inputed_char = key
|
|
2400
|
-
else
|
|
2401
|
-
inputed_char = key.chr
|
|
2402
|
-
end
|
|
2403
2217
|
prev_total = nil
|
|
2404
2218
|
total = nil
|
|
2405
2219
|
found = false
|
|
@@ -2410,7 +2224,7 @@ class Reline::LineEditor
|
|
|
2410
2224
|
width = Reline::Unicode.get_mbchar_width(mbchar)
|
|
2411
2225
|
total = [mbchar.bytesize, width]
|
|
2412
2226
|
else
|
|
2413
|
-
if
|
|
2227
|
+
if key == mbchar
|
|
2414
2228
|
arg -= 1
|
|
2415
2229
|
if arg.zero?
|
|
2416
2230
|
found = true
|
|
@@ -2439,19 +2253,14 @@ class Reline::LineEditor
|
|
|
2439
2253
|
end
|
|
2440
2254
|
|
|
2441
2255
|
private def vi_prev_char(key, arg: 1)
|
|
2442
|
-
@waiting_proc = ->(key_for_proc) { search_prev_char(key_for_proc, arg) }
|
|
2256
|
+
@waiting_proc = ->(key_for_proc, _sym) { search_prev_char(key_for_proc, arg) }
|
|
2443
2257
|
end
|
|
2444
2258
|
|
|
2445
2259
|
private def vi_to_prev_char(key, arg: 1)
|
|
2446
|
-
@waiting_proc = ->(key_for_proc) { search_prev_char(key_for_proc, arg, true) }
|
|
2260
|
+
@waiting_proc = ->(key_for_proc, _sym) { search_prev_char(key_for_proc, arg, true) }
|
|
2447
2261
|
end
|
|
2448
2262
|
|
|
2449
2263
|
private def search_prev_char(key, arg, need_next_char = false)
|
|
2450
|
-
if key.instance_of?(String)
|
|
2451
|
-
inputed_char = key
|
|
2452
|
-
else
|
|
2453
|
-
inputed_char = key.chr
|
|
2454
|
-
end
|
|
2455
2264
|
prev_total = nil
|
|
2456
2265
|
total = nil
|
|
2457
2266
|
found = false
|
|
@@ -2462,7 +2271,7 @@ class Reline::LineEditor
|
|
|
2462
2271
|
width = Reline::Unicode.get_mbchar_width(mbchar)
|
|
2463
2272
|
total = [mbchar.bytesize, width]
|
|
2464
2273
|
else
|
|
2465
|
-
if
|
|
2274
|
+
if key == mbchar
|
|
2466
2275
|
arg -= 1
|
|
2467
2276
|
if arg.zero?
|
|
2468
2277
|
found = true
|
|
@@ -2514,24 +2323,23 @@ class Reline::LineEditor
|
|
|
2514
2323
|
@config.editing_mode = :vi_insert
|
|
2515
2324
|
end
|
|
2516
2325
|
|
|
2517
|
-
private def
|
|
2518
|
-
@
|
|
2326
|
+
private def move_undo_redo(direction)
|
|
2327
|
+
@restoring = true
|
|
2328
|
+
return unless (0..@undo_redo_history.size - 1).cover?(@undo_redo_index + direction)
|
|
2519
2329
|
|
|
2520
|
-
|
|
2330
|
+
@undo_redo_index += direction
|
|
2331
|
+
buffer_of_lines, byte_pointer, line_index = @undo_redo_history[@undo_redo_index]
|
|
2332
|
+
@buffer_of_lines = buffer_of_lines.dup
|
|
2333
|
+
@line_index = line_index
|
|
2334
|
+
@byte_pointer = byte_pointer
|
|
2335
|
+
end
|
|
2521
2336
|
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
set_current_lines(target_lines.dup, target_cursor_x, target_cursor_y)
|
|
2337
|
+
private def undo(_key)
|
|
2338
|
+
move_undo_redo(-1)
|
|
2525
2339
|
end
|
|
2526
2340
|
|
|
2527
2341
|
private def redo(_key)
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
return if @input_lines_position >= @input_lines.size - 1
|
|
2531
|
-
|
|
2532
|
-
@input_lines_position += 1
|
|
2533
|
-
target_lines, target_cursor_x, target_cursor_y = @input_lines[@input_lines_position]
|
|
2534
|
-
set_current_lines(target_lines.dup, target_cursor_x, target_cursor_y)
|
|
2342
|
+
move_undo_redo(+1)
|
|
2535
2343
|
end
|
|
2536
2344
|
|
|
2537
2345
|
private def prev_action_state_value(type)
|