lib/infect/command.rb in infect-0.0.1 vs lib/infect/command.rb in infect-0.0.2
- old
+ new
@@ -1,13 +1,16 @@
+require 'open-uri'
+require 'fileutils'
+
module Infect
class Command
def self.build(command, args)
case command.to_sym
when :bundle
Bundle.new(args)
else
- puts "WARNING: #{command} is not a valid command, ignorning"
+ $stderr.puts "WARNING: #{command} is not a valid command, ignorning"
end
end
protected
@@ -27,13 +30,9 @@
end
def colorize(code, str)
"\e[#{code}m#{str}\e[0m"
end
- #def red(str); colorize(31, str); end
- #def green(str); colorize(32, str); end
- #def yellow(str); colorize(33, str); end
-
def notice(str)
puts colorize(32, str)
end
def error(str)
puts colorize(31, str)