From 42a00b3426c136726e7af1b71911d96099daced8 Mon Sep 17 00:00:00 2001 From: Masanori Kado Date: Mon, 15 Jan 2018 00:14:47 +0900 Subject: [PATCH] review-init creates lib/tasks for custom Rakefile, ref #921 --- bin/review-init | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bin/review-init b/bin/review-init index e02ec43d1..7cd405c1b 100755 --- a/bin/review-init +++ b/bin/review-init @@ -130,7 +130,18 @@ def generate_texmacro(dir) end def generate_rakefile(dir) - FileUtils.cp @review_dir + '/test/sample-book/src/Rakefile', dir + FileUtils.mkdir_p dir + '/lib/tasks' + + File.open(dir + '/Rakefile', 'w') do |file| + file.write <<-EOS +Dir.glob('lib/tasks/*.rake').each do |file| + load(file) +end +EOS + end + + FileUtils.cp @review_dir + '/test/sample-book/src/Rakefile', + dir + '/lib/tasks/review.rake' end def generate_locale(dir)