hirohig_palindrome 0.1.0
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 +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +8 -0
- data/.travis.yml +6 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +30 -0
- data/README.md +36 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/hirohig_palindrome.gemspec +33 -0
- data/lib/hirohig_palindrome/version.rb +3 -0
- data/lib/hirohig_palindrome.rb +17 -0
- data/vendor/.DS_Store +0 -0
- data/vendor/bundle/.DS_Store +0 -0
- data/vendor/bundle/ruby/.DS_Store +0 -0
- data/vendor/bundle/ruby/2.6.0/.DS_Store +0 -0
- data/vendor/bundle/ruby/2.6.0/bin/rake +27 -0
- data/vendor/bundle/ruby/2.6.0/cache/ansi-1.5.0.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/builder-3.2.4.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/minitest-5.14.0.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/minitest-reporters-1.2.0.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/rake-12.3.3.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/ruby-progressbar-1.10.1.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/.DS_Store +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/.index +77 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/.yardopts +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/DEMO.md +451 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/HISTORY.md +217 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/LICENSE.txt +23 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/NOTICE.md +170 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/README.md +91 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/01_ansicode.md +65 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/02_core.md +11 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/03_logger.md +30 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/04_progressbar.md +62 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/05_mixin.md +37 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/06_string.md +56 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/07_columns.md +89 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/08_table.md +28 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/09_diff.md +47 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/10_bbcode.md +24 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/11_terminal.md +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/applique/ae.rb +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/demo/applique/output.rb +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/bbcode.rb +334 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/chain.rb +50 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/chart.rb +100 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/code.rb +349 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/columns.rb +197 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/constants.rb +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/core.rb +30 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/diff.rb +215 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/hexdump.rb +122 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/logger.rb +211 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/mixin.rb +121 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/progressbar.rb +292 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/string.rb +254 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/table.rb +179 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/terminal/curses.rb +26 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/terminal/stty.rb +62 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/terminal/termios.rb +68 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/terminal/win32.rb +107 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/terminal.rb +44 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/version.rb +15 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi.rb +22 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi.yml +77 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/test/case_ansicode.rb +43 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/test/case_bbcode.rb +35 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/test/case_mixin.rb +35 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/test/case_progressbar.rb +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/test/test_helper.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/CHANGES +119 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/README.md +258 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/Rakefile +194 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/builder.blurb +27 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/builder.gemspec +45 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/doc/jamis.rb +592 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/doc/releases/builder-1.2.4.rdoc +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/doc/releases/builder-2.0.0.rdoc +46 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/doc/releases/builder-2.1.1.rdoc +58 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/lib/blankslate.rb +138 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/lib/builder/blankslate.rb +24 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/lib/builder/version.rb +9 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/lib/builder/xchar.rb +198 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/lib/builder/xmlbase.rb +200 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/lib/builder/xmlevents.rb +64 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/lib/builder/xmlmarkup.rb +345 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/lib/builder.rb +14 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/rakelib/publish.rake +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/rakelib/tags.rake +63 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/rakelib/testing.rake +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/test/helper.rb +13 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/test/performance.rb +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/test/preload.rb +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/test/test_blankslate.rb +208 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/test/test_eventbuilder.rb +151 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/test/test_markupbuilder.rb +617 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/test/test_method_caching.rb +63 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/test/test_namecollision.rb +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/test/test_xchar.rb +85 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/.autotest +34 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/History.rdoc +1380 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/Manifest.txt +27 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/README.rdoc +764 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/Rakefile +72 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/design_rationale.rb +52 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/hoe/minitest.rb +32 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/assertions.rb +807 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/autorun.rb +13 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/benchmark.rb +455 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/expectations.rb +303 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/hell.rb +11 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/mock.rb +240 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/parallel.rb +70 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/pride.rb +4 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/pride_plugin.rb +142 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/spec.rb +342 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/test.rb +220 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest/unit.rb +45 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest.rb +1053 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/test/minitest/metametameta.rb +117 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/test/minitest/test_minitest_assertions.rb +1567 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/test/minitest/test_minitest_benchmark.rb +137 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/test/minitest/test_minitest_mock.rb +872 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/test/minitest/test_minitest_reporter.rb +299 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/test/minitest/test_minitest_spec.rb +1041 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-5.14.0/test/minitest/test_minitest_test.rb +1080 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/.gitignore +27 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/.ruby-gemset +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/.travis.yml +10 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/.yardopts +6 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/CHANGELOG.md +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/Gemfile +2 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/LICENSE +20 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/README.md +115 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/Rakefile +60 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/assets/default-reporter.png +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/assets/mean_time_reporter.png +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/assets/progress-reporter.png +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/assets/spec-reporter.png +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/extensible_backtrace_filter.rb +67 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/minitest_reporter_plugin.rb +75 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/old_activesupport_fix.rb +24 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/relative_position.rb +26 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters/ansi.rb +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters/base_reporter.rb +117 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters/default_reporter.rb +228 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters/html_reporter.rb +221 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters/junit_reporter.rb +157 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters/mean_time_reporter.rb +392 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters/progress_reporter.rb +96 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters/ruby_mate_reporter.rb +54 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters/rubymine_reporter.rb +117 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters/spec_reporter.rb +61 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters/version.rb +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/reporters.rb +89 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/lib/minitest/templates/index.html.erb +83 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/minitest-reporters.gemspec +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/fixtures/junit_filename_bug_example_test.rb +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/fixtures/mean_time_test.rb +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/fixtures/progress_detailed_skip_test.rb +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/fixtures/progress_test.rb +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/fixtures/sample_test.rb +15 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/fixtures/spec_test.rb +13 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/gallery/bad_test.rb +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/gallery/good_test.rb +14 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/integration/reporters/junit_reporter_test.rb +12 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/integration/reporters/mean_time_reporter_test.rb +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb +34 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/test_helper.rb +22 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/unit/minitest/extensible_backtrace_filter_test.rb +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/unit/minitest/mean_time_reporter_unit_test.rb +152 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/unit/minitest/minitest_reporter_plugin_test.rb +14 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/unit/minitest/reporters_test.rb +52 -0
- data/vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/unit/minitest/spec_reporter_test.rb +41 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/CONTRIBUTING.rdoc +43 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/Gemfile +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/History.rdoc +2344 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/README.rdoc +156 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/Rakefile +41 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/azure-pipelines.yml +11 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/bin/bundle +105 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/bin/console +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/bin/rake +29 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/bin/rdoc +29 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/bin/rubocop +29 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/bin/setup +6 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/jamis.rb +592 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/rake.1 +156 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/rakefile.rdoc +622 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake +27 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb +824 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/backtrace.rb +24 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/clean.rb +78 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/cloneable.rb +17 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/cpu_counter.rb +107 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/default_loader.rb +15 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/dsl_definition.rb +195 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/early_time.rb +22 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/ext/core.rb +26 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/ext/string.rb +176 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/file_creation_task.rb +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/file_list.rb +435 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/file_task.rb +54 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/file_utils.rb +137 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/file_utils_ext.rb +145 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/invocation_chain.rb +57 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/invocation_exception_mixin.rb +17 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/late_time.rb +18 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/linked_list.rb +112 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/loaders/makefile.rb +54 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/multi_task.rb +14 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/packagetask.rb +207 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/phony.rb +16 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/private_reader.rb +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/promise.rb +100 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/pseudo_status.rb +30 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/rake_module.rb +67 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb +27 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/scope.rb +43 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb +413 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task_argument_error.rb +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task_arguments.rb +109 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task_manager.rb +324 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/tasklib.rb +12 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/testtask.rb +224 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/thread_history_display.rb +49 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/thread_pool.rb +163 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/trace_output.rb +23 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/version.rb +10 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/win32.rb +51 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake.rb +71 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/rake.gemspec +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/LICENSE.txt +19 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/README.md +38 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/Rakefile +2 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/base.rb +183 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/calculators/length.rb +100 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/calculators/running_average.rb +9 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/components/bar.rb +102 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/components/percentage.rb +29 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/components/rate.rb +43 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/components/time.rb +107 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/components/title.rb +13 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/components.rb +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/errors/invalid_progress_error.rb +4 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/format/formatter.rb +27 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/format/molecule.rb +60 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/format/string.rb +36 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/format.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/output.rb +68 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/non_tty.rb +47 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/null.rb +33 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb +32 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/progress.rb +118 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/refinements/enumerator.rb +23 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/refinements.rb +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/throttle.rb +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/time.rb +32 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/timer.rb +72 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/version.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar.rb +22 -0
- data/vendor/bundle/ruby/2.6.0/specifications/ansi-1.5.0.gemspec +49 -0
- data/vendor/bundle/ruby/2.6.0/specifications/builder-3.2.4.gemspec +23 -0
- data/vendor/bundle/ruby/2.6.0/specifications/minitest-5.14.0.gemspec +41 -0
- data/vendor/bundle/ruby/2.6.0/specifications/minitest-reporters-1.2.0.gemspec +48 -0
- data/vendor/bundle/ruby/2.6.0/specifications/rake-12.3.3.gemspec +49 -0
- data/vendor/bundle/ruby/2.6.0/specifications/ruby-progressbar-1.10.1.gemspec +46 -0
- metadata +326 -0
@@ -0,0 +1,170 @@
|
|
1
|
+
# COPYRIGHT NOTICES
|
2
|
+
|
3
|
+
## ANSI
|
4
|
+
|
5
|
+
Copyright © 2009 [Rubyworks](http://rubyworks.github.com) ·
|
6
|
+
License [BSD-2-Clause](http://spdx.org/licenses/BSD-2-Clause) ·
|
7
|
+
Website http://rubyworks.github.com/ansi
|
8
|
+
|
9
|
+
Copyright 2009 Rubyworks.
|
10
|
+
|
11
|
+
All rights reserved.
|
12
|
+
|
13
|
+
Redistribution and use in source and binary forms, with or without modification, are
|
14
|
+
permitted provided that the following conditions are met:
|
15
|
+
|
16
|
+
1. Redistributions of source code must retain the above copyright notice, this list of
|
17
|
+
conditions and the following disclaimer.
|
18
|
+
|
19
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list
|
20
|
+
of conditions and the following disclaimer in the documentation and/or other materials
|
21
|
+
provided with the distribution.
|
22
|
+
|
23
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
24
|
+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
|
26
|
+
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
28
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
29
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
30
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
31
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
32
|
+
|
33
|
+
(https://raw.github.com/rubyworks/ansi/master/LICENSE.txt)
|
34
|
+
|
35
|
+
|
36
|
+
## ProgressBar
|
37
|
+
|
38
|
+
Copyright © 2001 *Satoru Takabayashi* ·
|
39
|
+
License [Ruby](http://spdx.org/licenses/Ruby) ·
|
40
|
+
Website http://0xcc.net/ruby-progressbar
|
41
|
+
|
42
|
+
ProgressBar class is based on the original ProgressBar by Satoru Takabayashi.
|
43
|
+
|
44
|
+
Ruby/ProgressBar - a text progress bar library
|
45
|
+
|
46
|
+
Copyright (C) 2001-2005 Satoru Takabayashi <satoru@namazu.org>
|
47
|
+
All rights reserved.
|
48
|
+
This is free software with ABSOLUTELY NO WARRANTY.
|
49
|
+
|
50
|
+
You can redistribute it and/or modify it under the terms
|
51
|
+
of Ruby's license.
|
52
|
+
|
53
|
+
|
54
|
+
## HighLine (Terminal Extensions)
|
55
|
+
|
56
|
+
Copyright © 2006 *Gray Productions* ·
|
57
|
+
License [Ruby](http://spdx.org/licenses/Ruby) ·
|
58
|
+
Website http://highline.rubyforge.org
|
59
|
+
|
60
|
+
The terminal extensions are based on HighLine's SystemExtensions
|
61
|
+
by James Edward Gray II.
|
62
|
+
|
63
|
+
Copyright 2006 Gray Productions
|
64
|
+
|
65
|
+
Distributed under the user's choice of the {GPL Version 2}[http://www.gnu.org/licenses/old-licenses/gpl-2.0.html]
|
66
|
+
(see GPL-2.0.txt for details) or the {Ruby software license}[http://www.ruby-lang.org/en/LICENSE.txt]
|
67
|
+
by James Edward Gray II and Greg Brown.
|
68
|
+
|
69
|
+
Please email James[mailto:james@grayproductions.net] with any questions.
|
70
|
+
|
71
|
+
(https://github.com/JEG2/highline/blob/master/LICENSE)
|
72
|
+
|
73
|
+
|
74
|
+
## BBCode
|
75
|
+
|
76
|
+
Copyright © 2002 *Thomas-Ivo Heinen* ·
|
77
|
+
License [Ruby](http://spdx.org/licenses/Ruby)
|
78
|
+
|
79
|
+
BBCode module is a derivative of BBCode by Thomas-Ivo Heinen.
|
80
|
+
|
81
|
+
Copyright (c) 2002 Thomas-Ivo Heinen
|
82
|
+
|
83
|
+
This module is free software. You may use, modify, and/or redistribute this
|
84
|
+
software under the same terms as Ruby.
|
85
|
+
|
86
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
87
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
88
|
+
FOR A PARTICULAR PURPOSE.
|
89
|
+
|
90
|
+
|
91
|
+
## Rainbow (XTerm Color Support)
|
92
|
+
|
93
|
+
Copyright © *Marcin Kulik* ·
|
94
|
+
License [MIT](http://spdx.org/licenses/MIT) ·
|
95
|
+
Website http://github.com/sickill/rainbow
|
96
|
+
|
97
|
+
Rainbox provided the bases for building the XTerm 256 color code
|
98
|
+
support into the ANSI::Code module.
|
99
|
+
|
100
|
+
Copyright (c) Marcin Kulik
|
101
|
+
|
102
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
103
|
+
a copy of this software and associated documentation files (the
|
104
|
+
"Software"), to deal in the Software without restriction, including
|
105
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
106
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
107
|
+
permit persons to whom the Software is furnished to do so, subject to
|
108
|
+
the following conditions:
|
109
|
+
|
110
|
+
The above copyright notice and this permission notice shall be
|
111
|
+
included in all copies or substantial portions of the Software.
|
112
|
+
|
113
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
114
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
115
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
116
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
117
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
118
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
119
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
120
|
+
|
121
|
+
(https://raw.github.com/sickill/rainbow/master/LICENSE)
|
122
|
+
|
123
|
+
|
124
|
+
## Paint (ANSI Code Names)
|
125
|
+
|
126
|
+
Copyright © 2011 *Jan Lelis* ·
|
127
|
+
License [MIT](http://spdx.org/licenses/MIT) ·
|
128
|
+
Website https://github.com/janlelis/paint
|
129
|
+
|
130
|
+
Some of the latest ANSI code names, and inspiration to check out Rainbow
|
131
|
+
and include XTerm 256 color codes, came from Paint.
|
132
|
+
|
133
|
+
Copyright (c) 2011 Jan Lelis
|
134
|
+
|
135
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
136
|
+
a copy of this software and associated documentation files (the
|
137
|
+
"Software"), to deal in the Software without restriction, including
|
138
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
139
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
140
|
+
permit persons to whom the Software is furnished to do so, subject to
|
141
|
+
the following conditions:
|
142
|
+
|
143
|
+
The above copyright notice and this permission notice shall be
|
144
|
+
included in all copies or substantial portions of the Software.
|
145
|
+
|
146
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
147
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
148
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
149
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
150
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
151
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
152
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
153
|
+
|
154
|
+
(https://raw.github.com/janlelis/paint/master/LICENSE.txt)
|
155
|
+
|
156
|
+
|
157
|
+
## ANSIColor
|
158
|
+
|
159
|
+
_Acknowlegement_
|
160
|
+
|
161
|
+
Copyright © 2002 *Florian Frank* ·
|
162
|
+
Website http://flori.github.com/term-ansicolor
|
163
|
+
|
164
|
+
Albeit the code no long bares much, if any, resemblance to it, the ANSI Code
|
165
|
+
module (and subsequently the Constants module) originated with the
|
166
|
+
ANSIColor library by Florian Frank.
|
167
|
+
|
168
|
+
Copyright (c) 2002 Florian Frank
|
169
|
+
|
170
|
+
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# ANSI
|
2
|
+
|
3
|
+
[HOME](http://rubyworks.github.com/ansi) ·
|
4
|
+
[API](http://rubydoc.info/gems/ansi/frames) ·
|
5
|
+
[MAIL](http://googlegroups.com/group/rubyworks-mailinglist) ·
|
6
|
+
[ISSUES](http://github.com/rubyworks/ansi/issues) ·
|
7
|
+
[SOURCE](http://github.com/rubyworks/ansi)
|
8
|
+
|
9
|
+
[](http://travis-ci.org/rubyworks/ansi)
|
10
|
+
|
11
|
+
<br/>
|
12
|
+
|
13
|
+
The ANSI project is a collection of ANSI escape code related libraries
|
14
|
+
enabling ANSI code based colorization and stylization of output.
|
15
|
+
It is very nice for beautifying shell output.
|
16
|
+
|
17
|
+
This collection is based on a set of scripts spun-off from
|
18
|
+
Ruby Facets. Included are Code (used to be ANSICode), Logger,
|
19
|
+
ProgressBar and String. In addition the library includes
|
20
|
+
Terminal which provides information about the current output
|
21
|
+
device.
|
22
|
+
|
23
|
+
|
24
|
+
## Features
|
25
|
+
|
26
|
+
* ANSI::Code provides ANSI codes as module functions.
|
27
|
+
* String#ansi makes common usage very easy and elegant.
|
28
|
+
* ANSI::Mixin provides an alternative mixin (like +colored+ gem).
|
29
|
+
* Very Good coverage of standard ANSI codes.
|
30
|
+
* Additional clases for colorized columns, tables, loggers and more.
|
31
|
+
|
32
|
+
|
33
|
+
## Synopsis
|
34
|
+
|
35
|
+
There are a number of modules and classes provided by the ANSI
|
36
|
+
package. To get a good understanding of them it is best to pursue
|
37
|
+
the [QED documents](http://github.com/rubyworks/ansi/tree/master/qed/)
|
38
|
+
or the [API documentation](http://rubyworks.github.com/ansi/api/index.html).
|
39
|
+
|
40
|
+
At the heart of all the provided libraries lies the ANSI::Code module
|
41
|
+
which defines ANSI codes as constants and methods. For example:
|
42
|
+
|
43
|
+
require 'ansi/code'
|
44
|
+
|
45
|
+
ANSI.red + "Hello" + ANSI.blue + "World"
|
46
|
+
=> "\e[31mHello\e[34mWorld"
|
47
|
+
|
48
|
+
Or in block form.
|
49
|
+
|
50
|
+
ANSI.red{ "Hello" } + ANSI.blue{ "World" }
|
51
|
+
=> "\e[31mHello\e[0m\e[34mWorld\e[0m"
|
52
|
+
|
53
|
+
The methods defined by this module are used throughout the rest of
|
54
|
+
the system.
|
55
|
+
|
56
|
+
|
57
|
+
## Installation
|
58
|
+
|
59
|
+
### RubyGems
|
60
|
+
|
61
|
+
To install with RubyGems simply open a console and type:
|
62
|
+
|
63
|
+
$ sudo gem install ansi
|
64
|
+
|
65
|
+
### Setup.rb (not recommended)
|
66
|
+
|
67
|
+
Local installation requires Setup.rb (gem install setup),
|
68
|
+
then [download](http://github.com/rubyworks/ansi/download) the tarball package and type:
|
69
|
+
|
70
|
+
$ tar -xvzf ansi-1.0.0.tgz
|
71
|
+
$ cd ansi-1.0.0
|
72
|
+
$ sudo setup.rb all
|
73
|
+
|
74
|
+
Windows users use 'ruby setup.rb all'.
|
75
|
+
|
76
|
+
|
77
|
+
## Release Notes
|
78
|
+
|
79
|
+
Please see HISTORY.md file.
|
80
|
+
|
81
|
+
|
82
|
+
## License & Copyrights
|
83
|
+
|
84
|
+
Copyright (c) 2009 Rubyworks
|
85
|
+
|
86
|
+
This program is redistributable under the terms of the *FreeBSD* license.
|
87
|
+
|
88
|
+
Some pieces of the code are copyrighted by others.
|
89
|
+
|
90
|
+
See LICENSE.txt and NOTICE.md files for details.
|
91
|
+
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# ANSI::Code
|
2
|
+
|
3
|
+
Require the library.
|
4
|
+
|
5
|
+
require 'ansi/code'
|
6
|
+
|
7
|
+
ANSI::Code can be used as a functions module.
|
8
|
+
|
9
|
+
str = ANSI::Code.red + "Hello" + ANSI::Code.blue + "World"
|
10
|
+
str.assert == "\e[31mHello\e[34mWorld"
|
11
|
+
|
12
|
+
If a block is supplied to each method then yielded value will
|
13
|
+
be wrapped in the ANSI code and clear code.
|
14
|
+
|
15
|
+
str = ANSI::Code.red{ "Hello" } + ANSI::Code.blue{ "World" }
|
16
|
+
str.assert == "\e[31mHello\e[0m\e[34mWorld\e[0m"
|
17
|
+
|
18
|
+
More conveniently the ANSI::Code module extends ANSI itself.
|
19
|
+
|
20
|
+
str = ANSI.red + "Hello" + ANSI.blue + "World"
|
21
|
+
str.assert == "\e[31mHello\e[34mWorld"
|
22
|
+
|
23
|
+
str = ANSI.red{ "Hello" } + ANSI.blue{ "World" }
|
24
|
+
str.assert == "\e[31mHello\e[0m\e[34mWorld\e[0m"
|
25
|
+
|
26
|
+
ANSI also supports XTerm 256 color mode using red, blue and green values
|
27
|
+
with the `#rgb` method.
|
28
|
+
|
29
|
+
str = ANSI::Code.rgb(0, 255, 0)
|
30
|
+
str.assert == "\e[38;5;46m"
|
31
|
+
|
32
|
+
Or using CSS style hex codes as well.
|
33
|
+
|
34
|
+
str = ANSI::Code.rgb("#00FF00")
|
35
|
+
str.assert == "\e[38;5;46m"
|
36
|
+
|
37
|
+
Both of these methods can take blocks to wrap text in the color and clear codes.
|
38
|
+
|
39
|
+
str = ANSI::Code.rgb("#00FF00"){ "Hello" }
|
40
|
+
str.assert == "\e[38;5;46mHello\e[0m"
|
41
|
+
|
42
|
+
In the appropriate context the ANSI::Code module can also be
|
43
|
+
included, making its methods directly accessible.
|
44
|
+
|
45
|
+
include ANSI::Code
|
46
|
+
|
47
|
+
str = red + "Hello" + blue + "World"
|
48
|
+
str.assert == "\e[31mHello\e[34mWorld"
|
49
|
+
|
50
|
+
str = red{ "Hello" } + blue{ "World" }
|
51
|
+
str.assert == "\e[31mHello\e[0m\e[34mWorld\e[0m"
|
52
|
+
|
53
|
+
Along with the single font colors, the library include background colors.
|
54
|
+
|
55
|
+
str = on_red + "Hello"
|
56
|
+
str.assert == "\e[41mHello"
|
57
|
+
|
58
|
+
As well as combined color methods.
|
59
|
+
|
60
|
+
str = white_on_red + "Hello"
|
61
|
+
str.assert == "\e[37m\e[41mHello"
|
62
|
+
|
63
|
+
The ANSI::Code module supports most standard ANSI codes, though
|
64
|
+
not all platforms support every code, so YMMV.
|
65
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# String Extensions
|
2
|
+
|
3
|
+
In addition the library offers an extension to String class
|
4
|
+
called #ansi, which allows some of the ANSI::Code methods
|
5
|
+
to be called in a more object-oriented fashion.
|
6
|
+
|
7
|
+
require 'ansi/core'
|
8
|
+
|
9
|
+
str = "Hello".ansi(:red) + "World".ansi(:blue)
|
10
|
+
str.assert == "\e[31mHello\e[0m\e[34mWorld\e[0m"
|
11
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# ANSI::Logger
|
2
|
+
|
3
|
+
Require the ANSI::Logger library.
|
4
|
+
|
5
|
+
require 'ansi/logger'
|
6
|
+
|
7
|
+
Create a new ANSI::Logger
|
8
|
+
|
9
|
+
log = ANSI::Logger.new(STDOUT)
|
10
|
+
|
11
|
+
Info logging appears normal.
|
12
|
+
|
13
|
+
log.info{"Info logs are green.\n"}
|
14
|
+
|
15
|
+
Warn logging appears yellow.
|
16
|
+
|
17
|
+
log.warn{"Warn logs are yellow.\n"}
|
18
|
+
|
19
|
+
Debug logging appears cyan.
|
20
|
+
|
21
|
+
log.debug{"Debug logs are cyan.\n"}
|
22
|
+
|
23
|
+
Error logging appears red.
|
24
|
+
|
25
|
+
log.error{"Error logs are red.\n"}
|
26
|
+
|
27
|
+
Fatal logging appears bright red.
|
28
|
+
|
29
|
+
log.fatal{"Fatal logs are bold red!\n"}
|
30
|
+
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# ANSI::Progressbar
|
2
|
+
|
3
|
+
Pretty progress bars are easy to construct.
|
4
|
+
|
5
|
+
require 'ansi/progressbar'
|
6
|
+
|
7
|
+
pbar = ANSI::Progressbar.new("Test Bar", 100)
|
8
|
+
|
9
|
+
Running the bar simply requires calling the #inc method during
|
10
|
+
a loop and calling `#finish` when done.
|
11
|
+
|
12
|
+
100.times do |i|
|
13
|
+
sleep 0.01
|
14
|
+
pbar.inc
|
15
|
+
end
|
16
|
+
pbar.finish
|
17
|
+
|
18
|
+
We will use this same rountine in all the examples below, so lets
|
19
|
+
make a quick macro for it. Notice we have to use `#reset` first
|
20
|
+
before reusing the same progress bar.
|
21
|
+
|
22
|
+
def run(pbar)
|
23
|
+
pbar.reset
|
24
|
+
100.times do |i|
|
25
|
+
sleep 0.01
|
26
|
+
pbar.inc
|
27
|
+
end
|
28
|
+
pbar.finish
|
29
|
+
puts
|
30
|
+
end
|
31
|
+
|
32
|
+
The progress bar can be stylized in almost any way.
|
33
|
+
The `#format` setter provides control over the parts
|
34
|
+
that appear on the line. For example, by default the
|
35
|
+
format is:
|
36
|
+
|
37
|
+
pbar.format("%-14s %3d%% %s %s", :title, :percentage, :bar, :stat)
|
38
|
+
|
39
|
+
So lets vary it up to demonstrate the case.
|
40
|
+
|
41
|
+
pbar.format("%-14s %3d%% %s %s", :title, :percentage, :stat, :bar)
|
42
|
+
run(pbar)
|
43
|
+
|
44
|
+
The progress bar has an extra build in format intended for use with
|
45
|
+
file downloads called `#transer_mode`.
|
46
|
+
|
47
|
+
pbar.transfer_mode
|
48
|
+
run(pbar)
|
49
|
+
|
50
|
+
Calling this methods is the same as calling:
|
51
|
+
|
52
|
+
pbar.format("%-14s %3d%% %s %s",:title, :percentage, :bar, :stat_for_file_transfer)
|
53
|
+
run(pbar)
|
54
|
+
|
55
|
+
The `#style` setter allows each part of the line be modified with ANSI codes. And the
|
56
|
+
`#bar_mark` writer can be used to change the character used to make the bar.
|
57
|
+
|
58
|
+
pbar.standard_mode
|
59
|
+
pbar.style(:title => [:red], :bar=>[:blue])
|
60
|
+
pbar.bar_mark = "="
|
61
|
+
run(pbar)
|
62
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# ANSI::Mixin
|
2
|
+
|
3
|
+
The ANSI::Mixin module is design for including into
|
4
|
+
String-like classes. It will support any class that defines
|
5
|
+
a #to_s method.
|
6
|
+
|
7
|
+
require 'ansi/mixin'
|
8
|
+
|
9
|
+
In this demonstration we will simply include it in the
|
10
|
+
core String class.
|
11
|
+
|
12
|
+
class ::String
|
13
|
+
include ANSI::Mixin
|
14
|
+
end
|
15
|
+
|
16
|
+
Now all strings will have access to ANSI's style and color
|
17
|
+
codes via simple method calls.
|
18
|
+
|
19
|
+
"roses".red.assert == "\e[31mroses\e[0m"
|
20
|
+
|
21
|
+
"violets".blue.assert == "\e[34mviolets\e[0m"
|
22
|
+
|
23
|
+
"sugar".italic.assert == "\e[3msugar\e[0m"
|
24
|
+
|
25
|
+
The method can be combined, of course.
|
26
|
+
|
27
|
+
"you".italic.bold.assert == "\e[1m\e[3myou\e[0m\e[0m"
|
28
|
+
|
29
|
+
The mixin also supports background methods.
|
30
|
+
|
31
|
+
"envy".on_green.assert == "\e[42menvy\e[0m"
|
32
|
+
|
33
|
+
And it also supports the combined foreground-on-background
|
34
|
+
methods.
|
35
|
+
|
36
|
+
"b&w".white_on_black.assert == "\e[37m\e[40mb&w\e[0m"
|
37
|
+
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# ANSI::String
|
2
|
+
|
3
|
+
The ANSI::String class is a very sophisticated implementation
|
4
|
+
of Ruby's standard String class, but one that can handle
|
5
|
+
ANSI codes seamlessly.
|
6
|
+
|
7
|
+
require 'ansi/string'
|
8
|
+
|
9
|
+
flower1 = ANSI::String.new("Roses")
|
10
|
+
flower2 = ANSI::String.new("Violets")
|
11
|
+
|
12
|
+
Like any other string.
|
13
|
+
|
14
|
+
flower1.to_s.assert == "Roses"
|
15
|
+
flower2.to_s.assert == "Violets"
|
16
|
+
|
17
|
+
Bet now we can add color.
|
18
|
+
|
19
|
+
flower1.red!
|
20
|
+
flower2.blue!
|
21
|
+
|
22
|
+
flower1.to_s.assert == "\e[31mRoses\e[0m"
|
23
|
+
flower2.to_s.assert == "\e[34mViolets\e[0m"
|
24
|
+
|
25
|
+
Despite that the string representation now contains ANSI codes,
|
26
|
+
we can still manipulate the string in much the same way that
|
27
|
+
we manipulate an ordinary string.
|
28
|
+
|
29
|
+
flower1.size.assert == 5
|
30
|
+
flower2.size.assert == 7
|
31
|
+
|
32
|
+
Like ordinary strings we can concatenate the two strings
|
33
|
+
|
34
|
+
flowers = flower1 + ' ' + flower2
|
35
|
+
flowers.to_s.assert == "\e[31mRoses\e[0m \e[34mViolets\e[0m"
|
36
|
+
|
37
|
+
flowers.size.assert == 13
|
38
|
+
|
39
|
+
Standard case conversion such as #upcase and #downcase work.
|
40
|
+
|
41
|
+
flower1.upcase.to_s.assert == "\e[31mROSES\e[0m"
|
42
|
+
flower1.downcase.to_s.assert == "\e[31mroses\e[0m"
|
43
|
+
|
44
|
+
Some of the most difficult methods to re-implement were the
|
45
|
+
substitution methods such as #sub and #gsub. They are still
|
46
|
+
somewhat more limited than the original string methods, but
|
47
|
+
their primary functionality should work.
|
48
|
+
|
49
|
+
flower1.gsub('s', 'z').to_s.assert == "\e[31mRozez\e[0m"
|
50
|
+
|
51
|
+
There are still a number of methods that need implementation.
|
52
|
+
ANSI::String is currently a very partial implementation. But
|
53
|
+
as you can see from the methods it does currently support,
|
54
|
+
is it already useful.
|
55
|
+
|
56
|
+
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# ANSI::Columns
|
2
|
+
|
3
|
+
The +Columns+ class makes it easy to create nice looking text columns,
|
4
|
+
sorted from top to bottom, right to left (as opposed to the other way
|
5
|
+
around).
|
6
|
+
|
7
|
+
require 'ansi/columns'
|
8
|
+
|
9
|
+
list = %w{a b c d e f g h i j k l}
|
10
|
+
|
11
|
+
columns = ANSI::Columns.new(list)
|
12
|
+
|
13
|
+
columns.to_s(4)
|
14
|
+
|
15
|
+
The output will be:
|
16
|
+
|
17
|
+
a d g j
|
18
|
+
b e h k
|
19
|
+
c f i l
|
20
|
+
|
21
|
+
Besides an array of elements, Columns.new can take a string in which
|
22
|
+
the elements are divided by newlines characters. The default column
|
23
|
+
size can also be given to the initializer.
|
24
|
+
|
25
|
+
list = "a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl"
|
26
|
+
|
27
|
+
columns = ANSI::Columns.new(list, :columns=>6)
|
28
|
+
|
29
|
+
columns.to_s
|
30
|
+
|
31
|
+
The output will be:
|
32
|
+
|
33
|
+
a c e g i k
|
34
|
+
b d f h j l
|
35
|
+
|
36
|
+
If the column count is +nil+, then the number of columns will be calculated
|
37
|
+
as a best fit for the current terminal window.
|
38
|
+
|
39
|
+
## Padding
|
40
|
+
|
41
|
+
Columns can adjust the padding between cells.
|
42
|
+
|
43
|
+
list = %w{a b c d e f g h i j k l}
|
44
|
+
|
45
|
+
columns = ANSI::Columns.new(list, :padding=>2)
|
46
|
+
|
47
|
+
columns.to_s(4)
|
48
|
+
|
49
|
+
The output will be:
|
50
|
+
|
51
|
+
a d g j
|
52
|
+
b e h k
|
53
|
+
c f i l
|
54
|
+
|
55
|
+
## Alignment
|
56
|
+
|
57
|
+
Columns can also be aligned either left or right.
|
58
|
+
|
59
|
+
list = %w{xx xx xx yy y yy z zz z}
|
60
|
+
|
61
|
+
columns = ANSI::Columns.new(list, :align=>:right)
|
62
|
+
|
63
|
+
columns.to_s(3)
|
64
|
+
|
65
|
+
The output will be:
|
66
|
+
|
67
|
+
xx yy z
|
68
|
+
xx y zz
|
69
|
+
xx yy z
|
70
|
+
|
71
|
+
## Format
|
72
|
+
|
73
|
+
Lastly, columns can be augmented with ANSI codes. This is done through
|
74
|
+
a formatting block. The block can take up to three parameters, the cell
|
75
|
+
content, the column and row numbers, or the cell and the column and row
|
76
|
+
numbers.
|
77
|
+
|
78
|
+
list = %w{a b c d e f g h i j k l}
|
79
|
+
|
80
|
+
columns = ANSI::Columns.new(list){ |c,r| r % 2 == 0 ? :red : :blue }
|
81
|
+
|
82
|
+
out = columns.to_s(4)
|
83
|
+
|
84
|
+
out.assert == (
|
85
|
+
"\e[31ma \e[0m\e[31md \e[0m\e[31mg \e[0m\e[31mj \e[0m\n" +
|
86
|
+
"\e[34mb \e[0m\e[34me \e[0m\e[34mh \e[0m\e[34mk \e[0m\n" +
|
87
|
+
"\e[31mc \e[0m\e[31mf \e[0m\e[31mi \e[0m\e[31ml \e[0m\n"
|
88
|
+
)
|
89
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# ANSI::Table
|
2
|
+
|
3
|
+
The ANSI::Table class can be used to output tabular data with nicely
|
4
|
+
formated ASCII cell borders.
|
5
|
+
|
6
|
+
require 'ansi/table'
|
7
|
+
|
8
|
+
The constructor takes an 2-dimensional array.
|
9
|
+
|
10
|
+
data = [
|
11
|
+
[ 10, 20, 30 ],
|
12
|
+
[ 20, 10, 20 ],
|
13
|
+
[ 50, 40, 20 ]
|
14
|
+
]
|
15
|
+
|
16
|
+
table = ANSI::Table.new(data)
|
17
|
+
|
18
|
+
table.to_s
|
19
|
+
|
20
|
+
The output will be:
|
21
|
+
|
22
|
+
+----+----+----+
|
23
|
+
| 10 | 20 | 30 |
|
24
|
+
| 20 | 10 | 20 |
|
25
|
+
| 50 | 40 | 20 |
|
26
|
+
+----+----+----+
|
27
|
+
|
28
|
+
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# ANSI::Diff
|
2
|
+
|
3
|
+
require 'ansi/diff'
|
4
|
+
|
5
|
+
a = 'abcYefg'
|
6
|
+
b = 'abcXefg'
|
7
|
+
|
8
|
+
diff = ANSI::Diff.new(a,b)
|
9
|
+
|
10
|
+
diff.to_s.assert == "\e[31mabc\e[0m\e[33mYefg\e[0m\n\e[31mabc\e[0mXefg"
|
11
|
+
|
12
|
+
Try another.
|
13
|
+
|
14
|
+
a = 'abc'
|
15
|
+
b = 'abcdef'
|
16
|
+
|
17
|
+
diff = ANSI::Diff.new(a,b)
|
18
|
+
|
19
|
+
diff.to_s.assert == "\e[31mabc\e[0m\n\e[31mabc\e[0mdef"
|
20
|
+
|
21
|
+
And another.
|
22
|
+
|
23
|
+
a = 'abcXXXghi'
|
24
|
+
b = 'abcdefghi'
|
25
|
+
|
26
|
+
diff = ANSI::Diff.new(a,b)
|
27
|
+
|
28
|
+
diff.to_s.assert == "\e[31mabc\e[0m\e[33mXXXghi\e[0m\n\e[31mabc\e[0mdefghi"
|
29
|
+
|
30
|
+
And another.
|
31
|
+
|
32
|
+
a = 'abcXXXdefghi'
|
33
|
+
b = 'abcdefghi'
|
34
|
+
|
35
|
+
diff = ANSI::Diff.new(a,b)
|
36
|
+
|
37
|
+
diff.to_s.assert == "\e[31mabc\e[0m\e[33mXXX\e[0m\e[35mdefghi\e[0m\n\e[31mabc\e[0m\e[35mdefghi\e[0m"
|
38
|
+
|
39
|
+
Comparison that is mostly different.
|
40
|
+
|
41
|
+
a = 'abcpppz123'
|
42
|
+
b = 'abcxyzzz43'
|
43
|
+
|
44
|
+
diff = ANSI::Diff.new(a,b)
|
45
|
+
|
46
|
+
diff.to_s.assert == "\e[31mabc\e[0m\e[33mpppz123\e[0m\n\e[31mabc\e[0mxyzzz43"
|
47
|
+
|