Permalink
Browse files

Simplified output for running against multiple rubies.

  • Loading branch information...
1 parent beb7fe5 commit 91f15dc69000bbc593ebd3d819513bb05c9253da @jimweirich jimweirich committed Sep 27, 2010
Showing with 18 additions and 0 deletions.
  1. +1 −0 rakelib/run.rake
  2. +17 −0 src/edgecase.rb
View
@@ -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
chdir('src') do
+ ENV['SIMPLE_KOAN_OUTPUT'] = 'true'
sh "rvm #{RUBIES} path_to_enlightenment.rb"
end
end
View
@@ -58,6 +58,11 @@ def ____(method=nil)
end
module EdgeCase
+ class << self
+ def simple_output
+ ENV['SIMPLE_KOAN_OUTPUT'] == 'true'
+ end
+ end
module Color
#shamelessly stolen (and modified) from redgreen
@@ -185,6 +190,18 @@ def show_progress
end
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
,, , ,,
: ::::, :::,

0 comments on commit 91f15dc

Please sign in to comment.