Permalink
Browse files

Fixing Rakefile exception cases

  • Loading branch information...
1 parent 5887348 commit 14799a979aa0bfb958497c5571234ada8462bff1 @AliSoftware AliSoftware committed May 17, 2014
Showing with 8 additions and 10 deletions.
  1. +8 −10 Rakefile
View
18 Rakefile
@@ -6,8 +6,10 @@ task :bootstrap do
if system('which bundle')
sh "bundle install"
else
- $stderr.puts red("[!] Please install the bundler gem manually:\n" \
- ' $ [sudo] gem install bundler')
+ $stderr.puts "\033[0;31m" \
+ "[!] Please install the bundler gem manually:\n" \
+ ' $ [sudo] gem install bundler' \
+ "\e[0m"
exit 1
end
end
@@ -115,8 +117,10 @@ begin
task :default => :spec
rescue LoadError
- $stderr.puts red('[!] Some Rake tasks haven been disabled because the ' \
- 'environment couldn’t be loaded. Be sure to run `rake bootstrap` first.')
+ $stderr.puts "\033[0;31m" \
+ '[!] Some Rake tasks haven been disabled because the environment' \
+ ' couldn’t be loaded. Be sure to run `rake bootstrap` first.' \
+ "\e[0m"
end
# UI Helpers
@@ -147,9 +151,3 @@ end
def cyan(string)
"\n\033[0;36m#{string}\033[0m"
end
-
-# Colorizes a string to red.
-#
-def red(string)
- "\033[0;31m#{string}\e[0m"
-end

0 comments on commit 14799a9

Please sign in to comment.