Simplified output for running against multiple rubies.
This commit is contained in:
@@ -2,6 +2,7 @@ RUBIES = ENV['KOAN_RUBIES'] || %w(ruby-1.8.7-p299,ruby-1.9.2-p0,jruby-1.5.2,jrub
|
|||||||
|
|
||||||
task :runall do
|
task :runall do
|
||||||
chdir('src') do
|
chdir('src') do
|
||||||
|
ENV['SIMPLE_KOAN_OUTPUT'] = 'true'
|
||||||
sh "rvm #{RUBIES} path_to_enlightenment.rb"
|
sh "rvm #{RUBIES} path_to_enlightenment.rb"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -58,6 +58,11 @@ class Object
|
|||||||
end
|
end
|
||||||
|
|
||||||
module EdgeCase
|
module EdgeCase
|
||||||
|
class << self
|
||||||
|
def simple_output
|
||||||
|
ENV['SIMPLE_KOAN_OUTPUT'] == 'true'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
module Color
|
module Color
|
||||||
#shamelessly stolen (and modified) from redgreen
|
#shamelessly stolen (and modified) from redgreen
|
||||||
@@ -185,6 +190,18 @@ module EdgeCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def end_screen
|
def end_screen
|
||||||
|
if EdgeCase.simple_output
|
||||||
|
boring_end_screen
|
||||||
|
else
|
||||||
|
artistic_end_screen
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def boring_end_screen
|
||||||
|
puts "Mountains are again merely mountains"
|
||||||
|
end
|
||||||
|
|
||||||
|
def artistic_end_screen
|
||||||
completed = <<-ENDTEXT
|
completed = <<-ENDTEXT
|
||||||
,, , ,,
|
,, , ,,
|
||||||
: ::::, :::,
|
: ::::, :::,
|
||||||
|
|||||||
Reference in New Issue
Block a user