Skip to content

Commit

Permalink
Updated Rakfile to copy the main readme into the koan directory. Remo…
Browse files Browse the repository at this point in the history
…ved SOURCE directory reference.
  • Loading branch information
jimweirich committed Dec 21, 2009
1 parent 4fdf060 commit 0b58d57
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ require 'rake/rdoctask'

SRC_DIR = 'src'
PROB_DIR = 'koans'
SOLUTION_DIR = 'solution'
DIST_DIR = 'dist'

SRC_FILES = FileList["#{SRC_DIR}/*"]
KOAN_FILES = SRC_FILES.pathmap("#{PROB_DIR}/%f")
SOLUTION_FILES = SRC_FILES.pathmap("#{SOLUTION_DIR}/%f")

TAR_FILE = "#{DIST_DIR}/rubykoans.tgz"
ZIP_FILE = "#{DIST_DIR}/rubykoans.zip"
Expand Down Expand Up @@ -64,7 +62,6 @@ end

directory DIST_DIR
directory PROB_DIR
directory SOLUTION_DIR

file ZIP_FILE => KOAN_FILES + [DIST_DIR] do
sh "zip #{ZIP_FILE} #{PROB_DIR}/*"
Expand Down Expand Up @@ -92,11 +89,15 @@ task :check do
end

task :regen => [:clobber_koans, :gen]
task :gen => KOAN_FILES
task :gen => KOAN_FILES + [PROB_DIR + "/README.rdoc"]
task :clobber_koans do
rm_r PROB_DIR
end

file PROB_DIR + "/README.rdoc" => "README.rdoc" do |t|
cp "README.rdoc", t.name
end

SRC_FILES.each do |koan_src|
file koan_src.pathmap("#{PROB_DIR}/%f") => [PROB_DIR, koan_src] do |t|
Koans.make_koan_file koan_src, t.name
Expand Down

0 comments on commit 0b58d57

Please sign in to comment.