brakeman 7.0.0 → 7.0.1

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 (244) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +9 -0
  3. data/README.md +1 -1
  4. data/bundle/load.rb +8 -7
  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/{rexml-3.4.0 → rexml-3.4.1}/NEWS.md +24 -0
  16. data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/baseparser.rb +29 -8
  17. data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/rexml.rb +1 -1
  18. data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/source.rb +16 -2
  19. data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/History.rdoc +6 -0
  20. data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/lib/ruby2ruby.rb +7 -4
  21. data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/History.rdoc +7 -0
  22. data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/cell.rb +1 -1
  23. data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/table.rb +2 -0
  24. data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/version.rb +1 -1
  25. data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/terminal-table.gemspec +1 -2
  26. data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/template.rb +151 -24
  27. data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt.rb +9 -1
  28. data/bundle/ruby/3.1.0/gems/{unicode-display_width-2.6.0 → unicode-display_width-3.1.4}/CHANGELOG.md +93 -2
  29. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/README.md +194 -0
  30. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/data/display_width.marshal.gz +0 -0
  31. 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
  32. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/emoji_support.rb +52 -0
  33. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/reline_ext.rb +14 -0
  34. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/string_ext.rb +9 -0
  35. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width.rb +247 -0
  36. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/CHANGELOG.md +191 -0
  37. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/CODE_OF_CONDUCT.md +74 -0
  38. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/Gemfile +7 -0
  39. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/Gemfile.lock +33 -0
  40. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/MIT-LICENSE.txt +20 -0
  41. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/README.md +205 -0
  42. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/data/emoji.marshal.gz +0 -0
  43. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/data/generate_constants.rb +344 -0
  44. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/constants.rb +49 -0
  45. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex.rb +8 -0
  46. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_basic.rb +8 -0
  47. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_emoji_keycap.rb +8 -0
  48. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_mqe.rb +8 -0
  49. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_mqe_uqe.rb +8 -0
  50. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_text.rb +8 -0
  51. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_picto.rb +8 -0
  52. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_picto_no_emoji.rb +8 -0
  53. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_possible.rb +8 -0
  54. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_component.rb +8 -0
  55. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_emoji.rb +8 -0
  56. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_modifier.rb +8 -0
  57. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_modifier_base.rb +8 -0
  58. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_presentation.rb +8 -0
  59. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_text.rb +8 -0
  60. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_text_presentation.rb +8 -0
  61. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_valid.rb +8 -0
  62. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_valid_include_text.rb +8 -0
  63. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_well_formed.rb +8 -0
  64. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_well_formed_include_text.rb +8 -0
  65. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex.rb +8 -0
  66. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_basic.rb +8 -0
  67. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_emoji_keycap.rb +8 -0
  68. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_mqe.rb +8 -0
  69. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb +8 -0
  70. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_text.rb +8 -0
  71. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_picto.rb +8 -0
  72. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_picto_no_emoji.rb +8 -0
  73. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_possible.rb +8 -0
  74. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_component.rb +8 -0
  75. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_emoji.rb +8 -0
  76. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_modifier.rb +8 -0
  77. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_modifier_base.rb +8 -0
  78. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_presentation.rb +8 -0
  79. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_text.rb +8 -0
  80. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_text_presentation.rb +8 -0
  81. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_valid.rb +8 -0
  82. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_valid_include_text.rb +8 -0
  83. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_well_formed.rb +8 -0
  84. 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
  85. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/index.rb +14 -0
  86. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/lazy_constants.rb +56 -0
  87. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/list.rb +13 -0
  88. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji.rb +111 -0
  89. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/unicode-emoji.gemspec +22 -0
  90. data/lib/brakeman/app_tree.rb +6 -1
  91. data/lib/brakeman/checks/check_evaluation.rb +39 -20
  92. data/lib/brakeman/checks/check_weak_rsa_key.rb +1 -1
  93. data/lib/brakeman/options.rb +4 -0
  94. data/lib/brakeman/processors/alias_processor.rb +3 -2
  95. data/lib/brakeman/scanner.rb +22 -13
  96. data/lib/brakeman/version.rb +1 -1
  97. data/lib/brakeman.rb +7 -0
  98. metadata +229 -173
  99. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/README.md +0 -171
  100. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/data/display_width.marshal.gz +0 -0
  101. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/string_ext.rb +0 -9
  102. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width.rb +0 -123
  103. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/LICENSE.txt +0 -0
  104. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/README.md +0 -0
  105. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/core_ext/array.rb +0 -0
  106. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/core_ext/string.rb +0 -0
  107. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/fields_converter.rb +0 -0
  108. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/input_record_separator.rb +0 -0
  109. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/row.rb +0 -0
  110. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/table.rb +0 -0
  111. /data/bundle/ruby/3.1.0/gems/{csv-3.3.2 → csv-3.3.3}/lib/csv/writer.rb +0 -0
  112. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/AUTHORS +0 -0
  113. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/COPYING +0 -0
  114. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/LICENSE +0 -0
  115. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/README.md +0 -0
  116. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/TODO +0 -0
  117. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/highline.gemspec +0 -0
  118. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/builtin_styles.rb +0 -0
  119. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/color_scheme.rb +0 -0
  120. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/compatibility.rb +0 -0
  121. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/custom_errors.rb +0 -0
  122. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/import.rb +0 -0
  123. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/io_console_compatible.rb +0 -0
  124. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/list.rb +0 -0
  125. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/menu/item.rb +0 -0
  126. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/paginator.rb +0 -0
  127. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question/answer_converter.rb +0 -0
  128. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question.rb +0 -0
  129. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question_asker.rb +0 -0
  130. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/simulate.rb +0 -0
  131. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/statement.rb +0 -0
  132. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/string.rb +0 -0
  133. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/string_extensions.rb +0 -0
  134. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/style.rb +0 -0
  135. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/template_renderer.rb +0 -0
  136. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/io_console.rb +0 -0
  137. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/ncurses.rb +0 -0
  138. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/unix_stty.rb +0 -0
  139. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal.rb +0 -0
  140. /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/wrapper.rb +0 -0
  141. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/LICENSE.txt +0 -0
  142. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/README.md +0 -0
  143. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/attlistdecl.rb +0 -0
  144. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/attribute.rb +0 -0
  145. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/cdata.rb +0 -0
  146. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/child.rb +0 -0
  147. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/comment.rb +0 -0
  148. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/doctype.rb +0 -0
  149. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/document.rb +0 -0
  150. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/dtd/attlistdecl.rb +0 -0
  151. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/dtd/dtd.rb +0 -0
  152. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/dtd/elementdecl.rb +0 -0
  153. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/dtd/entitydecl.rb +0 -0
  154. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/dtd/notationdecl.rb +0 -0
  155. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/element.rb +0 -0
  156. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/encoding.rb +0 -0
  157. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/entity.rb +0 -0
  158. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/formatters/default.rb +0 -0
  159. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/formatters/pretty.rb +0 -0
  160. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/formatters/transitive.rb +0 -0
  161. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/functions.rb +0 -0
  162. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/instruction.rb +0 -0
  163. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/light/node.rb +0 -0
  164. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/namespace.rb +0 -0
  165. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/node.rb +0 -0
  166. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/output.rb +0 -0
  167. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parent.rb +0 -0
  168. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parseexception.rb +0 -0
  169. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/lightparser.rb +0 -0
  170. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/pullparser.rb +0 -0
  171. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/sax2parser.rb +0 -0
  172. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/streamparser.rb +0 -0
  173. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/treeparser.rb +0 -0
  174. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/ultralightparser.rb +0 -0
  175. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/parsers/xpathparser.rb +0 -0
  176. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/quickpath.rb +0 -0
  177. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/sax2listener.rb +0 -0
  178. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/security.rb +0 -0
  179. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/streamlistener.rb +0 -0
  180. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/text.rb +0 -0
  181. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/undefinednamespaceexception.rb +0 -0
  182. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/validation/relaxng.rb +0 -0
  183. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/validation/validation.rb +0 -0
  184. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/validation/validationexception.rb +0 -0
  185. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/xmldecl.rb +0 -0
  186. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/xmltokens.rb +0 -0
  187. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/xpath.rb +0 -0
  188. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml/xpath_parser.rb +0 -0
  189. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.0 → rexml-3.4.1}/lib/rexml.rb +0 -0
  190. /data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/Manifest.txt +0 -0
  191. /data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/README.rdoc +0 -0
  192. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/Gemfile +0 -0
  193. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/LICENSE.txt +0 -0
  194. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/Manifest +0 -0
  195. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/README.md +0 -0
  196. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/Todo.rdoc +0 -0
  197. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/import.rb +0 -0
  198. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/row.rb +0 -0
  199. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/separator.rb +0 -0
  200. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/style.rb +0 -0
  201. /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
  202. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table/util.rb +0 -0
  203. /data/bundle/ruby/3.1.0/gems/{terminal-table-3.0.2 → terminal-table-4.0.0}/lib/terminal-table.rb +0 -0
  204. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/COPYING +0 -0
  205. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/_emacs_org.rb +0 -0
  206. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/_handlebars.rb +0 -0
  207. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/_jbuilder.rb +0 -0
  208. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/_org.rb +0 -0
  209. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/asciidoc.rb +0 -0
  210. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/babel.rb +0 -0
  211. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/builder.rb +0 -0
  212. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/cli.rb +0 -0
  213. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/coffee.rb +0 -0
  214. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/commonmarker.rb +0 -0
  215. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/creole.rb +0 -0
  216. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/csv.rb +0 -0
  217. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/erb.rb +0 -0
  218. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/erubi.rb +0 -0
  219. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/etanni.rb +0 -0
  220. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/haml.rb +0 -0
  221. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/kramdown.rb +0 -0
  222. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/liquid.rb +0 -0
  223. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/livescript.rb +0 -0
  224. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/mapping.rb +0 -0
  225. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/markaby.rb +0 -0
  226. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/nokogiri.rb +0 -0
  227. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/pandoc.rb +0 -0
  228. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/pipeline.rb +0 -0
  229. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/plain.rb +0 -0
  230. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/prawn.rb +0 -0
  231. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/radius.rb +0 -0
  232. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/rdiscount.rb +0 -0
  233. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/rdoc.rb +0 -0
  234. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/redcarpet.rb +0 -0
  235. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/redcloth.rb +0 -0
  236. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/rst-pandoc.rb +0 -0
  237. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/sass.rb +0 -0
  238. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/slim.rb +0 -0
  239. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/string.rb +0 -0
  240. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/typescript.rb +0 -0
  241. /data/bundle/ruby/3.1.0/gems/{tilt-2.5.0 → tilt-2.6.0}/lib/tilt/yajl.rb +0 -0
  242. /data/bundle/ruby/3.1.0/gems/{unicode-display_width-2.6.0 → unicode-display_width-3.1.4}/MIT-LICENSE.txt +0 -0
  243. /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
  244. /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
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../display_width"
4
+
5
+ class String
6
+ def display_width(ambiguous = nil, overwrite = nil, old_options = {}, **options)
7
+ Unicode::DisplayWidth.of(self, ambiguous, overwrite, old_options = {}, **options)
8
+ end
9
+ end
@@ -0,0 +1,247 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "unicode/emoji"
4
+
5
+ require_relative "display_width/constants"
6
+ require_relative "display_width/index"
7
+ require_relative "display_width/emoji_support"
8
+
9
+ module Unicode
10
+ class DisplayWidth
11
+ DEFAULT_AMBIGUOUS = 1
12
+ INITIAL_DEPTH = 0x10000
13
+ ASCII_NON_ZERO_REGEX = /[\0\x05\a\b\n-\x0F]/
14
+ ASCII_NON_ZERO_STRING = "\0\x05\a\b\n-\x0F"
15
+ ASCII_BACKSPACE = "\b"
16
+ AMBIGUOUS_MAP = {
17
+ 1 => :WIDTH_ONE,
18
+ 2 => :WIDTH_TWO,
19
+ }
20
+ FIRST_AMBIGUOUS = {
21
+ WIDTH_ONE: 768,
22
+ WIDTH_TWO: 161,
23
+ }
24
+ NOT_COMMON_NARROW_REGEX = {
25
+ WIDTH_ONE: /[^\u{10}-\u{2FF}]/m,
26
+ WIDTH_TWO: /[^\u{10}-\u{A1}]/m,
27
+ }
28
+ FIRST_4096 = {
29
+ WIDTH_ONE: decompress_index(INDEX[:WIDTH_ONE][0][0], 1),
30
+ WIDTH_TWO: decompress_index(INDEX[:WIDTH_TWO][0][0], 1),
31
+ }
32
+ EMOJI_SEQUENCES_REGEX_MAPPING = {
33
+ rgi: :REGEX_INCLUDE_MQE_UQE,
34
+ rgi_at: :REGEX_INCLUDE_MQE_UQE,
35
+ possible: :REGEX_WELL_FORMED,
36
+ }
37
+ REGEX_EMOJI_VS16 = Regexp.union(
38
+ Regexp.compile(
39
+ Unicode::Emoji::REGEX_TEXT_PRESENTATION.source +
40
+ "(?<![#*0-9])" +
41
+ "\u{FE0F}"
42
+ ),
43
+ Unicode::Emoji::REGEX_EMOJI_KEYCAP
44
+ )
45
+
46
+ # ebase = Unicode::Emoji::REGEX_PROP_MODIFIER_BASE.source
47
+ REGEX_EMOJI_ALL_SEQUENCES = Regexp.union(/.[\u{1F3FB}-\u{1F3FF}\u{FE0F}]?(\u{200D}.[\u{1F3FB}-\u{1F3FF}\u{FE0F}]?)+|.[\u{1F3FB}-\u{1F3FF}]/, Unicode::Emoji::REGEX_EMOJI_KEYCAP)
48
+ REGEX_EMOJI_ALL_SEQUENCES_AND_VS16 = Regexp.union(REGEX_EMOJI_ALL_SEQUENCES, REGEX_EMOJI_VS16)
49
+
50
+ # Returns monospace display width of string
51
+ def self.of(string, ambiguous = nil, overwrite = nil, old_options = {}, **options)
52
+ # Binary strings don't make much sense when calculating display width.
53
+ # Assume it's valid UTF-8
54
+ if string.encoding == Encoding::BINARY && !string.force_encoding(Encoding::UTF_8).valid_encoding?
55
+ # Didn't work out, go back to binary
56
+ string.force_encoding(Encoding::BINARY)
57
+ end
58
+
59
+ string = string.encode(Encoding::UTF_8, invalid: :replace, undef: :replace) unless string.encoding == Encoding::UTF_8
60
+ options = normalize_options(string, ambiguous, overwrite, old_options, **options)
61
+
62
+ width = 0
63
+
64
+ unless options[:overwrite].empty?
65
+ width, string = width_custom(string, options[:overwrite])
66
+ end
67
+
68
+ if string.ascii_only?
69
+ return width + width_ascii(string)
70
+ end
71
+
72
+ ambiguous_index_name = AMBIGUOUS_MAP[options[:ambiguous]]
73
+
74
+ unless string.match?(NOT_COMMON_NARROW_REGEX[ambiguous_index_name])
75
+ return width + string.size
76
+ end
77
+
78
+ # Retrieve Emoji width
79
+ if options[:emoji] != :none
80
+ e_width, string = emoji_width(
81
+ string,
82
+ options[:emoji],
83
+ options[:ambiguous],
84
+ )
85
+ width += e_width
86
+
87
+ unless string.match?(NOT_COMMON_NARROW_REGEX[ambiguous_index_name])
88
+ return width + string.size
89
+ end
90
+ end
91
+
92
+ index_full = INDEX[ambiguous_index_name]
93
+ index_low = FIRST_4096[ambiguous_index_name]
94
+ first_ambiguous = FIRST_AMBIGUOUS[ambiguous_index_name]
95
+
96
+ string.each_codepoint{ |codepoint|
97
+ if codepoint > 15 && codepoint < first_ambiguous
98
+ width += 1
99
+ elsif codepoint < 0x1001
100
+ width += index_low[codepoint] || 1
101
+ else
102
+ d = INITIAL_DEPTH
103
+ w = index_full[codepoint / d]
104
+ while w.instance_of? Array
105
+ w = w[(codepoint %= d) / (d /= 16)]
106
+ end
107
+
108
+ width += w || 1
109
+ end
110
+ }
111
+
112
+ # Return result + prevent negative lengths
113
+ width < 0 ? 0 : width
114
+ end
115
+
116
+ # Returns width of custom overwrites and remaining string
117
+ def self.width_custom(string, overwrite)
118
+ width = 0
119
+
120
+ string = string.each_codepoint.select{ |codepoint|
121
+ if overwrite[codepoint]
122
+ width += overwrite[codepoint]
123
+ nil
124
+ else
125
+ codepoint
126
+ end
127
+ }.pack("U*")
128
+
129
+ [width, string]
130
+ end
131
+
132
+ # Returns width for ASCII-only strings. Will consider zero-width control symbols.
133
+ def self.width_ascii(string)
134
+ if string.match?(ASCII_NON_ZERO_REGEX)
135
+ res = string.delete(ASCII_NON_ZERO_STRING).bytesize - string.count(ASCII_BACKSPACE)
136
+ return res < 0 ? 0 : res
137
+ end
138
+
139
+ string.bytesize
140
+ end
141
+
142
+ # Returns width of all considered Emoji and remaining string
143
+ def self.emoji_width(string, mode = :all, ambiguous = DEFAULT_AMBIGUOUS)
144
+ res = 0
145
+
146
+ if emoji_set_regex = EMOJI_SEQUENCES_REGEX_MAPPING[mode]
147
+ emoji_width_via_possible(
148
+ string,
149
+ Unicode::Emoji.const_get(emoji_set_regex),
150
+ mode == :rgi_at,
151
+ ambiguous,
152
+ )
153
+
154
+ elsif mode == :all_no_vs16
155
+ no_emoji_string = string.gsub(REGEX_EMOJI_ALL_SEQUENCES){ res += 2; "" }
156
+ [res, no_emoji_string]
157
+
158
+ elsif mode == :vs16
159
+ no_emoji_string = string.gsub(REGEX_EMOJI_VS16){ res += 2; "" }
160
+ [res, no_emoji_string]
161
+
162
+ elsif mode == :all
163
+ no_emoji_string = string.gsub(REGEX_EMOJI_ALL_SEQUENCES_AND_VS16){ res += 2; "" }
164
+ [res, no_emoji_string]
165
+
166
+ else
167
+ [0, string]
168
+
169
+ end
170
+ end
171
+
172
+ # Match possible Emoji first, then refine
173
+ def self.emoji_width_via_possible(string, emoji_set_regex, strict_eaw = false, ambiguous = DEFAULT_AMBIGUOUS)
174
+ res = 0
175
+
176
+ # For each string possibly an emoji
177
+ no_emoji_string = string.gsub(REGEX_EMOJI_ALL_SEQUENCES_AND_VS16){ |emoji_candidate|
178
+ # Check if we have a combined Emoji with width 2 (or EAW an Apple Terminal)
179
+ if emoji_candidate == emoji_candidate[emoji_set_regex]
180
+ if strict_eaw
181
+ res += self.of(emoji_candidate[0], ambiguous, emoji: false)
182
+ else
183
+ res += 2
184
+ end
185
+ ""
186
+
187
+ # We are dealing with a default text presentation emoji or a well-formed sequence not matching the above Emoji set
188
+ else
189
+ if !strict_eaw
190
+ # Ensure all explicit VS16 sequences have width 2
191
+ emoji_candidate.gsub!(REGEX_EMOJI_VS16){ res += 2; "" }
192
+ end
193
+
194
+ emoji_candidate
195
+ end
196
+ }
197
+
198
+ [res, no_emoji_string]
199
+ end
200
+
201
+ def self.normalize_options(string, ambiguous = nil, overwrite = nil, old_options = {}, **options)
202
+ unless old_options.empty?
203
+ warn "Unicode::DisplayWidth: Please migrate to keyword arguments - #{old_options.inspect}"
204
+ options.merge! old_options
205
+ end
206
+
207
+ options[:ambiguous] = ambiguous if ambiguous
208
+ options[:ambiguous] ||= DEFAULT_AMBIGUOUS
209
+
210
+ if options[:ambiguous] != 1 && options[:ambiguous] != 2
211
+ raise ArgumentError, "Unicode::DisplayWidth: Ambiguous width must be 1 or 2"
212
+ end
213
+
214
+ if overwrite && !overwrite.empty?
215
+ warn "Unicode::DisplayWidth: Please migrate to keyword arguments - overwrite: #{overwrite.inspect}"
216
+ options[:overwrite] = overwrite
217
+ end
218
+ options[:overwrite] ||= {}
219
+
220
+ if [nil, true, :auto].include?(options[:emoji])
221
+ options[:emoji] = EmojiSupport.recommended
222
+ elsif options[:emoji] == false
223
+ options[:emoji] = :none
224
+ end
225
+
226
+ options
227
+ end
228
+
229
+ def initialize(ambiguous: DEFAULT_AMBIGUOUS, overwrite: {}, emoji: true)
230
+ @ambiguous = ambiguous
231
+ @overwrite = overwrite
232
+ @emoji = emoji
233
+ end
234
+
235
+ def get_config(**kwargs)
236
+ {
237
+ ambiguous: kwargs[:ambiguous] || @ambiguous,
238
+ overwrite: kwargs[:overwrite] || @overwrite,
239
+ emoji: kwargs[:emoji] || @emoji,
240
+ }
241
+ end
242
+
243
+ def of(string, **kwargs)
244
+ self.class.of(string, **get_config(**kwargs))
245
+ end
246
+ end
247
+ end
@@ -0,0 +1,191 @@
1
+ # CHANGELOG
2
+
3
+ ## 4.0.4
4
+
5
+ - Add `REGEX_TEXT_PRESENTATION` to be able to match for raw default-text Emoji codepoints
6
+
7
+ ## 4.0.3
8
+
9
+ - Remove emoji-test.txt from Rubygems package
10
+
11
+ ## 4.0.2
12
+
13
+ - Directly use `RbConfig::CONFIG["UNICODE_EMOJI_VERSION"]` to detect Ruby's Emoji version,
14
+ drop unicode-version dependency
15
+
16
+ ## 4.0.0
17
+
18
+ - **Breaking change:** Regexes now include single skin tone modifiers (`🏻`) and hair components (`🦰`).
19
+ They were previously considered to be invalid partial Emoji, however since they are supposed to be
20
+ displayed as Emoji in isolation, they are now part of the regexes (see *ED-20* in UTS51).
21
+ - **Breaking change:** Drop `REGEX_ANY` in favor of `REGEX_PROP_EMOJI`
22
+ - Expose regexes for Emoji props (`REGEX_PROP_*`). The advantage over using the native regex properties
23
+ directly is that you will be able to use the Emoji support level of this gem instead of Ruby's.
24
+ For example, as of releasing this, the current Emoji version is 16.0, while Ruby is at 15.0.
25
+ Also see README for a table listing the regexes that match Emoji properties.
26
+ - Add `REGEX_EMOJI_KEYCAP` for matching specifically Emoji keycaps
27
+ - Use character class instead of lookbehind for native text emoji and non-emoji pictographic regexes
28
+
29
+ ## 3.8.0
30
+
31
+ - Add new RGI-based regexes `REGEX_INCLUDE_MQE` and `REGEX_INCLUDE_MQE_UQE` which allows to match
32
+ for minimally-qualified and unqualified RGI sequences (Emoji that lack some VS16)
33
+ - Add specs running through `emoji-text.txt` and classify qualification statuses per regex
34
+ - Improve documentation and add detailed table about which regex has which features
35
+ - Native regexes: Use native Emoji props for Emoji text presentation
36
+ - Update CLDR to v46 (valid subdivisions)
37
+ - Further improvements (see commit log)
38
+
39
+ ## 3.7.0
40
+
41
+ - Bump required Ruby slightly to 2.5
42
+ - Introduce new `REGEX_POSSIBLE` which contains the regex described in
43
+ https://www.unicode.org/reports/tr51/#EBNF_and_Regex
44
+ - Fix that some valid subdivisions were not decompressed (`REGEX_VALID`)
45
+ - Be stricter about selection of tag characters in `REGEX_WELL_FORMED`
46
+ - Only U+E0030..U+E0039, U+E0061..U+E007A allowed
47
+ - Max tag sequence length
48
+ - Use native `/\p{RI}/` regex for regional indicators
49
+ - Separately autoload emoji list, so it can be loaded when other indexes
50
+ are not needed
51
+
52
+ ## 3.6.0
53
+
54
+ - `Unicode::Emoji::REGEX_TEXT` now matches non-emoji keycaps like "3⃣" (U+0033 U+20E3)
55
+ - Minor refactorings
56
+
57
+ ## 3.5.0
58
+
59
+ - Emoji 16.0
60
+
61
+ ## 3.4.0
62
+
63
+ - Emoji 15.1
64
+
65
+ ## 3.3.2
66
+
67
+ - Update valid subdivisions to CLDR 43 (no changes)
68
+ -> there won't be any new RGI subdivision flags in Emoji
69
+
70
+ ## 3.3.1
71
+
72
+ - Update valid subdivisions to CLDR 42 (no changes)
73
+
74
+ ## 3.3.0
75
+
76
+ - Emoji 15.0
77
+
78
+ ## 3.2.0
79
+
80
+ - Update valid subdivisions to CLDR 41
81
+
82
+ ## 3.1.1
83
+
84
+ - Fix `REGEX` to be able to match complete family emoji, instead of
85
+ sub-matching partial families, thanks @matt17r
86
+
87
+ ## 3.1.0
88
+
89
+ - Update valid subdivisions to CLDR 40
90
+
91
+ ## 3.0.0
92
+
93
+ - Vastly improve memory usage, patch by @radarek
94
+ - Emoji regexes are now pre-generated and bundled with the release
95
+ - Regexes use character classes instead of unions when possible
96
+ - Most constants (e.g. regexes) now get autoloaded
97
+ - See https://github.com/janlelis/unicode-emoji/pull/9 for more details
98
+
99
+ ## 2.9.0
100
+
101
+ - Emoji 14.0
102
+
103
+ ## 2.8.0
104
+
105
+ - Update valid subdivisions to CLDR 39
106
+
107
+ ## 2.7.1
108
+
109
+ - Update valid subdivisions to CLDR 38.1
110
+
111
+ ## 2.7.0
112
+
113
+ - Update valid subdivisions to CLDR 38
114
+ - Loosen Ruby dependency to allow Ruby 3.0
115
+
116
+ ## 2.6.0
117
+
118
+ - Emoji 13.1
119
+
120
+ ## 2.5.0
121
+
122
+ - Use native Emoji regex properties when current Ruby's Emoji support is the same as our current Emoji version
123
+ - Update valid subdivisions to CLDR 37
124
+
125
+ ## 2.4.0
126
+
127
+ - Emoji 13.0
128
+
129
+ ## 2.3.1
130
+
131
+ - Fix index to actually include Emoji 12.1
132
+
133
+ ## 2.3.0
134
+
135
+ - Emoji 12.1
136
+
137
+ ## 2.2.0
138
+
139
+ - Update subdivisions to CLDR 36
140
+
141
+ ## 2.1.0
142
+
143
+ - Add `REGEX_PICTO` which matches codepoints with the **Extended_Pictographic** property
144
+ - Add `REGEX_PICTO_NO_EMOJI` which matches codepoints with the **Extended_Pictographic** property, but no **Emoji** property
145
+
146
+ ## 2.0.0
147
+
148
+ - Emoji 12.0 data (including valid subdivisions)
149
+ - Introduce new `REGEX_WELL_FORMED` to be able to match for invalid tag and region sequences
150
+ - Introduce new `*_INCLUDE_TEXT` regexes which include matching for textual presentation emoji
151
+ - Refactoring: Update Emoji matching to latest standard while keeping naming close to standard
152
+ - Issue warning when using `#list` method to retrieve outdated category
153
+ - Change matching for ZWJ sequences: Do not limit sequence to a maximum of 3 ZWJs
154
+
155
+ ## 1.1.0
156
+
157
+ - Emoji 11.0
158
+ - Do not depend on rubygems (only use zlib stdlib for unzipping)
159
+
160
+ ## 1.0.3
161
+
162
+ - Explicitly load rubygems/util, fixes regression in 1.2.1
163
+
164
+ ## 1.0.2
165
+
166
+ - Use `Gem::Util` for `gunzip`, removes deprecation warning
167
+
168
+ ## 1.0.1
169
+
170
+ - Actually set required Ruby version to 2.3 in gemspec
171
+
172
+ ## 1.0.0
173
+
174
+ - Drop support for Ruby below 2.3, use 0.9 if you need to
175
+ - Internal refactorings, no API change
176
+
177
+ ## 0.9.3
178
+
179
+ - Implement native Emoji regex matchers, but do not activate or document, yet
180
+
181
+ ## 0.9.2
182
+
183
+ - REGEX_TEXT: Do not match if the text emoji is followed by a emoji modifier
184
+
185
+ ## 0.9.1
186
+
187
+ - Include a categorized list of recommended Emoji
188
+
189
+ ## 0.9.0
190
+
191
+ - Initial release (Emoji version 5.0)
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at opensource@janlelis.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem "minitest"
6
+ gem "rake"
7
+ gem "irb" unless RUBY_ENGINE == "jruby"
@@ -0,0 +1,33 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ unicode-emoji (4.0.4)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ io-console (0.6.0)
10
+ irb (1.8.1)
11
+ rdoc
12
+ reline (>= 0.3.8)
13
+ minitest (5.20.0)
14
+ psych (5.1.0)
15
+ stringio
16
+ rake (13.0.6)
17
+ rdoc (6.5.0)
18
+ psych (>= 4.0.0)
19
+ reline (0.3.8)
20
+ io-console (~> 0.5)
21
+ stringio (3.0.8)
22
+
23
+ PLATFORMS
24
+ ruby
25
+
26
+ DEPENDENCIES
27
+ irb
28
+ minitest
29
+ rake
30
+ unicode-emoji!
31
+
32
+ BUNDLED WITH
33
+ 2.5.21
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2017-2024 Jan Lelis, https://janlelis.com
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.