Real time updates
To check the solution, one has to run rake command every time to know progress status. Smells like there is a need for automation.
I used kicker which is a lean, agnostic, flexible file-change watcher using OS X FSEvents.
You may add this simple .kick file to the koans project.
process do |files|
To start getting updates, type following command.
Now whenever you modify any test and save the file, kicker will show you the current status.
To share solutions with everyone, I used git and pushed solutions to Github repo.
Pre fill commit message
This project saves all the current progress in .path_progress file. Sample file:
Whenever a koan is finished, koan number is automatically appended to .path_progress.
Now trick is to pre fill git commit message with the current progress. I created this prepare-commit-msg hook to solve this problem.
commitMessage=$(./`git rev-parse — git-dir`/get-progress)
echo “Finish koan $commitMessage\n $(cat $1)” > $1
This hook uses another script get-progress which prints the current progress(i.e. koan number).
PROGRESS_FILE_NAME = ‘.path_progress’
contents = 
File.open(PROGRESS_FILE_NAME,’r’) do |f|
contents = f.read.to_s.gsub(/\s/,’’).split(‘,’)
Duplicates in .path_progress
Every time rake is run, current progress (i.e. koan number) is added to .path_progress which leads to unnecessary file changes. This creates further problems when .path_progress is added to git repo.
Time to fix neo.rb. Add following code to beginning of add_progress method.
@_contents = progress
# return if already added to progress
return if prog.to_i == progress.last.to_i
Recommend in case you find these little tweaks useful.