From 631069f427764884855efc03660dbaec363dd565 Mon Sep 17 00:00:00 2001 From: Daniel Escoz Date: Sun, 25 Aug 2013 12:29:21 +0200 Subject: [PATCH] Made blog_url becalled just once... ...and stored in the `url` variable. --- Rakefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 177a9e9..884fb77 100644 --- a/Rakefile +++ b/Rakefile @@ -337,8 +337,9 @@ task :setup_github_pages, :repo do |t, args| end end end + url = blog_url(user, project) jekyll_config = IO.read('_config.yml') - jekyll_config.sub!(/^url:.*$/, "url: #{blog_url(user, project)}") + jekyll_config.sub!(/^url:.*$/, "url: #{url}") File.open('_config.yml', 'w') do |f| f.write jekyll_config end @@ -358,7 +359,7 @@ task :setup_github_pages, :repo do |t, args| f.write rakefile end end - puts "\n---\n## Now you can deploy to #{blog_url(user, project)} with `rake deploy` ##" + puts "\n---\n## Now you can deploy to #{url} with `rake deploy` ##" end def ok_failed(condition)