From ddc74933472fd12a8e8e6147ab86795f264f7d83 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Mon, 20 Apr 2009 11:01:32 -0500 Subject: [PATCH] Update rails:template task to expand file paths. --- railties/lib/tasks/framework.rake | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index 191c936..47f87b6 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -83,7 +83,11 @@ namespace :rails do desc "Applies the template supplied by LOCATION=/path/to/template" task :template do require 'rails_generator/generators/applications/app/template_runner' - Rails::TemplateRunner.new(ENV["LOCATION"]) + template = ENV["LOCATION"] + if %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} !~ template + template = File.expand_path(template) + end + Rails::TemplateRunner.new(template) end namespace :update do -- 1.6.2.2