From 7a99dc0ac2f36694b1cc11418129b8c39bb9044d Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Mon, 20 Apr 2009 11:01:32 -0500 Subject: Update rails:template task to expand file paths [#2528 state:resolved] Signed-off-by: Pratik Naik --- railties/lib/tasks/framework.rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'railties') diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index 191c9361ff..b6f2f2bc18 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -83,7 +83,9 @@ 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"] + template = File.expand_path(template) if template !~ %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} + Rails::TemplateRunner.new(template) end namespace :update do -- cgit v1.2.3