aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/tasks
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-04-21 16:03:21 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-04-21 16:03:21 -0700
commit5afc2abee66cda565f2cb890fe11c3d8e918d882 (patch)
treec1c2608af14e488435997fb5c5cfa39788fbbe3d /railties/lib/tasks
parent696375ac628bd41edf3a8c8c00dde196696f4add (diff)
parentf49e3441280380ec810d54bd5a77a7e699415efb (diff)
downloadrails-5afc2abee66cda565f2cb890fe11c3d8e918d882.tar.gz
rails-5afc2abee66cda565f2cb890fe11c3d8e918d882.tar.bz2
rails-5afc2abee66cda565f2cb890fe11c3d8e918d882.zip
Merge branch 'master' into cherry
Diffstat (limited to 'railties/lib/tasks')
-rw-r--r--railties/lib/tasks/framework.rake4
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