From cc97ac61fcf099d27147d262a7470bc307f83971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Mon, 11 Feb 2013 12:42:47 +0100 Subject: [PATCH] full_configuration in Rakefile was uninitialized Switched to a variable instead and reusing it in `integrate` task as well. --- Rakefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index 07cdfd9..627fe6e 100644 --- a/Rakefile +++ b/Rakefile @@ -19,6 +19,7 @@ require 'octopress' ### otherwise, you're on your own ;-) configuration = Octopress::Configuration.read_configuration +full_stash_dir = "#{configuration[:source]}/#{configuration[:stash_dir]}" desc "Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. Rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]" task :install, :theme do |t, args| @@ -202,16 +203,15 @@ task :isolate, :filename do |t, args| else filename = get_stdin("Enter a post file name: ") end - full_configuration[:stash_dir] = "#{configuration[:source]}/#{configuration[:stash_dir]}" - FileUtils.mkdir(full_configuration[:stash_dir]) unless File.exist?(full_configuration[:stash_dir]) + FileUtils.mkdir(full_stash_dir) unless File.exist?(full_stash_dir) Dir.glob("#{configuration[:source]}/#{configuration[:posts_dir]}/*.*") do |post| - FileUtils.mv post, full_configuration[:stash_dir] unless post.include?(filename) + FileUtils.mv post, full_stash_dir unless post.include?(filename) end end desc "Move all stashed posts back into the posts directory, ready for site generation." task :integrate do - FileUtils.mv Dir.glob("#{configuration[:source]}/#{configuration[:stash_dir]}/*.*"), "#{configuration[:source]}/#{configuration[:posts_dir]}/" + FileUtils.mv Dir.glob("#{full_stash_dir}/*.*"), "#{configuration[:source]}/#{configuration[:posts_dir]}/" end desc "Clean out caches: .pygments-cache, .gist-cache, .sass-cache"