formatador-1.1.0/0000755000004100000410000000000014175331140013676 5ustar www-datawww-dataformatador-1.1.0/README.md0000644000004100000410000001041014175331140015151 0ustar www-datawww-data# formatador STDOUT text formatting [![Build Status](https://github.com/geemus/formatador/actions/workflows/ruby.yml/badge.svg)](https://github.com/geemus/formatador/actions/workflows/ruby.yml) ## Quick and dirty You can call class methods to print out single lines like this: ```ruby Formatador.display_line('Hello World') ``` You use tags, similar to html, to set formatting options: ```ruby Formatador.display_line('[green]Hello World[/]') ``` `[/]` resets everything to normal, colors are supported and `[_color_]` sets the background color. ## Standard options * format - and adds color codes if STDOUT.tty? is true * display - calls format on the input and prints it * display_line - calls display, but adds on a newline (\n) * redisplay - Displays text, prepended with \r which will overwrite the last existing line ## Extensions * display_table: takes an array of hashes. Each hash is a row, with the keys being the headers and values being the data. An optional second argument can specify which headers/columns to include and in what order they should appear. * display_compact_table: Same as display_table, execpt that split lines are not drawn by default in the body of the table. If you need a split line, put a :split constant in the body array. * redisplay_progressbar: takes the current and total values as its first two arguments and redisplays a progressbar (until current = total and then it display_lines). An optional third argument represents the start time and will add an elapsed time counter. ### Progress Bar examples ```ruby total = 1000 progress = Formatador::ProgressBar.new(total) 1000.times do progress.increment end #=> 978/1000 |************************************************* | # Change the color of the bar total = 1000 progress = Formatador::ProgressBar.new(total, :color => "light_blue") 1000.times do progress.increment end # Change the color of a completed progress bar total = 1000 progress = Formatador::ProgressBar.new(total) { |b| b.opts[:color] = "green" } 1000.times do progress.increment end ``` ### Table examples ```ruby table_data = [ { :name => "Joe", :food => "Burger" }, { :name => "Bill", :food => "French fries" } ] Formatador.display_table(table_data) #=> +------+--------------+ # | name | food | # +------+--------------+ # | Joe | Burger | # +------+--------------+ # | Bill | French fries | # +------+--------------+ table_data = [ { :name => "Joe", :meal => { :main_dish => "Burger", :drink => "water" } }, { :name => "Bill", :meal => { :main_dish => "Chicken", :drink => "soda" } } ] Formatador.display_table(table_data, [:name, :"meal.drink"]) #=> +------+------------+ # | name | meal.drink | # +------+------------+ # | Joe | water | # +------+------------+ # | Bill | soda | # +------+------------+ ``` ## Indentation By initializing a formatador object you can keep track of indentation: ```ruby formatador = Formatador.new formatador.display_line('one level of indentation') formatador.indent { formatador.display_line('two levels of indentation') } formatador.display_line('one level of indentation') ``` ## Copyright (The MIT License) Copyright (c) 2022 [geemus (Wesley Beary)](http://github.com/geemus) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. formatador-1.1.0/tests/0000755000004100000410000000000014175331140015040 5ustar www-datawww-dataformatador-1.1.0/tests/table_tests.rb0000644000004100000410000000715114175331140017702 0ustar www-datawww-data# coding: utf-8 Shindo.tests("Formatador: tables") do output = <<-OUTPUT +---+ | [bold]a[/] | +---+ | 1 | +---+ | 2 | +---+ OUTPUT output = Formatador.parse(output) tests("#display_table([{:a => 1}, {:a => 2}])").returns(output) do capture_stdout do Formatador.display_table([{:a => 1}, {:a => 2}]) end end output = <<-OUTPUT +--------+ | [bold]header[/] | +--------+ +--------+ OUTPUT output = Formatador.parse(output) tests("#display_table([], [:header])").returns(output) do capture_stdout do Formatador.display_table([], [:header]) end end output = <<-OUTPUT +--------+ | [bold]header[/] | +--------+ | | +--------+ OUTPUT output = Formatador.parse(output) tests("#display_table([{:a => 1}], [:header])").returns(output) do capture_stdout do Formatador.display_table([{:a => 1}], [:header]) end end output = <<-OUTPUT +---+------------+ | [bold]a[/] | [bold]nested.key[/] | +---+------------+ | 1 | value | +---+------------+ OUTPUT output = Formatador.parse(output) tests("#display_table([{:a => 1, :nested => {:key => 'value'}}], [:header, :'nested.key'])").returns(output) do capture_stdout do Formatador.display_table([{:a => 1, :nested => {:key => 'value'}}], [:a, :'nested.key']) end end output = <<-OUTPUT +---+-----------------+ | [bold]a[/] | [bold]nested[/] | +---+-----------------+ | 1 | {:key=>"value"} | +---+-----------------+ OUTPUT output = Formatador.parse(output) tests("#display_table([{:a => 1, :nested => {:key => 'value'}}])").returns(output) do capture_stdout do Formatador.display_table([{:a => 1, :nested => {:key => 'value'}}]) end end output = <<-OUTPUT +---+--------------+ | [bold]a[/] | [bold]just.pointed[/] | +---+--------------+ | 1 | value | +---+--------------+ OUTPUT output = Formatador.parse(output) tests("#display_table([{:a => 1, 'just.pointed' => :value}])").returns(output) do capture_stdout do Formatador.display_table([{:a => 1, 'just.pointed' => :value}]) end end output = <<-OUTPUT +-------------------------+----------------+ | [bold]right-justify a numeric[/] | [bold]standard value[/] | +-------------------------+----------------+ | 12345 | value | +-------------------------+----------------+ OUTPUT output = Formatador.parse(output) tests("#display_table([{'right-justify a numeric' => 12345, 'standard value' => 'standard value'}], numeric_rjust: true)").returns(output) do capture_stdout do Formatador.display_table([{'right-justify a numeric' => 12345, 'standard value' => 'value'}], numeric_rjust: true) end end output = <<-OUTPUT +--------+------------+ | [bold]header[/] | [bold]nested.key[/] | +--------+------------+ | 12345 | value | +--------+------------+ OUTPUT output = Formatador.parse(output) tests("#display_table([{:header => 12345, :nested => {:key => value}}], [:header, :'nested.key'], numeric_rjust: true)").returns(output) do capture_stdout do Formatador.display_table([{:header => 12345, :nested => {:key => 'value'}}], [:header, :'nested.key'], numeric_rjust: true) end end output = <<-OUTPUT +------+ | [bold]a[/] | +------+ | 1 | +------+ | 震度 | +------+ OUTPUT output = Formatador.parse(output) tests("#display_table([{:a => 1}, {:a => '震度'}])").returns(output) do capture_stdout do Formatador.display_table([{:a => 1}, {:a => "震度"}]) end end end formatador-1.1.0/tests/basic_tests.rb0000644000004100000410000000115014175331140017665 0ustar www-datawww-dataShindo.tests("Formatador: basics") do tests("#display_line(Formatador)").returns(" Formatador\n") do capture_stdout do Formatador.display_line('Formatador') end end output = <<-OUTPUT one two OUTPUT output = Formatador.parse(output) tests("#display_lines(['one', 'two']").returns(output) do capture_stdout do Formatador.display_lines(['one', 'two']) end end tests("#indent { display_line('Formatador') }").returns(" Formatador\n") do capture_stdout do Formatador.indent do Formatador.display_line('Formatador') end end end end formatador-1.1.0/tests/tests_helper.rb0000644000004100000410000000064514175331140020073 0ustar www-datawww-data$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'formatador' require 'rubygems' require 'shindo' require 'stringio' class IO def tty? true end end class StringIO def tty? true end end def capture_stdout old_stdout = $stdout new_stdout = StringIO.new $stdout = new_stdout yield $stdout = old_stdout new_stdout.string end formatador-1.1.0/LICENSE.md0000644000004100000410000000220314175331140015277 0ustar www-datawww-dataThe MIT License (MIT) Copyright (c) 2009-2022 [CONTRIBUTORS.md](https://github.com/geemus/formatador/blob/master/CONTRIBUTORS.md) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. formatador-1.1.0/CONTRIBUTORS.md0000644000004100000410000000113214175331140016152 0ustar www-datawww-data* Bohuslav Kabrda * Chris Howe * Damien Pollet * Daniel Lv * Gabe Martin-Dempesy * Kevin Menard * Mal Curtis * Matt Bridges * Matt Petty * Nathaniel Eliot * Wesley Beary * Wesley Beary * Wesley Beary * Wesley Beary * geemus (Wesley Beary) * geemus formatador-1.1.0/Rakefile0000644000004100000410000000645014175331140015350 0ustar www-datawww-datarequire 'rubygems' require 'rake' require 'date' ############################################################################# # # Helper functions # ############################################################################# def name @name ||= Dir['*.gemspec'].first.split('.').first end def version line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/] line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1] end def date Date.today.to_s end def gemspec_file "#{name}.gemspec" end def gem_file "#{name}-#{version}.gem" end def replace_header(head, header_name) head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"} end ############################################################################# # # Standard tasks # ############################################################################# require 'shindo/rake' Shindo::Rake.new task :default => :tests desc "Generate RCov test coverage and open in your browser" task :coverage do require 'rcov' sh "rm -fr coverage" sh "rcov test/test_*.rb" sh "open coverage/index.html" end require 'rdoc/task' Rake::RDocTask.new do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = "#{name} #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end desc "Open an irb session preloaded with this library" task :console do sh "irb -rubygems -r ./lib/#{name}.rb" end ############################################################################# # # Custom tasks (add your own tasks here) # ############################################################################# ############################################################################# # # Packaging tasks # ############################################################################# task :release => :build do unless `git branch` =~ /^\* master$/ puts "You must be on the master branch to release!" exit! end sh "gem install pkg/#{name}-#{version}.gem" sh "git commit --allow-empty -a -m 'Release #{version}'" sh "git tag v#{version}" sh "git push origin master" sh "git push origin v#{version}" sh "gem push pkg/#{name}-#{version}.gem" end task :build => :gemspec do sh "mkdir -p pkg" sh "gem build #{gemspec_file}" sh "mv #{gem_file} pkg" end task :gemspec => :validate do # read spec file and split out manifest section spec = File.read(gemspec_file) head, manifest, tail = spec.split(" # = MANIFEST =\n") # replace name version and date replace_header(head, :name) replace_header(head, :version) replace_header(head, :date) # determine file list from git ls-files files = `git ls-files`. split("\n"). sort. reject { |file| file =~ /^\./ }. reject { |file| file =~ /^(rdoc|pkg)/ }. map { |file| " #{file}" }. join("\n") # piece file back together and write manifest = " s.files = %w[\n#{files}\n ]\n" spec = [head, manifest, tail].join(" # = MANIFEST =\n") File.open(gemspec_file, 'w') { |io| io.write(spec) } puts "Updated #{gemspec_file}" end task :validate do libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}"] unless libfiles.empty? puts "Directory `lib` should only contain a `#{name}.rb` file and `#{name}` dir." exit! end unless Dir['VERSION*'].empty? puts "A `VERSION` file at root level violates Gem best practices." exit! end end formatador-1.1.0/lib/0000755000004100000410000000000014175331140014444 5ustar www-datawww-dataformatador-1.1.0/lib/formatador.rb0000644000004100000410000000633114175331140017132 0ustar www-datawww-datarequire File.join(File.dirname(__FILE__), 'formatador', 'table') require File.join(File.dirname(__FILE__), 'formatador', 'progressbar') class Formatador VERSION = '1.1.0' STYLES = { :"\/" => "0", :reset => "0", :bold => "1", :underline => "4", :blink_slow => "5", :blink_fast => "6", :negative => "7", # invert color/color :normal => "22", :underline_none => "24", :blink_off => "25", :positive => "27", # revert color/color :_black_ => "40", :_red_ => "41", :_green_ => "42", :_yellow_ => "43", :_blue_ => "44", :_magenta_ => "45", :_purple_ => "45", :_cyan_ => "46", :_white_ => "47", :_light_black_ => "100", :_light_red_ => "101", :_light_green_ => "102", :_light_yellow_ => "103", :_light_blue_ => "104", :_light_magenta_ => "105", :_light_purple_ => "105", :_light_cyan_ => "106", :black => "30", :red => "31", :green => "32", :yellow => "33", :blue => "34", :magenta => "35", :purple => "35", :cyan => "36", :white => "37", :light_black => "90", :light_red => "91", :light_green => "92", :light_yellow => "93", :light_blue => "94", :light_magenta => "95", :light_purple => "95", :light_cyan => "96", } PARSE_REGEX = /\[(#{ STYLES.keys.join('|') })\]/ix INDENT_REGEX = /\[indent\]/ix def initialize @indent = 1 end def display(string = '') print(parse("[indent]#{string}")) $stdout.flush nil end def display_line(string = '') display(string) new_line nil end def display_lines(lines = []) for line in [*lines] display_line(line) end nil end def parse(string) if $stdout.tty? string.gsub(PARSE_REGEX) { "\e[#{STYLES[$1.to_sym]}m" }.gsub(INDENT_REGEX) { indentation } else strip(string) end end def indent(&block) @indent += 1 yield ensure @indent -= 1 end def indentation ' ' * @indent end def redisplay(string = '', width = 120) print("\r#{' ' * width}\r") display("#{string}") nil end def redisplay_line(string = '', width = 120) redisplay(string, width) new_line nil end def new_line print("\n") nil end def strip(string) string.gsub(PARSE_REGEX, '').gsub(INDENT_REGEX) { indentation } end %w{display display_line display_lines indent parse redisplay redisplay_line new_line redisplay_progressbar}.each do |method| eval <<-DEF def self.#{method}(*args, &block) Thread.current[:formatador] ||= new Thread.current[:formatador].#{method}(*args, &block) end DEF end %w{display_table display_compact_table}.each do |method| eval <<-DEF def self.#{method}(*args, **kwargs, &block) Thread.current[:formatador] ||= new Thread.current[:formatador].#{method}(*args, **kwargs, &block) end DEF end end formatador-1.1.0/lib/formatador/0000755000004100000410000000000014175331140016602 5ustar www-datawww-dataformatador-1.1.0/lib/formatador/table.rb0000644000004100000410000000533514175331140020224 0ustar www-datawww-dataclass Formatador def display_table(hashes, keys = nil, **options, &block) new_hashes = hashes.inject([]) do |accum,item| accum << :split unless accum.empty? accum << item end display_compact_table(new_hashes, keys, **options, &block) end def display_compact_table(hashes, keys = nil, **options, &block) headers = keys || [] widths = {} # Calculate Widths if hashes.empty? && keys keys.each do |key| widths[key] = key.to_s.length end else hashes.each do |hash| next unless hash.respond_to?(:keys) (headers + hash.keys).each do |key| if !keys headers << key end widths[key] = [ length(key), widths[key] || 0, length(calculate_datum(key, hash)) || 0].max end headers = headers.uniq end end # Determine order of headers if block_given? headers = headers.sort(&block) elsif !keys headers = headers.sort {|x,y| x.to_s <=> y.to_s} end # Display separator row split = "+" if headers.empty? split << '--+' else headers.each do |header| widths[header] ||= length(header) split << ('-' * (widths[header] + 2)) << '+' end end display_line(split) # Display data row columns = [] headers.each do |header| columns << "[bold]#{header}[/]#{' ' * (widths[header] - header.to_s.length)}" end display_line("| #{columns.join(' | ')} |") display_line(split) hashes.each do |hash| if hash.respond_to? :keys columns = headers.map do |header| datum = calculate_datum(header, hash) width = widths[header] - length(datum) width = width < 0 ? 0 : width datum.is_a?(Numeric) && options[:numeric_rjust] ? "#{' ' * width}#{datum}" : "#{datum}#{' ' * width}" end display_line("| #{columns.join(' | ')} |") else if hash == :split display_line(split) end end nil end display_line(split) end private def length(value) if Module.const_defined?(:Unicode) Unicode.width(value.to_s.gsub(PARSE_REGEX, '')) else value.to_s.gsub(PARSE_REGEX, '').chars.reduce(0) { |sum, char| sum += char.bytesize > 1 ? 2 : 1 } end rescue NotImplementedError value.to_s.gsub(PARSE_REGEX, '').chars.reduce(0) { |sum, char| sum += char.bytesize > 1 ? 2 : 1 } end def calculate_datum(header, hash) if !hash.keys.include?(header) && (splits = header.to_s.split('.')).length > 1 datum = nil splits.each do |split| d = (datum||hash) datum = d[split] || d[split.to_sym] || '' end else datum = hash.fetch(header, '') end datum end end formatador-1.1.0/lib/formatador/progressbar.rb0000644000004100000410000000446714175331140021473 0ustar www-datawww-datarequire 'thread' class Formatador class ProgressBar attr_accessor :current, :total, :opts def initialize(total, opts = {}, &block) @current = opts.delete(:start) || 0 @total = total.to_i @opts = opts @lock = Mutex.new @complete_proc = block_given? ? block : Proc.new { } end def increment(increment = 1) @lock.synchronize do return if complete? @current += increment.to_i @complete_proc.call(self) if complete? Formatador.redisplay_progressbar(current, total, opts) end end private def complete? current == total end end def redisplay_progressbar(current, total, options = {}) options = { :color => 'white', :width => 50, :new_line => true }.merge!(options) data = progressbar(current, total, options) if current < total redisplay(data, options[:width]) else redisplay("#{data}", options[:width]) if options[:new_line] new_line end @progressbar_started_at = nil end end private def progressbar(current, total, options) color = options[:color] started_at = options[:started_at] width = options[:width] output = [] if options[:label] output << options[:label] end # width # we are going to write a string that looks like " current/total" # It would be nice if it were left padded with spaces in such a way that # it puts the progress bar in a constant place on the page. This witdh # calculation allows for the "current" string to be up to two characters # longer than the "total" string without problems. eg- current = # 9.99, total = 10 padding = total.to_s.size * 2 + 3 output << "[#{color}]%#{padding}s[/]" % "#{current}/#{total}" percent = current.to_f / total.to_f percent = 0 if percent < 0 percent = 1 if percent > 1 done = '*' * (percent * width).ceil remaining = ' ' * (width - done.length) output << "[_white_]|[/][#{color}][_#{color}_]#{done}[/]#{remaining}[_white_]|[/]" if started_at elapsed = Time.now - started_at minutes = (elapsed / 60).truncate.to_s seconds = (elapsed % 60).truncate.to_s output << "#{minutes}:#{'0' if seconds.size < 2}#{seconds}" end output << '' output.join(' ') end end formatador-1.1.0/CONTRIBUTING.md0000644000004100000410000000156514175331140016136 0ustar www-datawww-data## Getting Involved New contributors are always welcome, when it doubt please ask questions. We strive to be an open and welcoming community. Please be nice to one another. ### Coding * Pick a task: * Offer feedback on open [pull requests](https://github.com/geemus/formatador/pulls). * Review open [issues](https://github.com/geemus/formatador/issues) for things to help on. * [Create an issue](https://github.com/geemus/formatador/issues/new) to start a discussion on additions or features. * Fork the project, add your changes and tests to cover them in a topic branch. * Commit your changes and rebase against `geemus/formatador` to ensure everything is up to date. * [Submit a pull request](https://github.com/geemus/formatador/compare/). ### Non-Coding * Offer feedback on open [issues](https://github.com/geemus/formatador/issues). * Organize or volunteer at events. formatador-1.1.0/formatador.gemspec0000644000004100000410000000612314175331140017403 0ustar www-datawww-data## This is the rakegem gemspec template. Make sure you read and understand ## all of the comments. Some sections require modification, and others can ## be deleted if you don't need them. Once you understand the contents of ## this file, feel free to delete any comments that begin with two hash marks. ## You can find comprehensive Gem::Specification documentation, at ## http://docs.rubygems.org/read/chapter/20 Gem::Specification.new do |s| s.specification_version = 2 if s.respond_to? :specification_version= s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.rubygems_version = '1.3.5' ## Leave these as is they will be modified for you by the rake gemspec task. ## If your rubyforge_project name is different, then edit it and comment out ## the sub! line in the Rakefile s.name = 'formatador' s.version = '1.1.0' s.date = '2022-01-24' ## Make sure your summary is short. The description may be as long ## as you like. s.summary = "Ruby STDOUT text formatting" s.description = "STDOUT text formatting" ## List the primary authors. If there are a bunch of authors, it's probably ## better to set the email to an email list or something. If you don't have ## a custom homepage, consider using your GitHub URL or the like. s.authors = ["geemus (Wesley Beary)"] s.email = 'geemus@gmail.com' s.homepage = "https://github.com/geemus/#{s.name}" s.license = 'MIT' ## This gets added to the $LOAD_PATH so that 'lib/NAME.rb' can be required as ## require 'NAME.rb' or'/lib/NAME/file.rb' can be as require 'NAME/file.rb' s.require_paths = %w[lib] ## This sections is only necessary if you have C extensions. # s.require_paths << 'ext' # s.extensions = %w[ext/extconf.rb] ## If your gem includes any executables, list them here. # s.executables = ["name"] # s.default_executable = 'name' ## Specify any RDoc options here. You'll want to add your README and ## LICENSE files to the extra_rdoc_files list. s.rdoc_options = ["--charset=UTF-8"] s.extra_rdoc_files = %w[README.md] ## List your runtime dependencies here. Runtime dependencies are those ## that are needed for an end user to actually USE your code. # s.add_dependency('DEPNAME', [">= 1.1.0", "< 2.0.0"]) ## List your development dependencies here. Development dependencies are ## those that are only needed during development s.add_development_dependency('rake') s.add_development_dependency('rdoc') s.add_development_dependency('shindo') ## Leave this section as-is. It will be automatically generated from the ## contents of your Git repository via the gemspec task. DO NOT REMOVE ## THE MANIFEST COMMENTS, they are used as delimiters by the task. # = MANIFEST = s.files = %w[ CONTRIBUTING.md CONTRIBUTORS.md Gemfile LICENSE.md README.md Rakefile changelog.txt formatador.gemspec lib/formatador.rb lib/formatador/progressbar.rb lib/formatador/table.rb tests/basic_tests.rb tests/table_tests.rb tests/tests_helper.rb ] # = MANIFEST = end formatador-1.1.0/changelog.txt0000644000004100000410000000254014175331140016367 0ustar www-datawww-datav1.0.0 01/20/21 =============== release v1, it's been stable for ages v0.3.0 06/17/21 =============== add travis badge to readme change readme to md fix markdown readme fix travis badge monkey-patch StringIO to try and fix jruby build override tty? for jruby build fix copyright statement use unicode.width instead of string.length remove unicode from requirements, use only if loaded display datum who's value is a FalseClass more colors with syntax-specific code/length limitations better code visualization in readme update readme remove broken rubinius build from CI fix length method to detect multibyte char width fix test for table with multi byte chars support multibyte characters update CI to 2.2.7, 2.3.4, and 2.4.1 drop rubyforge_project from gemspec and rakefile change github reference to https change readme.rdoc to readme.md in gemspec v0.2.5 05/23/14 =============== * fix typo in readme * ensure indent is reset * add progress bar object * improve thread safety for progress bar v0.2.4 10/26/12 =============== * sort background colors higher * fix homepage link in gem metadata v0.2.3 05/18/12 =============== * fix nested hashes to allow for keys which contain periods v0.2.2 05/16/12 =============== * require stringio in tests * allow tests to pass without tty * label test groups * fix for redisplay width * allow tables to use nested hashes formatador-1.1.0/Gemfile0000644000004100000410000000004714175331140015172 0ustar www-datawww-datasource "https://rubygems.org" gemspec