From 754a7694ad3455f44f5e15bd35b313dade4f190b Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Wed, 22 Sep 2010 14:50:25 -0400 Subject: [PATCH 1/2] Added else clause if progress file is not there. --- src/edgecase.rb | 68 +++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/src/edgecase.rb b/src/edgecase.rb index 9d31ea6..def4acc 100644 --- a/src/edgecase.rb +++ b/src/edgecase.rb @@ -110,6 +110,8 @@ module EdgeCase File.open(PROGRESS_FILE_NAME,'r') do |f| @_contents = f.read.to_s.gsub(/\s/,'').split(',') end + else + @_contents = [] end end @_contents @@ -169,39 +171,39 @@ module EdgeCase def end_screen completed = <<-ENDTEXT - ,, , ,, - : ::::, :::, - , ,,: :::::::::::::,, :::: : , - , ,,, ,:::::::::::::::::::, ,: ,: ,, - :, ::, , , :, ,:::::::::::::::::::, ::: ,:::: - : : ::, ,:::::::: ::, ,:::: - , ,::::: :,:::::::,::::, - ,: , ,:,,: ::::::::::::: - ::,: ,,:::, ,::::::::::::, - ,:::, :,,::: ::::::::::::, - ,::: :::::::, Mountains are again merely mountains ,:::::::::::: - :::,,,:::::: :::::::::::: - ,:::::::::::, ::::::::::::, - :::::::::::, ,:::::::::::: - ::::::::::::: ,:::::::::::: -,:::::::::::: Ruby Koans ::::::::::::, -::::::::::::: ,::::::::::::, -,:::::::::::, , :::::::::::: - ,:::::::::::::, brought to you by ,,::::::::::::, - :::::::::::::: ,:::::::::::: - ::::::::::::::, ::::::::::::: - ::::::::::::, EdgeCase Software Artisans , :::::::::::: - :,::::::::: :::: ::::::::::::: - ,::::::::::: ,: ,,:::::::::::::, - :::::::::::: ,::::::::::::::, - :::::::::::::::::, :::::::::::::::: - :::::::::::::::::::, :::::::::::::::: - ::::::::::::::::::::::, ,::::,:, , ::::,::: - :::::::::::::::::::::::, ::,: ::,::, ,,: :::: - ,:::::::::::::::::::: ::,, , ,, ,:::: - ,:::::::::::::::: ::,, , ,:::, - ,:::: , ,, - ,,, + ,, , ,, + : ::::, :::, + , ,,: :::::::::::::,, :::: : , + , ,,, ,:::::::::::::::::::, ,: ,: ,, + :, ::, , , :, ,:::::::::::::::::::, ::: ,:::: + : : ::, ,:::::::: ::, ,:::: + , ,::::: :,:::::::,::::, + ,: , ,:,,: ::::::::::::: + ::,: ,,:::, ,::::::::::::, + ,:::, :,,::: ::::::::::::, + ,::: :::::::, Mountains are again merely mountains ,:::::::::::: + :::,,,:::::: :::::::::::: + ,:::::::::::, ::::::::::::, + :::::::::::, ,:::::::::::: + ::::::::::::: ,:::::::::::: +,:::::::::::: Ruby Koans ::::::::::::, +::::::::::::: ,::::::::::::, +,:::::::::::, , :::::::::::: + ,:::::::::::::, brought to you by ,,::::::::::::, + :::::::::::::: ,:::::::::::: + ::::::::::::::, ::::::::::::: + ::::::::::::, EdgeCase Software Artisans , :::::::::::: + :,::::::::: :::: ::::::::::::: + ,::::::::::: ,: ,,:::::::::::::, + :::::::::::: ,::::::::::::::, + :::::::::::::::::, :::::::::::::::: + :::::::::::::::::::, :::::::::::::::: + ::::::::::::::::::::::, ,::::,:, , ::::,::: + :::::::::::::::::::::::, ::,: ::,::, ,,: :::: + ,:::::::::::::::::::: ::,, , ,, ,:::: + ,:::::::::::::::: ::,, , ,:::, + ,:::: , ,, + ,,, ENDTEXT puts completed end From b4e907e30e6a8f6c52da16e120146b63b60dbd34 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Wed, 22 Sep 2010 14:54:42 -0400 Subject: [PATCH 2/2] Updated Koans directory --- koans/edgecase.rb | 68 ++++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/koans/edgecase.rb b/koans/edgecase.rb index 9d31ea6..def4acc 100644 --- a/koans/edgecase.rb +++ b/koans/edgecase.rb @@ -110,6 +110,8 @@ module EdgeCase File.open(PROGRESS_FILE_NAME,'r') do |f| @_contents = f.read.to_s.gsub(/\s/,'').split(',') end + else + @_contents = [] end end @_contents @@ -169,39 +171,39 @@ module EdgeCase def end_screen completed = <<-ENDTEXT - ,, , ,, - : ::::, :::, - , ,,: :::::::::::::,, :::: : , - , ,,, ,:::::::::::::::::::, ,: ,: ,, - :, ::, , , :, ,:::::::::::::::::::, ::: ,:::: - : : ::, ,:::::::: ::, ,:::: - , ,::::: :,:::::::,::::, - ,: , ,:,,: ::::::::::::: - ::,: ,,:::, ,::::::::::::, - ,:::, :,,::: ::::::::::::, - ,::: :::::::, Mountains are again merely mountains ,:::::::::::: - :::,,,:::::: :::::::::::: - ,:::::::::::, ::::::::::::, - :::::::::::, ,:::::::::::: - ::::::::::::: ,:::::::::::: -,:::::::::::: Ruby Koans ::::::::::::, -::::::::::::: ,::::::::::::, -,:::::::::::, , :::::::::::: - ,:::::::::::::, brought to you by ,,::::::::::::, - :::::::::::::: ,:::::::::::: - ::::::::::::::, ::::::::::::: - ::::::::::::, EdgeCase Software Artisans , :::::::::::: - :,::::::::: :::: ::::::::::::: - ,::::::::::: ,: ,,:::::::::::::, - :::::::::::: ,::::::::::::::, - :::::::::::::::::, :::::::::::::::: - :::::::::::::::::::, :::::::::::::::: - ::::::::::::::::::::::, ,::::,:, , ::::,::: - :::::::::::::::::::::::, ::,: ::,::, ,,: :::: - ,:::::::::::::::::::: ::,, , ,, ,:::: - ,:::::::::::::::: ::,, , ,:::, - ,:::: , ,, - ,,, + ,, , ,, + : ::::, :::, + , ,,: :::::::::::::,, :::: : , + , ,,, ,:::::::::::::::::::, ,: ,: ,, + :, ::, , , :, ,:::::::::::::::::::, ::: ,:::: + : : ::, ,:::::::: ::, ,:::: + , ,::::: :,:::::::,::::, + ,: , ,:,,: ::::::::::::: + ::,: ,,:::, ,::::::::::::, + ,:::, :,,::: ::::::::::::, + ,::: :::::::, Mountains are again merely mountains ,:::::::::::: + :::,,,:::::: :::::::::::: + ,:::::::::::, ::::::::::::, + :::::::::::, ,:::::::::::: + ::::::::::::: ,:::::::::::: +,:::::::::::: Ruby Koans ::::::::::::, +::::::::::::: ,::::::::::::, +,:::::::::::, , :::::::::::: + ,:::::::::::::, brought to you by ,,::::::::::::, + :::::::::::::: ,:::::::::::: + ::::::::::::::, ::::::::::::: + ::::::::::::, EdgeCase Software Artisans , :::::::::::: + :,::::::::: :::: ::::::::::::: + ,::::::::::: ,: ,,:::::::::::::, + :::::::::::: ,::::::::::::::, + :::::::::::::::::, :::::::::::::::: + :::::::::::::::::::, :::::::::::::::: + ::::::::::::::::::::::, ,::::,:, , ::::,::: + :::::::::::::::::::::::, ::,: ::,::, ,,: :::: + ,:::::::::::::::::::: ::,, , ,, ,:::: + ,:::::::::::::::: ::,, , ,:::, + ,:::: , ,, + ,,, ENDTEXT puts completed end