aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/tasks
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-04-23 01:09:27 +0100
committerPratik Naik <pratiknaik@gmail.com>2009-04-23 01:09:27 +0100
commit5a1fe9039b33414b7088813712e03bbe38567cff (patch)
tree10e3a15c06494dd09c0324dca894ddcbb68ce582 /railties/lib/tasks
parent3384f073e35c5391deaeb209a62a485a0c4dd7b1 (diff)
parent7f6779c1d5e4ec7f642839caa7e86320720f77c8 (diff)
downloadrails-5a1fe9039b33414b7088813712e03bbe38567cff.tar.gz
rails-5a1fe9039b33414b7088813712e03bbe38567cff.tar.bz2
rails-5a1fe9039b33414b7088813712e03bbe38567cff.zip
Merge commit 'mainstream/master'
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