Browse files

Update rails:template task to expand file paths [#2528 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
1 parent d7d93cd commit 7a99dc0ac2f36694b1cc11418129b8c39bb9044d @stephencelis stephencelis committed with lifo Apr 20, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 railties/lib/tasks/framework.rake
View
4 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

0 comments on commit 7a99dc0

Please sign in to comment.