brakeman 6.2.2 → 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.
- checksums.yaml +4 -4
- data/CHANGES.md +26 -0
- data/README.md +1 -1
- data/bundle/load.rb +10 -8
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/LICENSE.txt +33 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/NEWS.md +990 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/README.md +55 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/core_ext/array.rb +9 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/core_ext/string.rb +9 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/fields_converter.rb +96 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/input_record_separator.rb +18 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/parser.rb +1302 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/row.rb +757 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/table.rb +1055 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/version.rb +6 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/writer.rb +209 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv.rb +3017 -0
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/Changelog.md +4 -0
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/Gemfile +1 -0
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/list_renderer.rb +2 -2
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/menu.rb +7 -5
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/version.rb +1 -1
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline.rb +17 -12
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/config.rb +22 -26
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/history.rb +3 -3
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/ansi.rb +64 -111
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/dumb.rb +16 -2
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/windows.rb +77 -60
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io.rb +14 -0
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/base.rb +10 -4
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/emacs.rb +96 -96
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/vi_command.rb +182 -182
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/vi_insert.rb +137 -137
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_stroke.rb +26 -16
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/line_editor.rb +238 -404
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/unicode.rb +415 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/version.rb +3 -0
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline.rb +18 -18
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/NEWS.md +74 -0
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/baseparser.rb +78 -48
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/pullparser.rb +4 -0
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/rexml.rb +1 -1
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/source.rb +61 -6
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/text.rb +15 -40
- data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/History.rdoc +6 -0
- data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/lib/ruby2ruby.rb +7 -4
- data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/History.rdoc +6 -0
- data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp.rb +1 -1
- data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/History.rdoc +149 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/README.md +417 -0
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/cell.rb +9 -9
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/row.rb +18 -4
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/separator.rb +66 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/style.rb +284 -0
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/table.rb +49 -18
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/util.rb +13 -0
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/version.rb +1 -1
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table.rb +2 -2
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/terminal-table.gemspec +3 -4
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/creole.rb +2 -0
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/liquid.rb +0 -3
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/mapping.rb +3 -3
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/rdoc.rb +0 -8
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/template.rb +178 -27
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt.rb +9 -4
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/CHANGELOG.md +291 -0
- data/bundle/ruby/3.1.0/gems/{unicode-display_width-1.8.0 → unicode-display_width-3.1.4}/MIT-LICENSE.txt +1 -1
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/README.md +194 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/constants.rb +10 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/emoji_support.rb +52 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/index.rb +34 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/no_string_ext.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/reline_ext.rb +14 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/string_ext.rb +9 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width.rb +247 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/CHANGELOG.md +191 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/CODE_OF_CONDUCT.md +74 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/Gemfile +7 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/Gemfile.lock +33 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/MIT-LICENSE.txt +20 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/README.md +205 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/data/emoji.marshal.gz +0 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/data/generate_constants.rb +344 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/constants.rb +49 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_basic.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_emoji_keycap.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_mqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_mqe_uqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_picto.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_picto_no_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_possible.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_component.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_modifier.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_modifier_base.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_text_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_valid.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_valid_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_well_formed.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_well_formed_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_basic.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_emoji_keycap.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_mqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_picto.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_picto_no_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_possible.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_component.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_modifier.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_modifier_base.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_text_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_valid.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_valid_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_well_formed.rb +8 -0
- 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
- data/bundle/ruby/3.1.0/gems/{unicode-display_width-1.8.0/lib/unicode/display_width → unicode-emoji-4.0.4/lib/unicode/emoji}/index.rb +5 -3
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/lazy_constants.rb +56 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/list.rb +13 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji.rb +111 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/unicode-emoji.gemspec +22 -0
- data/lib/brakeman/app_tree.rb +29 -19
- data/lib/brakeman/checks/check_deserialize.rb +4 -1
- data/lib/brakeman/checks/check_evaluation.rb +45 -8
- data/lib/brakeman/checks/check_model_attr_accessible.rb +1 -0
- data/lib/brakeman/checks/check_weak_rsa_key.rb +1 -1
- data/lib/brakeman/file_parser.rb +2 -1
- data/lib/brakeman/options.rb +12 -5
- data/lib/brakeman/processors/alias_processor.rb +9 -4
- data/lib/brakeman/processors/lib/file_type_detector.rb +9 -7
- data/lib/brakeman/report/ignore/config.rb +0 -1
- data/lib/brakeman/report/report_sarif.rb +122 -2
- data/lib/brakeman/rescanner.rb +40 -390
- data/lib/brakeman/scanner.rb +84 -51
- data/lib/brakeman/tracker/file_cache.rb +83 -0
- data/lib/brakeman/tracker.rb +19 -2
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman.rb +19 -2
- metadata +265 -199
- data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/terminfo.rb +0 -158
- data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/unicode.rb +0 -671
- data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/version.rb +0 -3
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/History.rdoc +0 -85
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/README.rdoc +0 -247
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -14
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -79
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/erubis.rb +0 -51
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/maruku.rb +0 -10
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/wikicloth.rb +0 -12
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/CHANGELOG.md +0 -137
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/README.md +0 -124
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/constants.rb +0 -8
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/no_string_ext.rb +0 -7
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/string_ext.rb +0 -17
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb +0 -51
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/AUTHORS +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/COPYING +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/LICENSE +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/README.md +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/TODO +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/highline.gemspec +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/builtin_styles.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/color_scheme.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/compatibility.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/custom_errors.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/import.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/io_console_compatible.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/list.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/menu/item.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/paginator.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question/answer_converter.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question_asker.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/simulate.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/statement.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/string.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/string_extensions.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/style.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/template_renderer.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/io_console.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/ncurses.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/unix_stty.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/wrapper.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/BSDL +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/COPYING +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/README.md +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/face.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/composite.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/kill_ring.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/unicode/east_asian_width.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/license_of_rb-readline +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/LICENSE.txt +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/README.md +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/attlistdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/attribute.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/cdata.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/child.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/comment.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/doctype.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/document.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/dtd/attlistdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/dtd/dtd.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/dtd/elementdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/dtd/entitydecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/dtd/notationdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/element.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/encoding.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/entity.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/formatters/default.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/formatters/pretty.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/formatters/transitive.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/functions.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/instruction.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/light/node.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/namespace.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/node.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/output.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parent.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parseexception.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/lightparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/sax2parser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/streamparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/treeparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/ultralightparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/xpathparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/quickpath.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/sax2listener.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/security.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/streamlistener.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/undefinednamespaceexception.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/validation/relaxng.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/validation/validation.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/validation/validationexception.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/xmldecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/xmltokens.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/xpath.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/xpath_parser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/Manifest.txt +0 -0
- /data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/README.rdoc +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/Manifest.txt +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/README.rdoc +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/composite_sexp_processor.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/pt_testcase.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp_matcher.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/strict_sexp.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/unique.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/Gemfile +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/LICENSE.txt +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/Manifest +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/Todo.rdoc +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/import.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/table_helper.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/COPYING +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/_emacs_org.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/_handlebars.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/_jbuilder.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/_org.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/asciidoc.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/babel.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/builder.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/cli.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/coffee.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/commonmarker.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/csv.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/erb.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/erubi.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/etanni.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/haml.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/kramdown.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/livescript.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/markaby.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/nokogiri.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/pandoc.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/pipeline.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/plain.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/prawn.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/radius.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/rdiscount.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/redcarpet.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/redcloth.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/rst-pandoc.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/sass.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/slim.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/string.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/typescript.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.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,137 +0,0 @@
|
|
1
|
-
# CHANGELOG
|
2
|
-
|
3
|
-
## 1.8.0
|
4
|
-
|
5
|
-
- Unicode 14.0 (last release of 1.x)
|
6
|
-
|
7
|
-
## 1.7.0
|
8
|
-
|
9
|
-
- Unicode 13
|
10
|
-
|
11
|
-
## 1.6.1
|
12
|
-
|
13
|
-
- Fix that ambiguous and overwrite options where ignored for emoji-measuring
|
14
|
-
|
15
|
-
## 1.6.0
|
16
|
-
|
17
|
-
- Unicode 12.1
|
18
|
-
|
19
|
-
## 1.5.0
|
20
|
-
|
21
|
-
- Unicode 12
|
22
|
-
|
23
|
-
## 1.4.1
|
24
|
-
|
25
|
-
- Only bundle required lib/* and data/* files in actual rubygem, patch by @tas50
|
26
|
-
|
27
|
-
## 1.4.0
|
28
|
-
|
29
|
-
- Unicode 11
|
30
|
-
|
31
|
-
## 1.3.3
|
32
|
-
|
33
|
-
- Replace Gem::Util.gunzip with direct zlib implementation
|
34
|
-
This removes the dependency on rubygems, fixes #17
|
35
|
-
|
36
|
-
## 1.3.2
|
37
|
-
|
38
|
-
- Explicitly load rubygems/util, fixes regression in 1.3.1 (autoload issue)
|
39
|
-
|
40
|
-
## 1.3.1
|
41
|
-
|
42
|
-
- Use `Gem::Util` for `gunzip`, removes deprecation warning, patch by @Schwad
|
43
|
-
|
44
|
-
## 1.3.0
|
45
|
-
|
46
|
-
- Unicode 10
|
47
|
-
|
48
|
-
## 1.2.1
|
49
|
-
|
50
|
-
- Fix bug that `emoji: true` would fail for emoji without modifier
|
51
|
-
|
52
|
-
## 1.2.0
|
53
|
-
|
54
|
-
- Add zero-width codepoint ranges: U+2060..U+206F, U+FFF0..U+FFF8, U+E0000..U+E0FFF
|
55
|
-
- Add full-witdh codepoint ranges: U+3400..U+4DBF, U+4E00..U+9FFF, U+F900..U+FAFF, U+20000..U+2FFFD, U+30000..U+3FFFD
|
56
|
-
- Experimental emoji support using the [unicode-emoji](https://github.com/janlelis/unicode-emoji) gem
|
57
|
-
- Fix minor bug in index compression scheme
|
58
|
-
|
59
|
-
## 1.1.3
|
60
|
-
|
61
|
-
- Fix that non-UTF-8 encodings do not throw errors, patch by @windwiny
|
62
|
-
|
63
|
-
## 1.1.2
|
64
|
-
|
65
|
-
- Reduce memory consumption and increase performance, patch by @rrosenblum
|
66
|
-
|
67
|
-
## 1.1.1
|
68
|
-
|
69
|
-
- Always load index into memory, fixes #9
|
70
|
-
|
71
|
-
## 1.1.0
|
72
|
-
|
73
|
-
- Support Unicode 9.0
|
74
|
-
|
75
|
-
## 1.0.5
|
76
|
-
|
77
|
-
- Actually include new index from 1.0.4
|
78
|
-
|
79
|
-
## 1.0.4
|
80
|
-
|
81
|
-
- New index format (much smaller) and internal API changes
|
82
|
-
- Move index generation to a builder plugin for the unicoder gem
|
83
|
-
- No public API changes
|
84
|
-
|
85
|
-
## 1.0.3
|
86
|
-
|
87
|
-
- Avoid circular dependency warning
|
88
|
-
|
89
|
-
## 1.0.2
|
90
|
-
|
91
|
-
- Fix error that gemspec might be invalid under some circumstances (see gh#6)
|
92
|
-
|
93
|
-
## 1.0.1
|
94
|
-
|
95
|
-
- Inofficially allow Ruby 1.9
|
96
|
-
|
97
|
-
## 1.0.0
|
98
|
-
|
99
|
-
- Faster than 0.3.1
|
100
|
-
- Advanced determination of character width
|
101
|
-
- This includes: Treat width of most chars of general categories (Mn, Me, Cf) as 0
|
102
|
-
- This includes: Introduce list of characters with special widths
|
103
|
-
- Allow custom overrides for specific codepoints
|
104
|
-
- Set required Ruby version to 2.0
|
105
|
-
- Add NO_STRING_EXT mode to disable monkey patching
|
106
|
-
- Internal API & index format changed drastically
|
107
|
-
- Remove require 'unicode/display_size' (use 'unicode/display_width' instead)
|
108
|
-
|
109
|
-
## 0.3.1
|
110
|
-
|
111
|
-
- Faster than 0.3.0
|
112
|
-
- Deprecate usage of aliases: String#display_size and String#display_length
|
113
|
-
- Eliminate Ruby warnings (@amatsuda)
|
114
|
-
|
115
|
-
## 0.3.0
|
116
|
-
|
117
|
-
- Update EastAsianWidth from 7.0 to 8.0
|
118
|
-
- Add rake task to update EastAsianWidth.txt
|
119
|
-
- Move code to generate index from library to Rakefile
|
120
|
-
- Update project's meta files
|
121
|
-
- Deprecate requiring 'unicode-display_size'
|
122
|
-
|
123
|
-
## 0.2.0
|
124
|
-
|
125
|
-
- Update EastAsianWidth from 6.0 to 7.0
|
126
|
-
- Don't build index table automatically when not available
|
127
|
-
- Don't include EastAsianWidth.txt in gem (only index)
|
128
|
-
|
129
|
-
|
130
|
-
## 0.1.0
|
131
|
-
|
132
|
-
- Fix github issue #1
|
133
|
-
|
134
|
-
|
135
|
-
## 0.1.0
|
136
|
-
|
137
|
-
- Initial release
|