diff options
author | Stephen Celis <stephen@stephencelis.com> | 2009-04-20 11:01:32 -0500 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-04-21 17:44:35 +0100 |
commit | 7a99dc0ac2f36694b1cc11418129b8c39bb9044d (patch) | |
tree | 69df7a4f377d52c9e1ae7d1c87b940e5dccd51b6 /railties/lib/tasks/framework.rake | |
parent | d7d93cdb628e12e84e70a68578af1b1338a7df98 (diff) | |
download | rails-7a99dc0ac2f36694b1cc11418129b8c39bb9044d.tar.gz rails-7a99dc0ac2f36694b1cc11418129b8c39bb9044d.tar.bz2 rails-7a99dc0ac2f36694b1cc11418129b8c39bb9044d.zip |
Update rails:template task to expand file paths [#2528 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'railties/lib/tasks/framework.rake')
-rw-r--r-- | railties/lib/tasks/framework.rake | 4 |
1 files changed, 3 insertions, 1 deletions
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 |