Merge pull request #68 from liuhenry/master
authorMatthew Boston <matthew.boston@gmail.com>
Fri, 27 Jan 2012 18:51:25 +0000 (10:51 -0800)
committerMatthew Boston <matthew.boston@gmail.com>
Fri, 27 Jan 2012 18:51:25 +0000 (10:51 -0800)
Fixed color support in OS X

README.rdoc
Rakefile

index fb6abb1..f8208bc 100644 (file)
@@ -41,6 +41,17 @@ If you don't have rake installed, just run `gem install rake`
 Any response for Ruby with a version number greater than 1.8 is fine (should be
 around 1.8.6 or more). Any version of rake will do.
 
+== Generating the Koans
+
+A fresh checkout will not include the koans, you will need to generate
+them.
+
+    [ruby_koans] $ rake gen                       # generates the koans directory
+
+If you need to regenerate the koans, thus wiping your current `koans`,
+
+    [ruby_koans] $ rake regen                     # regenerates the koans directory, wiping the original
+
 == The Path To Enlightenment
 
 You can run the tests through rake or by calling the file itself (rake is the
index 07da095..d35dfe3 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -88,14 +88,14 @@ end
 task :default => :walk_the_path
 
 task :walk_the_path do
-  cd 'koans'
+  cd PROB_DIR
   ruby 'path_to_enlightenment.rb'
 end
 
 if defined?(Rake::RDocTask)
   Rake::RDocTask.new do |rd|
     rd.main = "README.rdoc"
-    rd.rdoc_files.include("README.rdoc", "koans/*.rb")
+    rd.rdoc_files.include("README.rdoc", "${PROB_DIR}/*.rb")
   end
 end
 
@@ -140,7 +140,7 @@ end
 
 task :run do
   puts 'koans'
-  Dir.chdir("src") do
+  Dir.chdir("${SRC_DIR}") do
     puts "in #{Dir.pwd}"
     sh "ruby path_to_enlightenment.rb"
   end