summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
diff options
context:
space:
mode:
authorTom Black <[email protected]>2018-10-16 23:24:18 -0700
committerTom Black <[email protected]>2018-10-16 23:24:18 -0700
commit1b646f82c67e7c38df08113bcc3323c7aaf4639f (patch)
treed932a3d054ceba5ce5be69e42453998787cf4d9f /Rakefile
parenta4a7e23038e26ecc63d94b5e815c36dff2ffb433 (diff)
downloadruby2d-1b646f82c67e7c38df08113bcc3323c7aaf4639f.tar.gz
ruby2d-1b646f82c67e7c38df08113bcc3323c7aaf4639f.zip
Move `String#colorize` to a separate file to require
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile14
1 files changed, 3 insertions, 11 deletions
diff --git a/Rakefile b/Rakefile
index b91fa6a..99382e5 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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)