brakeman 6.2.2 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +17 -0
  3. data/bundle/load.rb +7 -6
  4. data/bundle/ruby/3.1.0/gems/csv-3.3.2/LICENSE.txt +33 -0
  5. data/bundle/ruby/3.1.0/gems/csv-3.3.2/NEWS.md +965 -0
  6. data/bundle/ruby/3.1.0/gems/csv-3.3.2/README.md +55 -0
  7. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/core_ext/array.rb +9 -0
  8. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/core_ext/string.rb +9 -0
  9. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/fields_converter.rb +96 -0
  10. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/input_record_separator.rb +18 -0
  11. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/parser.rb +1292 -0
  12. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/row.rb +757 -0
  13. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/table.rb +1055 -0
  14. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/version.rb +6 -0
  15. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/writer.rb +209 -0
  16. data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv.rb +3017 -0
  17. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/config.rb +22 -26
  18. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/history.rb +3 -3
  19. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/ansi.rb +64 -111
  20. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/dumb.rb +16 -2
  21. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/windows.rb +77 -60
  22. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io.rb +14 -0
  23. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/base.rb +10 -4
  24. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/emacs.rb +96 -96
  25. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/vi_command.rb +182 -182
  26. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/vi_insert.rb +137 -137
  27. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_stroke.rb +26 -16
  28. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/line_editor.rb +238 -404
  29. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/unicode.rb +415 -0
  30. data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/version.rb +3 -0
  31. data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline.rb +18 -18
  32. data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/NEWS.md +50 -0
  33. data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/baseparser.rb +54 -45
  34. data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/pullparser.rb +4 -0
  35. data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/rexml.rb +1 -1
  36. data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/source.rb +45 -4
  37. data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/text.rb +15 -40
  38. data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/History.rdoc +6 -0
  39. data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp.rb +1 -1
  40. data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp_processor.rb +1 -1
  41. data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/History.rdoc +142 -0
  42. data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/README.md +417 -0
  43. data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/cell.rb +8 -8
  44. data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/row.rb +18 -4
  45. data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/separator.rb +66 -0
  46. data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/style.rb +284 -0
  47. data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/table.rb +47 -18
  48. data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/util.rb +13 -0
  49. data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/version.rb +1 -1
  50. data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table.rb +2 -2
  51. data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/terminal-table.gemspec +3 -3
  52. data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/creole.rb +2 -0
  53. data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/liquid.rb +0 -3
  54. data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/mapping.rb +3 -3
  55. data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/rdoc.rb +0 -8
  56. data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/template.rb +27 -3
  57. data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt.rb +1 -4
  58. data/bundle/ruby/3.1.0/gems/{unicode-display_width-1.8.0 → unicode-display_width-2.6.0}/CHANGELOG.md +65 -2
  59. data/bundle/ruby/3.1.0/gems/{unicode-display_width-1.8.0 → unicode-display_width-2.6.0}/MIT-LICENSE.txt +1 -1
  60. data/bundle/ruby/3.1.0/gems/{unicode-display_width-1.8.0 → unicode-display_width-2.6.0}/README.md +67 -20
  61. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/data/display_width.marshal.gz +0 -0
  62. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/constants.rb +10 -0
  63. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/index.rb +34 -0
  64. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/no_string_ext.rb +8 -0
  65. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/string_ext.rb +9 -0
  66. data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width.rb +123 -0
  67. data/lib/brakeman/app_tree.rb +23 -18
  68. data/lib/brakeman/checks/check_deserialize.rb +4 -1
  69. data/lib/brakeman/checks/check_evaluation.rb +20 -2
  70. data/lib/brakeman/checks/check_model_attr_accessible.rb +1 -0
  71. data/lib/brakeman/file_parser.rb +2 -1
  72. data/lib/brakeman/options.rb +8 -5
  73. data/lib/brakeman/processors/alias_processor.rb +6 -2
  74. data/lib/brakeman/processors/lib/file_type_detector.rb +9 -7
  75. data/lib/brakeman/report/ignore/config.rb +0 -1
  76. data/lib/brakeman/report/report_sarif.rb +122 -2
  77. data/lib/brakeman/rescanner.rb +40 -390
  78. data/lib/brakeman/scanner.rb +62 -38
  79. data/lib/brakeman/tracker/file_cache.rb +83 -0
  80. data/lib/brakeman/tracker.rb +19 -2
  81. data/lib/brakeman/version.rb +1 -1
  82. data/lib/brakeman.rb +12 -2
  83. metadata +170 -160
  84. data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/terminfo.rb +0 -158
  85. data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/unicode.rb +0 -671
  86. data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/version.rb +0 -3
  87. data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/History.rdoc +0 -85
  88. data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/README.rdoc +0 -247
  89. data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -14
  90. data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -79
  91. data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/erubis.rb +0 -51
  92. data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/maruku.rb +0 -10
  93. data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/wikicloth.rb +0 -12
  94. data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
  95. data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/constants.rb +0 -8
  96. data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/index.rb +0 -12
  97. data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/no_string_ext.rb +0 -7
  98. data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/string_ext.rb +0 -17
  99. data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb +0 -51
  100. /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/BSDL +0 -0
  101. /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/COPYING +0 -0
  102. /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/README.md +0 -0
  103. /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/face.rb +0 -0
  104. /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/composite.rb +0 -0
  105. /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor.rb +0 -0
  106. /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/kill_ring.rb +0 -0
  107. /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/unicode/east_asian_width.rb +0 -0
  108. /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/license_of_rb-readline +0 -0
  109. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/LICENSE.txt +0 -0
  110. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/README.md +0 -0
  111. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/attlistdecl.rb +0 -0
  112. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/attribute.rb +0 -0
  113. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/cdata.rb +0 -0
  114. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/child.rb +0 -0
  115. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/comment.rb +0 -0
  116. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/doctype.rb +0 -0
  117. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/document.rb +0 -0
  118. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/dtd/attlistdecl.rb +0 -0
  119. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/dtd/dtd.rb +0 -0
  120. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/dtd/elementdecl.rb +0 -0
  121. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/dtd/entitydecl.rb +0 -0
  122. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/dtd/notationdecl.rb +0 -0
  123. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/element.rb +0 -0
  124. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/encoding.rb +0 -0
  125. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/entity.rb +0 -0
  126. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/formatters/default.rb +0 -0
  127. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/formatters/pretty.rb +0 -0
  128. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/formatters/transitive.rb +0 -0
  129. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/functions.rb +0 -0
  130. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/instruction.rb +0 -0
  131. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/light/node.rb +0 -0
  132. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/namespace.rb +0 -0
  133. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/node.rb +0 -0
  134. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/output.rb +0 -0
  135. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parent.rb +0 -0
  136. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parseexception.rb +0 -0
  137. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/lightparser.rb +0 -0
  138. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/sax2parser.rb +0 -0
  139. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/streamparser.rb +0 -0
  140. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/treeparser.rb +0 -0
  141. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/ultralightparser.rb +0 -0
  142. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/parsers/xpathparser.rb +0 -0
  143. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/quickpath.rb +0 -0
  144. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/sax2listener.rb +0 -0
  145. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/security.rb +0 -0
  146. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/streamlistener.rb +0 -0
  147. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/undefinednamespaceexception.rb +0 -0
  148. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/validation/relaxng.rb +0 -0
  149. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/validation/validation.rb +0 -0
  150. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/validation/validationexception.rb +0 -0
  151. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/xmldecl.rb +0 -0
  152. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/xmltokens.rb +0 -0
  153. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/xpath.rb +0 -0
  154. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml/xpath_parser.rb +0 -0
  155. /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.0}/lib/rexml.rb +0 -0
  156. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/Manifest.txt +0 -0
  157. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/README.rdoc +0 -0
  158. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/composite_sexp_processor.rb +0 -0
  159. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/pt_testcase.rb +0 -0
  160. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp_matcher.rb +0 -0
  161. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/strict_sexp.rb +0 -0
  162. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/unique.rb +0 -0
  163. /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/Gemfile +0 -0
  164. /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/LICENSE.txt +0 -0
  165. /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/Manifest +0 -0
  166. /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/Todo.rdoc +0 -0
  167. /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/import.rb +0 -0
  168. /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-3.0.2}/lib/terminal-table/table_helper.rb +0 -0
  169. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/COPYING +0 -0
  170. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/_emacs_org.rb +0 -0
  171. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/_handlebars.rb +0 -0
  172. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/_jbuilder.rb +0 -0
  173. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/_org.rb +0 -0
  174. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/asciidoc.rb +0 -0
  175. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/babel.rb +0 -0
  176. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/builder.rb +0 -0
  177. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/cli.rb +0 -0
  178. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/coffee.rb +0 -0
  179. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/commonmarker.rb +0 -0
  180. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/csv.rb +0 -0
  181. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/erb.rb +0 -0
  182. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/erubi.rb +0 -0
  183. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/etanni.rb +0 -0
  184. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/haml.rb +0 -0
  185. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/kramdown.rb +0 -0
  186. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/livescript.rb +0 -0
  187. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/markaby.rb +0 -0
  188. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/nokogiri.rb +0 -0
  189. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/pandoc.rb +0 -0
  190. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/pipeline.rb +0 -0
  191. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/plain.rb +0 -0
  192. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/prawn.rb +0 -0
  193. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/radius.rb +0 -0
  194. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/rdiscount.rb +0 -0
  195. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/redcarpet.rb +0 -0
  196. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/redcloth.rb +0 -0
  197. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/rst-pandoc.rb +0 -0
  198. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/sass.rb +0 -0
  199. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/slim.rb +0 -0
  200. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/string.rb +0 -0
  201. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/typescript.rb +0 -0
  202. /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.5.0}/lib/tilt/yajl.rb +0 -0
@@ -1,85 +0,0 @@
1
- 1.8.0 / 2017-05-16
2
- ==================
3
-
4
- * Top and bottom borders can be disabled (@kubakrzempek, #83)
5
- * `unicode-display-width` dependency relaxes (@mvz, #88)
6
-
7
- * Readme and docs fixes (@loualrid, #82 and @leoarnold, #86)
8
- * Fixed some test-related warnings (@juanitofatas, #81 and @mvz, #89)
9
-
10
- 1.7.3 / 2016-09-21
11
- ==================
12
-
13
- * Fixed compatibility issues for Ruby 1.9, 2.0, 2.1. (@vivekbisen, #80)
14
-
15
- 1.7.2 / 2016-09-09
16
- ==================
17
-
18
- * Fix packing table to a minimal width (@vizv, #76)
19
-
20
- 1.7.1 / 2016-08-29
21
- ==================
22
-
23
- * Update `unicode-display_width` to fix behavior with signal traps [#78, @jrmhaig]
24
-
25
- 1.7.0 / 2016-08-29
26
- ==================
27
-
28
- All props to @vizv for this release!
29
-
30
- * Fixed some spec failures
31
- * Added support for full-width characters (East Asian alphabets, etc)
32
-
33
- 1.6.0 / 2016-06-06
34
- ==================
35
-
36
- * Added table styles - margin_left, all_separators.
37
-
38
- 1.4.3 / 2011-10-13
39
- ==================
40
-
41
- * Optimize for faster table output.
42
-
43
- 1.4.2 / 2010-01-14
44
- ==================
45
-
46
- * Fixed some bugs with colspan
47
-
48
- === 1.4.1 / 2009-12-18
49
-
50
- * Fix column alignment with separators.
51
-
52
- === 1.4.0 / 2009-12-18
53
-
54
- * Can now add :seperator arbitrarily in a table [thanks splattael]
55
- * Fix common typo: seperator -> separator [thanks splattael]
56
-
57
- === 1.3.0 / 2009-10-16
58
-
59
- * Major refactoring (functionality remains the same)
60
-
61
- === 1.2.0 / 2009-08-06
62
-
63
- * Added colspan support to table
64
-
65
- === 1.1.0 / 2009-08-06
66
-
67
- * Added colspan support to table
68
-
69
- === 1.1.0 / 2009-07-13
70
-
71
- * Added Table#==
72
-
73
- === 1.0.5 / 2009-03-14
74
-
75
- * Allowing nil to be passed to table for headings
76
- * Revised doc to show that rows can be splatted now
77
- * Misc refactoring
78
-
79
- === 1.0.3 / 2009-01-15
80
-
81
- * Moved yield or eval to Terminal::Table initialize where it belongs
82
-
83
- === 1.0.0 / 2009-01-13
84
-
85
- * Initial release
@@ -1,247 +0,0 @@
1
- = Terminal Table
2
-
3
- == Description
4
-
5
- Terminal Table is a fast and simple, yet feature rich ASCII table generator written in Ruby.
6
-
7
- == Installation
8
-
9
- $ gem install terminal-table
10
-
11
- == Usage
12
-
13
- === Basics
14
-
15
- To use Terminal Table:
16
-
17
- require 'terminal-table'
18
-
19
- To generate a table, provide an array of arrays (which are interpreted as rows):
20
-
21
- rows = []
22
- rows << ['One', 1]
23
- rows << ['Two', 2]
24
- rows << ['Three', 3]
25
- table = Terminal::Table.new :rows => rows
26
-
27
- # > puts table
28
- #
29
- # +-------+---+
30
- # | One | 1 |
31
- # | Two | 2 |
32
- # | Three | 3 |
33
- # +-------+---+
34
-
35
-
36
- The constructor can also be given a block which is either yielded the Table object or instance evaluated:
37
-
38
- table = Terminal::Table.new do |t|
39
- t.rows = rows
40
- end
41
-
42
- table = Terminal::Table.new do
43
- self.rows = rows
44
- end
45
-
46
- Adding rows one by one:
47
-
48
- table = Terminal::Table.new do |t|
49
- t << ['One', 1]
50
- t.add_row ['Two', 2]
51
- end
52
-
53
- To add separators between rows:
54
-
55
- table = Terminal::Table.new do |t|
56
- t << ['One', 1]
57
- t << :separator
58
- t.add_row ['Two', 2]
59
- t.add_separator
60
- t.add_row ['Three', 3]
61
- end
62
-
63
- # > puts table
64
- #
65
- # +-------+---+
66
- # | One | 1 |
67
- # +-------+---+
68
- # | Two | 2 |
69
- # +-------+---+
70
- # | Three | 3 |
71
- # +-------+---+
72
-
73
- Cells can handle multiline content:
74
-
75
- table = Terminal::Table.new do |t|
76
- t << ['One', 1]
77
- t << :separator
78
- t.add_row ["Two\nDouble", 2]
79
- t.add_separator
80
- t.add_row ['Three', 3]
81
- end
82
-
83
- # > puts table
84
- #
85
- # +--------+---+
86
- # | One | 1 |
87
- # +--------+---+
88
- # | Two | 2 |
89
- # | Double | |
90
- # +--------+---+
91
- # | Three | 3 |
92
- # +--------+---+
93
-
94
- === Head
95
-
96
- To add a head to the table:
97
-
98
- table = Terminal::Table.new :headings => ['Word', 'Number'], :rows => rows
99
-
100
- # > puts table
101
- #
102
- # +-------+--------+
103
- # | Word | Number |
104
- # +-------+--------+
105
- # | One | 1 |
106
- # | Two | 2 |
107
- # | Three | 3 |
108
- # +-------+--------+
109
-
110
- === Title
111
-
112
- To add a title to the table:
113
-
114
- table = Terminal::Table.new :title => "Cheatsheet", :headings => ['Word', 'Number'], :rows => rows
115
-
116
- # > puts table
117
- #
118
- # +------------+--------+
119
- # | Cheatsheet |
120
- # +------------+--------+
121
- # | Word | Number |
122
- # +------------+--------+
123
- # | One | 1 |
124
- # | Two | 2 |
125
- # | Three | 3 |
126
- # +------------+--------+
127
-
128
- === Alignment
129
-
130
- To align the second column to the right:
131
-
132
- table.align_column(1, :right)
133
-
134
- # > puts table
135
- #
136
- # +-------+--------+
137
- # | Word | Number |
138
- # +-------+--------+
139
- # | One | 1 |
140
- # | Two | 2 |
141
- # | Three | 3 |
142
- # +-------+--------+
143
-
144
- To align an individual cell, you specify the cell value in a hash along the alignment:
145
-
146
- table << ["Four", {:value => 4.0, :alignment => :center}]
147
-
148
- # > puts table
149
- #
150
- # +-------+--------+
151
- # | Word | Number |
152
- # +-------+--------+
153
- # | One | 1 |
154
- # | Two | 2 |
155
- # | Three | 3 |
156
- # | Four | 4.0 |
157
- # +-------+--------+
158
-
159
- === Style
160
-
161
- To specify style options:
162
-
163
- table = Terminal::Table.new :headings => ['Word', 'Number'], :rows => rows, :style => {:width => 80}
164
-
165
- # > puts table
166
- #
167
- # +--------------------------------------+---------------------------------------+
168
- # | Word | Number |
169
- # +--------------------------------------+---------------------------------------+
170
- # | One | 1 |
171
- # | Two | 2 |
172
- # | Three | 3 |
173
- # +--------------------------------------+---------------------------------------+
174
-
175
- And change styles on the fly:
176
-
177
- table.style = {:width => 40, :padding_left => 3, :border_x => "=", :border_i => "x"}
178
-
179
- # > puts table
180
- #
181
- # x====================x=================x
182
- # | Cheatsheet |
183
- # x====================x=================x
184
- # | Word | Number |
185
- # x====================x=================x
186
- # | One | 1 |
187
- # | Two | 2 |
188
- # | Three | 3 |
189
- # x====================x=================x
190
-
191
- You can also use styles to add a separator after every row:
192
-
193
- table = Terminal::Table.new do |t|
194
- t.add_row [1, 'One']
195
- t.add_row [2, 'Two']
196
- t.add_row [3, 'Three']
197
- t.style = {:all_separators => true}
198
- end
199
-
200
- # > puts table
201
- #
202
- # +---+-------+
203
- # | 1 | One |
204
- # +---+-------+
205
- # | 2 | Two |
206
- # +---+-------+
207
- # | 3 | Three |
208
- # +---+-------+
209
-
210
- You can also use styles to disable top and bottom borders of the table
211
-
212
- table = Terminal::Table.new do |t|
213
- t.headings = ['id', 'name']
214
- t.rows = [[1, 'One'], [2, 'Two'], [3, 'Three']]
215
- t.style = { :border_top => false, :border_bottom => false }
216
- end
217
-
218
- # > puts table
219
- # | id | name |
220
- # +----+-------+
221
- # | 1 | One |
222
- # | 2 | Two |
223
- # | 3 | Three |
224
-
225
- To change the default style options:
226
-
227
- Terminal::Table::Style.defaults = {:width => 80}
228
-
229
- All Table objects created afterwards will inherit these defaults.
230
-
231
- === Constructor options and setter methods
232
-
233
- Valid options for the constructor are :rows, :headings, :style and :title - and all options can also be set on the created table object by their setter method:
234
-
235
- table = Terminal::Table.new
236
- table.title = "Cheatsheet"
237
- table.headings = ['Word', 'Number']
238
- table.rows = rows
239
- table.style = {:width => 40}
240
-
241
- == More examples
242
-
243
- For more examples, please see the examples/examples.rb file included in the source distribution.
244
-
245
- == Author
246
-
247
- TJ Holowaychuk <tj@vision-media.ca>
@@ -1,14 +0,0 @@
1
- module Terminal
2
- class Table
3
- class Separator < Row
4
-
5
- def render
6
- arr_x = (0...@table.number_of_columns).to_a.map do |i|
7
- @table.style.border_x * (@table.column_width(i) + @table.cell_padding)
8
- end
9
- border_i = @table.style.border_i
10
- border_i + arr_x.join(border_i) + border_i
11
- end
12
- end
13
- end
14
- end
@@ -1,79 +0,0 @@
1
- module Terminal
2
- class Table
3
- # A Style object holds all the formatting information for a Table object
4
- #
5
- # To create a table with a certain style, use either the constructor
6
- # option <tt>:style</tt>, the Table#style object or the Table#style= method
7
- #
8
- # All these examples have the same effect:
9
- #
10
- # # by constructor
11
- # @table = Table.new(:style => {:padding_left => 2, :width => 40})
12
- #
13
- # # by object
14
- # @table.style.padding_left = 2
15
- # @table.style.width = 40
16
- #
17
- # # by method
18
- # @table.style = {:padding_left => 2, :width => 40}
19
- #
20
- # To set a default style for all tables created afterwards use Style.defaults=
21
- #
22
- # Terminal::Table::Style.defaults = {:width => 80}
23
- #
24
- class Style
25
- @@defaults = {
26
- :border_x => "-", :border_y => "|", :border_i => "+",
27
- :border_top => true, :border_bottom => true,
28
- :padding_left => 1, :padding_right => 1,
29
- :margin_left => '',
30
- :width => nil, :alignment => nil,
31
- :all_separators => false
32
- }
33
-
34
- attr_accessor :border_x
35
- attr_accessor :border_y
36
- attr_accessor :border_i
37
- attr_accessor :border_top
38
- attr_accessor :border_bottom
39
-
40
- attr_accessor :padding_left
41
- attr_accessor :padding_right
42
-
43
- attr_accessor :margin_left
44
-
45
- attr_accessor :width
46
- attr_accessor :alignment
47
-
48
- attr_accessor :all_separators
49
-
50
-
51
- def initialize options = {}
52
- apply self.class.defaults.merge(options)
53
- end
54
-
55
- def apply options
56
- options.each { |m, v| __send__ "#{m}=", v }
57
- end
58
-
59
- class << self
60
- def defaults
61
- @@defaults
62
- end
63
-
64
- def defaults= options
65
- @@defaults = defaults.merge(options)
66
- end
67
- end
68
-
69
- def on_change attr
70
- method_name = :"#{attr}="
71
- old_method = method method_name
72
- define_singleton_method(method_name) do |value|
73
- old_method.call value
74
- yield attr.to_sym, value
75
- end
76
- end
77
- end
78
- end
79
- end
@@ -1,51 +0,0 @@
1
- # frozen_string_literal: true
2
- require_relative 'erb'
3
- require 'erubis'
4
-
5
- warn 'tilt/erubis is deprecated, as erubis requires modifying string literals', uplevel: 1
6
-
7
- module Tilt
8
- # Erubis template implementation. See:
9
- # http://www.kuwata-lab.com/erubis/
10
- #
11
- # ErubisTemplate supports the following additional options, which are not
12
- # passed down to the Erubis engine:
13
- #
14
- # :engine_class allows you to specify a custom engine class to use
15
- # instead of the default (which is ::Erubis::Eruby).
16
- #
17
- # :escape_html when true, ::Erubis::EscapedEruby will be used as
18
- # the engine class instead of the default. All content
19
- # within <%= %> blocks will be automatically html escaped.
20
- class ErubisTemplate < ERBTemplate
21
- def prepare
22
- @freeze_string_literals = !!@options.delete(:freeze)
23
- @outvar = @options.delete(:outvar) || '_erbout'
24
- @options[:preamble] = false
25
- @options[:postamble] = false
26
- @options[:bufvar] = @outvar
27
- engine_class = @options.delete(:engine_class)
28
- engine_class = ::Erubis::EscapedEruby if @options.delete(:escape_html)
29
- @engine = (engine_class || ::Erubis::Eruby).new(@data, @options)
30
- end
31
-
32
- def precompiled_preamble(locals)
33
- [super, "#{@outvar} = _buf = String.new"].join("\n")
34
- end
35
-
36
- def precompiled_postamble(locals)
37
- [@outvar, super].join("\n")
38
- end
39
-
40
- # Erubis doesn't have ERB's line-off-by-one under 1.9 problem.
41
- # Override and adjust back.
42
- def precompiled(locals)
43
- source, offset = super
44
- [source, offset - 1]
45
- end
46
-
47
- def freeze_string_literals?
48
- @freeze_string_literals
49
- end
50
- end
51
- end
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
- require_relative 'template'
3
- require 'maruku'
4
-
5
- warn 'tilt/maruku is deprecated, as maruku requires modifying string literals', uplevel: 1
6
-
7
- # Maruku markdown implementation. See: https://github.com/bhollis/maruku
8
- Tilt::MarukuTemplate = Tilt::StaticTemplate.subclass do
9
- Maruku.new(@data, @options).to_html
10
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
- require_relative 'template'
3
- require 'wikicloth'
4
-
5
- warn 'tilt/wikicloth is deprecated, as wikicloth requires modifying string literals', uplevel: 1
6
-
7
- # WikiCloth implementation. See: https://github.com/nricciar/wikicloth
8
- Tilt::WikiClothTemplate = Tilt::StaticTemplate.subclass do
9
- parser = @options.delete(:parser) || WikiCloth::Parser
10
- @options[:data] = @data
11
- parser.new(@options).to_html
12
- end
@@ -1,8 +0,0 @@
1
- module Unicode
2
- module DisplayWidth
3
- VERSION = '1.8.0'
4
- UNICODE_VERSION = "14.0.0"
5
- DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + '/../../../data/').freeze
6
- INDEX_FILENAME = (DATA_DIRECTORY + '/display_width.marshal.gz').freeze
7
- end
8
- end
@@ -1,12 +0,0 @@
1
- require 'zlib'
2
- require_relative 'constants'
3
-
4
- module Unicode
5
- module DisplayWidth
6
- File.open(INDEX_FILENAME, "rb") do |file|
7
- serialized_data = Zlib::GzipReader.new(file).read
8
- serialized_data.force_encoding Encoding::BINARY
9
- INDEX = Marshal.load(serialized_data)
10
- end
11
- end
12
- end
@@ -1,7 +0,0 @@
1
- module Unicode
2
- module DisplayWidth
3
- NO_STRING_EXT = true
4
- end
5
- end
6
-
7
- require_relative '../display_width'
@@ -1,17 +0,0 @@
1
- require_relative '../display_width' unless defined? Unicode::DisplayWidth
2
-
3
- class String
4
- def display_width(ambiguous = 1, overwrite = {}, options = {})
5
- Unicode::DisplayWidth.of(self, ambiguous, overwrite, options)
6
- end
7
-
8
- def display_size(*args)
9
- warn "Deprecation warning: Please use `String#display_width` instead of `String#display_size`"
10
- display_width(*args)
11
- end
12
-
13
- def display_length(*args)
14
- warn "Deprecation warning: Please use `String#display_width` instead of `String#display_length`"
15
- display_width(*args)
16
- end
17
- end
@@ -1,51 +0,0 @@
1
- require_relative 'display_width/constants'
2
- require_relative 'display_width/index'
3
-
4
- module Unicode
5
- module DisplayWidth
6
- DEPTHS = [0x10000, 0x1000, 0x100, 0x10].freeze
7
-
8
- def self.of(string, ambiguous = 1, overwrite = {}, options = {})
9
- res = string.codepoints.inject(0){ |total_width, codepoint|
10
- index_or_value = INDEX
11
- codepoint_depth_offset = codepoint
12
- DEPTHS.each{ |depth|
13
- index_or_value = index_or_value[codepoint_depth_offset / depth]
14
- codepoint_depth_offset = codepoint_depth_offset % depth
15
- break unless index_or_value.is_a? Array
16
- }
17
- width = index_or_value.is_a?(Array) ? index_or_value[codepoint_depth_offset] : index_or_value
18
- width = ambiguous if width == :A
19
- total_width + (overwrite[codepoint] || width || 1)
20
- }
21
-
22
- res -= emoji_extra_width_of(string, ambiguous, overwrite) if options[:emoji]
23
- res < 0 ? 0 : res
24
- end
25
-
26
- def self.emoji_extra_width_of(string, ambiguous = 1, overwrite = {}, _ = {})
27
- require "unicode/emoji"
28
-
29
- extra_width = 0
30
- modifier_regex = /[#{ Unicode::Emoji::EMOJI_MODIFIERS.pack("U*") }]/
31
- zwj_regex = /(?<=#{ [Unicode::Emoji::ZWJ].pack("U") })./
32
-
33
- string.scan(Unicode::Emoji::REGEX){ |emoji|
34
- extra_width += 2 * emoji.scan(modifier_regex).size
35
-
36
- emoji.scan(zwj_regex){ |zwj_succ|
37
- extra_width += self.of(zwj_succ, ambiguous, overwrite)
38
- }
39
- }
40
-
41
- extra_width
42
- end
43
- end
44
- end
45
-
46
- # Allows you to opt-out of the default string extension. Will eventually be removed,
47
- # so you must opt-in for the core extension by requiring 'display_width/string_ext'
48
- unless defined?(Unicode::DisplayWidth::NO_STRING_EXT) && Unicode::DisplayWidth::NO_STRING_EXT
49
- require_relative 'display_width/string_ext'
50
- end
51
-