brakeman 7.0.0 → 7.0.2

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.
Files changed (269) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +13 -0
  3. data/README.md +1 -1
  4. data/bundle/load.rb +9 -8
  5. data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/NEWS.md +25 -0
  6. data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/parser.rb +15 -5
  7. data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/version.rb +1 -1
  8. data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv.rb +1 -1
  9. data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/Changelog.md +4 -0
  10. data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/Gemfile +1 -0
  11. data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/list_renderer.rb +2 -2
  12. data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/menu.rb +7 -5
  13. data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/version.rb +1 -1
  14. data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline.rb +17 -12
  15. data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/io/ansi.rb +8 -15
  16. data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/key_stroke.rb +2 -2
  17. data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/line_editor.rb +76 -104
  18. data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/unicode/east_asian_width.rb +41 -15
  19. data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/unicode.rb +2 -2
  20. data/bundle/ruby/3.1.0/gems/reline-0.6.1/lib/reline/version.rb +3 -0
  21. data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline.rb +22 -13
  22. data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/NEWS.md +24 -0
  23. data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/baseparser.rb +29 -8
  24. data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/rexml.rb +1 -1
  25. data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/source.rb +16 -2
  26. data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/History.rdoc +6 -0
  27. data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/lib/ruby2ruby.rb +7 -4
  28. data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/History.rdoc +7 -0
  29. data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/cell.rb +1 -1
  30. data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/table.rb +2 -0
  31. data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/version.rb +1 -1
  32. data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/terminal-table.gemspec +1 -2
  33. data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/template.rb +151 -24
  34. data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt.rb +9 -1
  35. data/bundle/ruby/3.1.0/gems/{unicode-display_width-2.6.0 → unicode-display_width-3.1.4}/CHANGELOG.md +93 -2
  36. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/README.md +194 -0
  37. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/data/display_width.marshal.gz +0 -0
  38. data/bundle/ruby/3.1.0/gems/{unicode-display_width-2.6.0 → unicode-display_width-3.1.4}/lib/unicode/display_width/constants.rb +1 -1
  39. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/emoji_support.rb +52 -0
  40. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/reline_ext.rb +14 -0
  41. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/string_ext.rb +9 -0
  42. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width.rb +247 -0
  43. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/CHANGELOG.md +191 -0
  44. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/CODE_OF_CONDUCT.md +74 -0
  45. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/Gemfile +7 -0
  46. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/Gemfile.lock +33 -0
  47. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/MIT-LICENSE.txt +20 -0
  48. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/README.md +205 -0
  49. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/data/emoji.marshal.gz +0 -0
  50. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/data/generate_constants.rb +344 -0
  51. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/constants.rb +49 -0
  52. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex.rb +8 -0
  53. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_basic.rb +8 -0
  54. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_emoji_keycap.rb +8 -0
  55. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_mqe.rb +8 -0
  56. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_mqe_uqe.rb +8 -0
  57. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_text.rb +8 -0
  58. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_picto.rb +8 -0
  59. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_picto_no_emoji.rb +8 -0
  60. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_possible.rb +8 -0
  61. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_component.rb +8 -0
  62. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_emoji.rb +8 -0
  63. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_modifier.rb +8 -0
  64. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_modifier_base.rb +8 -0
  65. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_presentation.rb +8 -0
  66. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_text.rb +8 -0
  67. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_text_presentation.rb +8 -0
  68. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_valid.rb +8 -0
  69. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_valid_include_text.rb +8 -0
  70. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_well_formed.rb +8 -0
  71. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_well_formed_include_text.rb +8 -0
  72. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex.rb +8 -0
  73. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_basic.rb +8 -0
  74. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_emoji_keycap.rb +8 -0
  75. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_mqe.rb +8 -0
  76. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb +8 -0
  77. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_text.rb +8 -0
  78. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_picto.rb +8 -0
  79. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_picto_no_emoji.rb +8 -0
  80. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_possible.rb +8 -0
  81. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_component.rb +8 -0
  82. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_emoji.rb +8 -0
  83. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_modifier.rb +8 -0
  84. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_modifier_base.rb +8 -0
  85. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_presentation.rb +8 -0
  86. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_text.rb +8 -0
  87. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_text_presentation.rb +8 -0
  88. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_valid.rb +8 -0
  89. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_valid_include_text.rb +8 -0
  90. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_well_formed.rb +8 -0
  91. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_well_formed_include_text.rb +8 -0
  92. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/index.rb +14 -0
  93. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/lazy_constants.rb +56 -0
  94. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/list.rb +13 -0
  95. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji.rb +111 -0
  96. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/unicode-emoji.gemspec +22 -0
  97. data/lib/brakeman/app_tree.rb +6 -1
  98. data/lib/brakeman/checks/check_evaluation.rb +39 -20
  99. data/lib/brakeman/checks/check_weak_rsa_key.rb +1 -1
  100. data/lib/brakeman/options.rb +4 -0
  101. data/lib/brakeman/processors/alias_processor.rb +3 -2
  102. data/lib/brakeman/scanner.rb +22 -13
  103. data/lib/brakeman/version.rb +1 -1
  104. data/lib/brakeman.rb +7 -0
  105. metadata +253 -197
  106. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/version.rb +0 -3
  107. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/README.md +0 -171
  108. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/data/display_width.marshal.gz +0 -0
  109. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/string_ext.rb +0 -9
  110. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width.rb +0 -123
  111. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/LICENSE.txt +0 -0
  112. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/README.md +0 -0
  113. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/core_ext/array.rb +0 -0
  114. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/core_ext/string.rb +0 -0
  115. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/fields_converter.rb +0 -0
  116. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/input_record_separator.rb +0 -0
  117. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/row.rb +0 -0
  118. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/table.rb +0 -0
  119. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/writer.rb +0 -0
  120. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/AUTHORS +0 -0
  121. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/COPYING +0 -0
  122. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/LICENSE +0 -0
  123. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/README.md +0 -0
  124. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/TODO +0 -0
  125. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/highline.gemspec +0 -0
  126. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/builtin_styles.rb +0 -0
  127. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/color_scheme.rb +0 -0
  128. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/compatibility.rb +0 -0
  129. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/custom_errors.rb +0 -0
  130. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/import.rb +0 -0
  131. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/io_console_compatible.rb +0 -0
  132. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/list.rb +0 -0
  133. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/menu/item.rb +0 -0
  134. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/paginator.rb +0 -0
  135. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question/answer_converter.rb +0 -0
  136. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question.rb +0 -0
  137. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question_asker.rb +0 -0
  138. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/simulate.rb +0 -0
  139. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/statement.rb +0 -0
  140. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/string.rb +0 -0
  141. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/string_extensions.rb +0 -0
  142. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/style.rb +0 -0
  143. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/template_renderer.rb +0 -0
  144. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/io_console.rb +0 -0
  145. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/ncurses.rb +0 -0
  146. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/unix_stty.rb +0 -0
  147. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal.rb +0 -0
  148. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/wrapper.rb +0 -0
  149. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/BSDL +0 -0
  150. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/COPYING +0 -0
  151. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/README.md +0 -0
  152. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/config.rb +0 -0
  153. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/face.rb +0 -0
  154. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/history.rb +0 -0
  155. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/io/dumb.rb +0 -0
  156. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/io/windows.rb +0 -0
  157. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/io.rb +0 -0
  158. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/key_actor/base.rb +0 -0
  159. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/key_actor/composite.rb +0 -0
  160. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/key_actor/emacs.rb +0 -0
  161. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/key_actor/vi_command.rb +0 -0
  162. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/key_actor/vi_insert.rb +0 -0
  163. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/key_actor.rb +0 -0
  164. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/lib/reline/kill_ring.rb +0 -0
  165. /data/bundle/ruby/3.1.0/gems/{reline-0.6.0 → reline-0.6.1}/license_of_rb-readline +0 -0
  166. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/LICENSE.txt +0 -0
  167. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/README.md +0 -0
  168. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/attlistdecl.rb +0 -0
  169. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/attribute.rb +0 -0
  170. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/cdata.rb +0 -0
  171. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/child.rb +0 -0
  172. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/comment.rb +0 -0
  173. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/doctype.rb +0 -0
  174. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/document.rb +0 -0
  175. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/dtd/attlistdecl.rb +0 -0
  176. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/dtd/dtd.rb +0 -0
  177. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/dtd/elementdecl.rb +0 -0
  178. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/dtd/entitydecl.rb +0 -0
  179. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/dtd/notationdecl.rb +0 -0
  180. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/element.rb +0 -0
  181. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/encoding.rb +0 -0
  182. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/entity.rb +0 -0
  183. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/formatters/default.rb +0 -0
  184. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/formatters/pretty.rb +0 -0
  185. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/formatters/transitive.rb +0 -0
  186. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/functions.rb +0 -0
  187. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/instruction.rb +0 -0
  188. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/light/node.rb +0 -0
  189. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/namespace.rb +0 -0
  190. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/node.rb +0 -0
  191. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/output.rb +0 -0
  192. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parent.rb +0 -0
  193. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parseexception.rb +0 -0
  194. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/lightparser.rb +0 -0
  195. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/pullparser.rb +0 -0
  196. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/sax2parser.rb +0 -0
  197. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/streamparser.rb +0 -0
  198. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/treeparser.rb +0 -0
  199. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/ultralightparser.rb +0 -0
  200. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/xpathparser.rb +0 -0
  201. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/quickpath.rb +0 -0
  202. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/sax2listener.rb +0 -0
  203. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/security.rb +0 -0
  204. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/streamlistener.rb +0 -0
  205. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/text.rb +0 -0
  206. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/undefinednamespaceexception.rb +0 -0
  207. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/validation/relaxng.rb +0 -0
  208. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/validation/validation.rb +0 -0
  209. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/validation/validationexception.rb +0 -0
  210. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/xmldecl.rb +0 -0
  211. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/xmltokens.rb +0 -0
  212. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/xpath.rb +0 -0
  213. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/xpath_parser.rb +0 -0
  214. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml.rb +0 -0
  215. /data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/Manifest.txt +0 -0
  216. /data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/README.rdoc +0 -0
  217. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/Gemfile +0 -0
  218. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/LICENSE.txt +0 -0
  219. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/Manifest +0 -0
  220. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/README.md +0 -0
  221. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/Todo.rdoc +0 -0
  222. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/import.rb +0 -0
  223. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/row.rb +0 -0
  224. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/separator.rb +0 -0
  225. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/style.rb +0 -0
  226. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/table_helper.rb +0 -0
  227. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/util.rb +0 -0
  228. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table.rb +0 -0
  229. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/COPYING +0 -0
  230. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/_emacs_org.rb +0 -0
  231. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/_handlebars.rb +0 -0
  232. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/_jbuilder.rb +0 -0
  233. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/_org.rb +0 -0
  234. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/asciidoc.rb +0 -0
  235. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/babel.rb +0 -0
  236. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/builder.rb +0 -0
  237. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/cli.rb +0 -0
  238. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/coffee.rb +0 -0
  239. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/commonmarker.rb +0 -0
  240. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/creole.rb +0 -0
  241. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/csv.rb +0 -0
  242. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/erb.rb +0 -0
  243. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/erubi.rb +0 -0
  244. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/etanni.rb +0 -0
  245. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/haml.rb +0 -0
  246. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/kramdown.rb +0 -0
  247. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/liquid.rb +0 -0
  248. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/livescript.rb +0 -0
  249. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/mapping.rb +0 -0
  250. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/markaby.rb +0 -0
  251. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/nokogiri.rb +0 -0
  252. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/pandoc.rb +0 -0
  253. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/pipeline.rb +0 -0
  254. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/plain.rb +0 -0
  255. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/prawn.rb +0 -0
  256. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/radius.rb +0 -0
  257. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/rdiscount.rb +0 -0
  258. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/rdoc.rb +0 -0
  259. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/redcarpet.rb +0 -0
  260. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/redcloth.rb +0 -0
  261. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/rst-pandoc.rb +0 -0
  262. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/sass.rb +0 -0
  263. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/slim.rb +0 -0
  264. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/string.rb +0 -0
  265. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/typescript.rb +0 -0
  266. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/yajl.rb +0 -0
  267. /data/bundle/ruby/3.1.0/gems/{unicode-display_width-2.6.0 → unicode-display_width-3.1.4}/MIT-LICENSE.txt +0 -0
  268. /data/bundle/ruby/3.1.0/gems/{unicode-display_width-2.6.0 → unicode-display_width-3.1.4}/lib/unicode/display_width/index.rb +0 -0
  269. /data/bundle/ruby/3.1.0/gems/{unicode-display_width-2.6.0 → unicode-display_width-3.1.4}/lib/unicode/display_width/no_string_ext.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ed78bfa3355b4eb1c645ca0a97f71062335cc685a7372bd0b9d443862cfcc9a
4
- data.tar.gz: d7fc4e62c433b96f78bb85cae1f1beab0fd7a9f18d6c4876bcb089bb5361eb1e
3
+ metadata.gz: 1d063638ad6b28912fd2d23560c3a8987079331519f4a28de70b9606f3e3a331
4
+ data.tar.gz: 96bcf39a322da85ff3445fbf6143fae85e368df1cd8f00763e68c8415fe44b04
5
5
  SHA512:
6
- metadata.gz: 83ef69806ae9b921367cf2cd94b91ea361049ad08daed08c99e44debd6e331c2084fe51bd75573074e5677ce7227b0e59a5cb750d0692358df584be12a9ab3d8
7
- data.tar.gz: d57d3ade3e1f10fb0a1a0cc23fb2ed68001cbd0e05d3e5035b3ef854d63825ecae66d030201600abfc02ecfe5051859374720a67949e642ba97c127880d8f93b
6
+ metadata.gz: d1242d5d9206bbe8b1cf64caf96daf49b21c591092e85b084ffcc9d032b42d2d553f274f6ee1e08ab7c6fade89262a36d45efdb5595a2eae7b78be4f34938154
7
+ data.tar.gz: aee45242d6a787180d860aa5f286518107cc4ba4a62e2fb1e49bb241f6272643456d73917a2905fdf15e422e21e90ba82edcf177d5e726f37b19b77231c99502
data/CHANGES.md CHANGED
@@ -1,3 +1,16 @@
1
+ # 7.0.2 - 2025-04-04
2
+
3
+ * Fix error with empty `BUNDLE_GEMFILE` env variable
4
+
5
+ # 7.0.1 - 2025-04-03
6
+
7
+ * Avoid warning on evaluation of plain strings
8
+ * Enable use of custom/alternative Gemfiles
9
+ * Fix error on directory with `rb` extension (viralpraxis)
10
+ * Support `terminal-table` 4.0 (Chedli Bourguiba)
11
+ * Better support Prism 1.4.0
12
+ * Only output timing for each file when using `--debug`
13
+
1
14
  # 7.0.0 - 2024-12-30
2
15
 
3
16
  * Always warn about deserializing from Marshal
data/README.md CHANGED
@@ -63,7 +63,7 @@ Outside of Rails root (note that the output file is relative to path/to/rails/ap
63
63
 
64
64
  # Compatibility
65
65
 
66
- Brakeman should work with any version of Rails from 2.3.x to 7.x.
66
+ Brakeman should work with any version of Rails from 2.3.x to 8.x.
67
67
 
68
68
  Brakeman can analyze code written with Ruby 2.0 syntax and newer, but requires at least Ruby 3.0.0 to run.
69
69
 
data/bundle/load.rb CHANGED
@@ -1,16 +1,17 @@
1
1
  path = File.expand_path('../..', __FILE__)
2
- $:.unshift "#{path}/bundle/ruby/3.1.0/gems/csv-3.3.2/lib"
2
+ $:.unshift "#{path}/bundle/ruby/3.1.0/gems/csv-3.3.3/lib"
3
3
  $:.unshift "#{path}/bundle/ruby/3.1.0/gems/erubis-2.7.0/lib"
4
4
  $:.unshift "#{path}/bundle/ruby/3.1.0/gems/haml-5.2.2/lib"
5
- $:.unshift "#{path}/bundle/ruby/3.1.0/gems/highline-3.1.1/lib"
5
+ $:.unshift "#{path}/bundle/ruby/3.1.0/gems/highline-3.1.2/lib"
6
6
  $:.unshift "#{path}/bundle/ruby/3.1.0/gems/parallel-1.26.3/lib"
7
- $:.unshift "#{path}/bundle/ruby/3.1.0/gems/reline-0.6.0/lib"
8
- $:.unshift "#{path}/bundle/ruby/3.1.0/gems/rexml-3.4.0/lib"
9
- $:.unshift "#{path}/bundle/ruby/3.1.0/gems/ruby2ruby-2.5.1/lib"
7
+ $:.unshift "#{path}/bundle/ruby/3.1.0/gems/reline-0.6.1/lib"
8
+ $:.unshift "#{path}/bundle/ruby/3.1.0/gems/rexml-3.4.1/lib"
9
+ $:.unshift "#{path}/bundle/ruby/3.1.0/gems/ruby2ruby-2.5.2/lib"
10
10
  $:.unshift "#{path}/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib"
11
11
  $:.unshift "#{path}/bundle/ruby/3.1.0/gems/sexp_processor-4.17.3/lib"
12
12
  $:.unshift "#{path}/bundle/ruby/3.1.0/gems/slim-5.2.1/lib"
13
13
  $:.unshift "#{path}/bundle/ruby/3.1.0/gems/temple-0.10.3/lib"
14
- $:.unshift "#{path}/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib"
15
- $:.unshift "#{path}/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib"
16
- $:.unshift "#{path}/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib"
14
+ $:.unshift "#{path}/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib"
15
+ $:.unshift "#{path}/bundle/ruby/3.1.0/gems/tilt-2.6.0/lib"
16
+ $:.unshift "#{path}/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib"
17
+ $:.unshift "#{path}/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib"
@@ -1,5 +1,30 @@
1
1
  # News
2
2
 
3
+ ## 3.3.3 - 2025-03-20
4
+
5
+ ### Improvements
6
+
7
+ * `csv-filter`: Add an experimental command line tool to filter a CSV.
8
+ * Patch by Burdette Lamar
9
+
10
+ ### Fixes
11
+
12
+ * Fixed wrong EOF detection for `ARGF`
13
+ * GH-328
14
+ * Reported by Takeshi Nishimatsu
15
+
16
+ * Fixed a regression bug that `CSV.open` rejects integer mode.
17
+ * GH-336
18
+ * Reported by Dave Burgess
19
+
20
+ ### Thanks
21
+
22
+ * Takeshi Nishimatsu
23
+
24
+ * Burdette Lamar
25
+
26
+ * Dave Burgess
27
+
3
28
  ## 3.3.2 - 2024-12-21
4
29
 
5
30
  ### Fixes
@@ -18,6 +18,19 @@ class CSV
18
18
  # into your Encoding.
19
19
  #
20
20
 
21
+ class << self
22
+ ARGF_OBJECT_ID = ARGF.object_id
23
+ # Convenient method to check whether the give input reached EOF
24
+ # or not.
25
+ def eof?(input)
26
+ # We can't use input != ARGF in Ractor. Because ARGF isn't a
27
+ # shareable object.
28
+ input.object_id != ARGF_OBJECT_ID and
29
+ input.respond_to?(:eof) and
30
+ input.eof?
31
+ end
32
+ end
33
+
21
34
  # Raised when encoding is invalid.
22
35
  class InvalidEncoding < StandardError
23
36
  end
@@ -312,7 +325,7 @@ class CSV
312
325
  raise InvalidEncoding unless chunk.valid_encoding?
313
326
  # trace(__method__, :chunk, chunk)
314
327
  @scanner = StringScanner.new(chunk)
315
- if input.respond_to?(:eof?) and input.eof?
328
+ if Parser.eof?(input)
316
329
  @inputs.shift
317
330
  @last_scanner = @inputs.empty?
318
331
  end
@@ -869,10 +882,7 @@ class CSV
869
882
  string = nil
870
883
  if @samples.empty? and @input.is_a?(StringIO)
871
884
  string = @input.read
872
- elsif @samples.size == 1 and
873
- @input != ARGF and
874
- @input.respond_to?(:eof?) and
875
- @input.eof?
885
+ elsif @samples.size == 1 and Parser.eof?(@input)
876
886
  string = @samples[0]
877
887
  end
878
888
  if string
@@ -2,5 +2,5 @@
2
2
 
3
3
  class CSV
4
4
  # The version of the installed library.
5
- VERSION = "3.3.2"
5
+ VERSION = "3.3.3"
6
6
  end
@@ -1976,7 +1976,7 @@ class CSV
1976
1976
  return unless Encoding.default_external == Encoding::UTF_8
1977
1977
  return if options.key?(:encoding)
1978
1978
  return if options.key?(:external_encoding)
1979
- return if mode.include?(":")
1979
+ return if mode.is_a?(String) and mode.include?(":")
1980
1980
  file_opts[:encoding] = "bom|utf-8"
1981
1981
  end
1982
1982
 
@@ -2,6 +2,10 @@
2
2
 
3
3
  Below is a complete listing of changes for each revision of HighLine.
4
4
 
5
+ ### 3.1.2 / 2025-01-05
6
+ * PR #279 - Upgrades and adjustments for Ruby 3.4 release (@abinoam)
7
+ * PR #278 - Prevent ArgumentError for #col_count_calculate when items exceed 80 chars (@davidjkling, @justintsteele)
8
+
5
9
  ### 3.1.1 / 2024-08-18
6
10
  * PR #276 - Update #say to always flush the output after a #puts (@blipper)
7
11
  * PR #274 / I #273 (@costa)
@@ -17,4 +17,5 @@ group :code_quality do
17
17
  # gem "pronto-poper", require: false, platform: :ruby
18
18
  gem "pronto-reek", require: false, platform: :ruby
19
19
  gem "pronto-rubocop", require: false, platform: :ruby
20
+ gem "base64", require: false
20
21
  end
@@ -236,8 +236,8 @@ class HighLine
236
236
  end
237
237
 
238
238
  def col_count_calculate
239
- (line_size_limit + row_join_str_size) /
240
- (items_max_length + row_join_str_size)
239
+ result = (line_size_limit + row_join_str_size) / (items_max_length + row_join_str_size)
240
+ result == 0 ? 1 : result
241
241
  end
242
242
 
243
243
  def col_count
@@ -374,12 +374,14 @@ class HighLine
374
374
  end
375
375
 
376
376
  def map_items_by_index
377
- if [:letter, :capital_letter].include?(@index)
378
- # @ and ` are the previous ASCII characters to A and a respectively
379
- prev_char = (@index == :capital_letter ? '@' : '`')
380
- all_items.map { prev_char.succ!.dup }
377
+ size = all_items.size
378
+ case @index
379
+ when :letter
380
+ ("a".."z").first(size)
381
+ when :capital_letter
382
+ ("A".."Z").first(size)
381
383
  else
382
- (1..all_items.size).map(&:to_s)
384
+ (1..size).map(&:to_s)
383
385
  end
384
386
  end
385
387
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  class HighLine
4
4
  # The version of the installed library.
5
- VERSION = "3.1.1".freeze
5
+ VERSION = "3.1.2".freeze
6
6
  end
@@ -555,21 +555,26 @@ class HighLine
555
555
  terminal.raw_no_echo_mode_exec do
556
556
  loop do
557
557
  character = terminal.get_character
558
- raise Interrupt if character == "\u0003"
559
- break unless character
560
- break if ["\n", "\r"].include? character
561
-
562
- # honor backspace and delete
563
- if character == "\b" || character == "\u007F"
564
- chopped = line.chop!
565
- output_erase_char if chopped && question.echo
566
- elsif character == "\cU"
558
+
559
+ case character
560
+ when "\u0003" # Ctrl+C (Interrupt)
561
+ raise Interrupt
562
+ when nil # No character received
563
+ break
564
+ when "\n", "\r" # Newline or carriage return
565
+ break
566
+ when "\b", "\u007F" # Backspace and delete
567
+ unless line.empty?
568
+ line = line.chop
569
+ output_erase_char if question.echo
570
+ end
571
+ when "\cU" # Clear line
567
572
  line.size.times { output_erase_char } if question.echo
568
573
  line = ""
569
- elsif character == "\e"
574
+ when "\e" # Escape key
570
575
  ignore_arrow_key
571
- else
572
- line << character
576
+ else # Any other character
577
+ line += character
573
578
  say_last_char_or_echo_char(line, question)
574
579
  end
575
580
 
@@ -2,18 +2,6 @@ require 'io/console'
2
2
  require 'io/wait'
3
3
 
4
4
  class Reline::ANSI < Reline::IO
5
- CAPNAME_KEY_BINDINGS = {
6
- 'khome' => :ed_move_to_beg,
7
- 'kend' => :ed_move_to_end,
8
- 'kdch1' => :key_delete,
9
- 'kpp' => :ed_search_prev_history,
10
- 'knp' => :ed_search_next_history,
11
- 'kcuu1' => :ed_prev_history,
12
- 'kcud1' => :ed_next_history,
13
- 'kcuf1' => :ed_next_char,
14
- 'kcub1' => :ed_prev_char,
15
- }
16
-
17
5
  ANSI_CURSOR_KEY_BINDINGS = {
18
6
  # Up
19
7
  'A' => [:ed_prev_history, {}],
@@ -217,9 +205,7 @@ class Reline::ANSI < Reline::IO
217
205
  break
218
206
  end
219
207
  end
220
- buf.chars.reverse_each do |ch|
221
- stdin.ungetc ch
222
- end
208
+ @buf.concat buf.bytes
223
209
  end
224
210
  [match[:column].to_i - 1, match[:row].to_i - 1] if match
225
211
  end
@@ -309,6 +295,13 @@ class Reline::ANSI < Reline::IO
309
295
  # Signal.trap may raise an ArgumentError if the platform doesn't support the signal.
310
296
  end
311
297
 
298
+ def read_single_char(keyseq_timeout)
299
+ # Disable intr to read `C-c` `C-z` `C-\` for quoted insert
300
+ @input.raw(intr: false) do
301
+ super
302
+ end
303
+ end
304
+
312
305
  def prep
313
306
  # Enable bracketed paste
314
307
  write "\e[?2004h" if Reline.core.config.enable_bracketed_paste && both_tty?
@@ -56,8 +56,8 @@ class Reline::KeyStroke
56
56
  if func.is_a?(Array)
57
57
  # Perform simple macro expansion for single byte key bindings.
58
58
  # Multibyte key bindings and recursive macro expansion are not supported yet.
59
- marco = func.pack('c*').force_encoding(@encoding)
60
- keys = marco.chars.map do |c|
59
+ macro = func.pack('c*').force_encoding(@encoding)
60
+ keys = macro.chars.map do |c|
61
61
  f = key_mapping.get(c.bytes)
62
62
  Reline::Key.new(c, f.is_a?(Symbol) ? f : :ed_insert, false)
63
63
  end
@@ -250,8 +250,8 @@ class Reline::LineEditor
250
250
  @resized = false
251
251
  @cache = {}
252
252
  @rendered_screen = RenderedScreen.new(base_y: 0, lines: [], cursor_y: 0)
253
- @input_lines = [[[""], 0, 0]]
254
- @input_lines_position = 0
253
+ @undo_redo_history = [[[""], 0, 0]]
254
+ @undo_redo_index = 0
255
255
  @restoring = false
256
256
  @prev_action_state = NullActionState
257
257
  @next_action_state = NullActionState
@@ -542,6 +542,7 @@ class Reline::LineEditor
542
542
  Reline::IOGate.show_cursor
543
543
  end
544
544
  Reline::IOGate.move_cursor_column new_cursor_x
545
+ new_cursor_y = new_cursor_y.clamp(0, screen_height - 1)
545
546
  Reline::IOGate.move_cursor_down new_cursor_y - cursor_y
546
547
  @rendered_screen.cursor_y = new_cursor_y
547
548
  ensure
@@ -911,28 +912,36 @@ class Reline::LineEditor
911
912
  )
912
913
  end
913
914
 
914
- private def run_for_operators(key, method_symbol, &block)
915
+ private def run_for_operators(key, method_symbol)
916
+ # Reject multibyte input (converted to ed_insert) in vi_command mode
917
+ return if method_symbol == :ed_insert && @config.editing_mode_is?(:vi_command) && !@waiting_proc
918
+
919
+ if ARGUMENT_DIGIT_METHODS.include?(method_symbol) && !@waiting_proc
920
+ wrap_method_call(method_symbol, key, false)
921
+ return
922
+ end
923
+
915
924
  if @vi_waiting_operator
916
- if VI_MOTIONS.include?(method_symbol)
925
+ if @waiting_proc || VI_MOTIONS.include?(method_symbol)
917
926
  old_byte_pointer = @byte_pointer
918
927
  @vi_arg = (@vi_arg || 1) * @vi_waiting_operator_arg
919
- block.(true)
928
+ wrap_method_call(method_symbol, key, true)
920
929
  unless @waiting_proc
921
930
  byte_pointer_diff = @byte_pointer - old_byte_pointer
922
931
  @byte_pointer = old_byte_pointer
923
- method_obj = method(@vi_waiting_operator)
924
- wrap_method_call(@vi_waiting_operator, method_obj, byte_pointer_diff)
932
+ __send__(@vi_waiting_operator, byte_pointer_diff)
925
933
  cleanup_waiting
926
934
  end
927
935
  else
928
936
  # Ignores operator when not motion is given.
929
- block.(false)
937
+ wrap_method_call(method_symbol, key, false)
930
938
  cleanup_waiting
931
939
  end
932
- @vi_arg = nil
933
940
  else
934
- block.(false)
941
+ wrap_method_call(method_symbol, key, false)
935
942
  end
943
+ @vi_arg = nil
944
+ @kill_ring.process
936
945
  end
937
946
 
938
947
  private def argumentable?(method_obj)
@@ -945,20 +954,23 @@ class Reline::LineEditor
945
954
  method_obj and method_obj.parameters.any? { |param| param[0] == :key and param[1] == :inclusive }
946
955
  end
947
956
 
948
- def wrap_method_call(method_symbol, method_obj, key, with_operator = false)
949
- if @config.editing_mode_is?(:emacs, :vi_insert) and @vi_waiting_operator.nil?
950
- not_insertion = method_symbol != :ed_insert
951
- process_insert(force: not_insertion)
957
+ def wrap_method_call(method_symbol, key, with_operator)
958
+ if @waiting_proc
959
+ @waiting_proc.call(key)
960
+ return
952
961
  end
962
+
963
+ return unless respond_to?(method_symbol, true)
964
+ method_obj = method(method_symbol)
953
965
  if @vi_arg and argumentable?(method_obj)
954
- if with_operator and inclusive?(method_obj)
955
- method_obj.(key, arg: @vi_arg, inclusive: true)
966
+ if inclusive?(method_obj)
967
+ method_obj.(key, arg: @vi_arg, inclusive: with_operator)
956
968
  else
957
969
  method_obj.(key, arg: @vi_arg)
958
970
  end
959
971
  else
960
- if with_operator and inclusive?(method_obj)
961
- method_obj.(key, inclusive: true)
972
+ if inclusive?(method_obj)
973
+ method_obj.(key, inclusive: with_operator)
962
974
  else
963
975
  method_obj.(key)
964
976
  end
@@ -984,50 +996,9 @@ class Reline::LineEditor
984
996
  cleanup_waiting unless VI_WAITING_ACCEPT_METHODS.include?(method_symbol) || VI_MOTIONS.include?(method_symbol)
985
997
  end
986
998
 
987
- if @waiting_proc
988
- old_byte_pointer = @byte_pointer
989
- @waiting_proc.call(key)
990
- if @vi_waiting_operator
991
- byte_pointer_diff = @byte_pointer - old_byte_pointer
992
- @byte_pointer = old_byte_pointer
993
- method_obj = method(@vi_waiting_operator)
994
- wrap_method_call(@vi_waiting_operator, method_obj, byte_pointer_diff)
995
- cleanup_waiting
996
- end
997
- @kill_ring.process
998
- return
999
- end
1000
-
1001
- # Reject multibyte input (converted to ed_insert) in vi_command mode
1002
- return if method_symbol == :ed_insert && @config.editing_mode_is?(:vi_command)
999
+ process_insert(force: method_symbol != :ed_insert)
1003
1000
 
1004
- if method_symbol and respond_to?(method_symbol, true)
1005
- method_obj = method(method_symbol)
1006
- end
1007
- if @vi_arg
1008
- if ARGUMENT_DIGIT_METHODS.include?(method_symbol)
1009
- ed_argument_digit(key)
1010
- else
1011
- if argumentable?(method_obj)
1012
- run_for_operators(key, method_symbol) do |with_operator|
1013
- wrap_method_call(method_symbol, method_obj, key, with_operator)
1014
- end
1015
- elsif method_obj
1016
- wrap_method_call(method_symbol, method_obj, key)
1017
- end
1018
- @kill_ring.process
1019
- @vi_arg = nil
1020
- end
1021
- elsif method_obj
1022
- if method_symbol == :ed_argument_digit
1023
- wrap_method_call(method_symbol, method_obj, key)
1024
- else
1025
- run_for_operators(key, method_symbol) do |with_operator|
1026
- wrap_method_call(method_symbol, method_obj, key, with_operator)
1027
- end
1028
- end
1029
- @kill_ring.process
1030
- end
1001
+ run_for_operators(key, method_symbol)
1031
1002
  end
1032
1003
 
1033
1004
  def update(key)
@@ -1041,7 +1012,7 @@ class Reline::LineEditor
1041
1012
  end
1042
1013
 
1043
1014
  def input_key(key)
1044
- save_old_buffer
1015
+ old_buffer_of_lines = @buffer_of_lines.dup
1045
1016
  @config.reset_oneshot_key_bindings
1046
1017
  if key.char.nil?
1047
1018
  process_insert(force: true)
@@ -1049,11 +1020,8 @@ class Reline::LineEditor
1049
1020
  finish
1050
1021
  return
1051
1022
  end
1052
- @dialogs.each do |dialog|
1053
- if key.method_symbol == dialog.name
1054
- return
1055
- end
1056
- end
1023
+ return if @dialogs.any? { |dialog| dialog.name == key.method_symbol }
1024
+
1057
1025
  @completion_occurs = false
1058
1026
 
1059
1027
  process_key(key.char, key.method_symbol)
@@ -1069,7 +1037,9 @@ class Reline::LineEditor
1069
1037
  @completion_journey_state = nil
1070
1038
  end
1071
1039
 
1072
- push_input_lines unless @restoring
1040
+ modified = old_buffer_of_lines != @buffer_of_lines
1041
+
1042
+ push_undo_redo(modified) unless @restoring
1073
1043
  @restoring = false
1074
1044
 
1075
1045
  if @in_pasting
@@ -1077,7 +1047,6 @@ class Reline::LineEditor
1077
1047
  return
1078
1048
  end
1079
1049
 
1080
- modified = @old_buffer_of_lines != @buffer_of_lines
1081
1050
  if !@completion_occurs && modified && !@config.disable_completion && @config.autocompletion
1082
1051
  # Auto complete starts only when edited
1083
1052
  process_insert(force: true)
@@ -1086,26 +1055,17 @@ class Reline::LineEditor
1086
1055
  modified
1087
1056
  end
1088
1057
 
1089
- def save_old_buffer
1090
- @old_buffer_of_lines = @buffer_of_lines.dup
1091
- end
1092
-
1093
- def push_input_lines
1094
- if @old_buffer_of_lines == @buffer_of_lines
1095
- @input_lines[@input_lines_position] = [@buffer_of_lines.dup, @byte_pointer, @line_index]
1058
+ MAX_UNDO_REDO_HISTORY_SIZE = 100
1059
+ def push_undo_redo(modified)
1060
+ if modified
1061
+ @undo_redo_history = @undo_redo_history[0..@undo_redo_index]
1062
+ @undo_redo_history.push([@buffer_of_lines.dup, @byte_pointer, @line_index])
1063
+ if @undo_redo_history.size > MAX_UNDO_REDO_HISTORY_SIZE
1064
+ @undo_redo_history.shift
1065
+ end
1066
+ @undo_redo_index = @undo_redo_history.size - 1
1096
1067
  else
1097
- @input_lines = @input_lines[0..@input_lines_position]
1098
- @input_lines_position += 1
1099
- @input_lines.push([@buffer_of_lines.dup, @byte_pointer, @line_index])
1100
- end
1101
- trim_input_lines
1102
- end
1103
-
1104
- MAX_INPUT_LINES = 100
1105
- def trim_input_lines
1106
- if @input_lines.size > MAX_INPUT_LINES
1107
- @input_lines.shift
1108
- @input_lines_position -= 1
1068
+ @undo_redo_history[@undo_redo_index] = [@buffer_of_lines.dup, @byte_pointer, @line_index]
1109
1069
  end
1110
1070
  end
1111
1071
 
@@ -1188,7 +1148,7 @@ class Reline::LineEditor
1188
1148
  quote_characters = Reline.completer_quote_characters
1189
1149
  before = current_line.byteslice(0, @byte_pointer).grapheme_clusters
1190
1150
  quote = nil
1191
- # Calcualte closing quote when cursor is at the end of the line
1151
+ # Calculate closing quote when cursor is at the end of the line
1192
1152
  if current_line.bytesize == @byte_pointer && !quote_characters.empty?
1193
1153
  escaped = false
1194
1154
  before.each do |c|
@@ -1413,9 +1373,16 @@ class Reline::LineEditor
1413
1373
 
1414
1374
  insert_text(str)
1415
1375
  end
1416
- alias_method :ed_digit, :ed_insert
1417
1376
  alias_method :self_insert, :ed_insert
1418
1377
 
1378
+ private def ed_digit(key)
1379
+ if @vi_arg
1380
+ ed_argument_digit(key)
1381
+ else
1382
+ ed_insert(key)
1383
+ end
1384
+ end
1385
+
1419
1386
  private def insert_raw_char(str, arg: 1)
1420
1387
  arg.times do
1421
1388
  if str == "\C-j" or str == "\C-m"
@@ -1461,7 +1428,14 @@ class Reline::LineEditor
1461
1428
  @byte_pointer = 0
1462
1429
  end
1463
1430
  alias_method :beginning_of_line, :ed_move_to_beg
1464
- alias_method :vi_zero, :ed_move_to_beg
1431
+
1432
+ private def vi_zero(key)
1433
+ if @vi_arg
1434
+ ed_argument_digit(key)
1435
+ else
1436
+ ed_move_to_beg(key)
1437
+ end
1438
+ end
1465
1439
 
1466
1440
  private def ed_move_to_end(key)
1467
1441
  @byte_pointer = current_line.bytesize
@@ -1691,17 +1665,10 @@ class Reline::LineEditor
1691
1665
  finish
1692
1666
  end
1693
1667
  else
1694
- if @line_index == (@buffer_of_lines.size - 1)
1695
- if confirm_multiline_termination
1696
- finish
1697
- else
1698
- key_newline(key)
1699
- end
1700
- else
1701
- # should check confirm_multiline_termination to finish?
1702
- @line_index = @buffer_of_lines.size - 1
1703
- @byte_pointer = current_line.bytesize
1668
+ if @line_index == @buffer_of_lines.size - 1 && confirm_multiline_termination
1704
1669
  finish
1670
+ else
1671
+ key_newline(key)
1705
1672
  end
1706
1673
  end
1707
1674
  else
@@ -1709,6 +1676,11 @@ class Reline::LineEditor
1709
1676
  end
1710
1677
  end
1711
1678
 
1679
+ private def ed_force_submit(_key)
1680
+ process_insert(force: true)
1681
+ finish
1682
+ end
1683
+
1712
1684
  private def em_delete_prev_char(key, arg: 1)
1713
1685
  arg.times do
1714
1686
  if @byte_pointer == 0 and @line_index > 0
@@ -2351,10 +2323,10 @@ class Reline::LineEditor
2351
2323
 
2352
2324
  private def move_undo_redo(direction)
2353
2325
  @restoring = true
2354
- return unless (0..@input_lines.size - 1).cover?(@input_lines_position + direction)
2326
+ return unless (0..@undo_redo_history.size - 1).cover?(@undo_redo_index + direction)
2355
2327
 
2356
- @input_lines_position += direction
2357
- buffer_of_lines, byte_pointer, line_index = @input_lines[@input_lines_position]
2328
+ @undo_redo_index += direction
2329
+ buffer_of_lines, byte_pointer, line_index = @undo_redo_history[@undo_redo_index]
2358
2330
  @buffer_of_lines = buffer_of_lines.dup
2359
2331
  @line_index = line_index
2360
2332
  @byte_pointer = byte_pointer