aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-02-27 03:15:44 +0000
committerRick Olson <technoweenie@gmail.com>2007-02-27 03:15:44 +0000
commit88876163f9fa830a846e9b97a8347248837b6613 (patch)
tree629902cd28f73c4e4f1cc3268bb4082033d3aeac /railties
parent81ae38580baca3a8203f97d6c5088cfb3bbba6a0 (diff)
downloadrails-88876163f9fa830a846e9b97a8347248837b6613.tar.gz
rails-88876163f9fa830a846e9b97a8347248837b6613.tar.bz2
rails-88876163f9fa830a846e9b97a8347248837b6613.zip
boot.rb sets RAILS_ROOT, so remove that. Install http plugins inside a Dir.chdir block so that the cwd doesn't change
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6248 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/commands/plugin.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/railties/lib/commands/plugin.rb b/railties/lib/commands/plugin.rb
index c5ee3e2896..af23197549 100644
--- a/railties/lib/commands/plugin.rb
+++ b/railties/lib/commands/plugin.rb
@@ -240,11 +240,12 @@ class Plugin
def install_using_http(options = {})
root = rails_env.root
mkdir_p "#{root}/vendor/plugins"
- Dir.chdir "#{root}/vendor/plugins"
- puts "fetching from '#{uri}'" if $verbose
- fetcher = RecursiveHTTPFetcher.new(uri)
- fetcher.quiet = true if options[:quiet]
- fetcher.fetch
+ Dir.chdir "#{root}/vendor/plugins" do
+ puts "fetching from '#{uri}'" if $verbose
+ fetcher = RecursiveHTTPFetcher.new(uri)
+ fetcher.quiet = true if options[:quiet]
+ fetcher.fetch
+ end
end
def svn_command(cmd, options = {})
@@ -914,5 +915,4 @@ class RecursiveHTTPFetcher
end
end
-RAILS_ROOT = RailsEnvironment.default.root unless Object.const_defined?(:RAILS_ROOT)
Commands::Plugin.parse!