From a6f2fdccd50d6ade1b1d11fce6f8ca515a963117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Kar=C3=A9kinian?= Date: Thu, 14 Feb 2013 17:44:39 +0100 Subject: [PATCH] Fixed undefined variable timezone in Rakefile It made it impossible to create a new page on 2.1 --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 07cdfd9..144e1a8 100644 --- a/Rakefile +++ b/Rakefile @@ -135,7 +135,7 @@ task :new_post, :title do |t, args| title = get_stdin("Enter a title for your post: ") end raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(configuration[:source]) - time = now_in_timezone(configuration[:timezone]) + time = now_in_timezone(configuration[:timezone]) mkdir_p "#{configuration[:source]}/#{configuration[:posts_dir]}" filename = "#{configuration[:source]}/#{configuration[:posts_dir]}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{configuration[:new_post_ext]}" if File.exist?(filename) @@ -178,7 +178,7 @@ task :new_page, :filename do |t, args| abort("rake aborted!") if ask("#{file} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' end puts "Creating new page: #{file}" - time = now_in_timezone(timezone) + time = now_in_timezone(configuration[:timezone]) open(file, 'w') do |page| page.puts "---" page.puts "layout: page"