diff options
| author | Tom Black <[email protected]> | 2018-10-16 23:24:18 -0700 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2018-10-16 23:24:18 -0700 |
| commit | 1b646f82c67e7c38df08113bcc3323c7aaf4639f (patch) | |
| tree | d932a3d054ceba5ce5be69e42453998787cf4d9f /Rakefile | |
| parent | a4a7e23038e26ecc63d94b5e815c36dff2ffb433 (diff) | |
| download | ruby2d-1b646f82c67e7c38df08113bcc3323c7aaf4639f.tar.gz ruby2d-1b646f82c67e7c38df08113bcc3323c7aaf4639f.zip | |
Move `String#colorize` to a separate file to require
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -1,18 +1,10 @@ require 'rspec/core/rake_task' +require_relative 'lib/ruby2d/colorize' require_relative 'lib/ruby2d/version' -# Helpers - -class String - def colorize(c); "\e[#{c}m#{self}\e[0m" end - def bold; colorize('1') end - def blue; colorize('1;34') end - def red; colorize('1;31') end -end - # Simple 2D is required for these tasks if `which simple2d`.empty? - puts "Simple 2D not found!".red + puts "Simple 2D not found!".error puts "Install before running Rake tasks." exit end @@ -22,7 +14,7 @@ def get_args end def print_task(task) - print "\n", "==> ".blue, task.bold, "\n\n" + print "\n", "==> ".info, task.bold, "\n\n" end def run_cmd(cmd) |
