aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/commands
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-12-10 05:54:46 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-12-10 05:54:46 +0000
commitb1ce7e4d4ada3eedc361d90b637ca06274a0ac3d (patch)
treeaffedc3593d216a6b5c4d1c27f84a0b3c7b19e46 /railties/lib/commands
parentc81fff2468bbf597457bf57cd599d2d4be77c715 (diff)
downloadrails-b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d.tar.gz
rails-b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d.tar.bz2
rails-b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d.zip
Ruby 1.9 compat: File.exists\? -> File.exist\? en masse. References #1689 [Pratik Naik]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8365 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/commands')
-rw-r--r--railties/lib/commands/plugin.rb4
-rw-r--r--railties/lib/commands/runner.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/commands/plugin.rb b/railties/lib/commands/plugin.rb
index ecef450ff4..a26f747dfb 100644
--- a/railties/lib/commands/plugin.rb
+++ b/railties/lib/commands/plugin.rb
@@ -214,12 +214,12 @@ class Plugin
def run_install_hook
install_hook_file = "#{rails_env.root}/vendor/plugins/#{name}/install.rb"
- load install_hook_file if File.exists? install_hook_file
+ load install_hook_file if File.exist? install_hook_file
end
def run_uninstall_hook
uninstall_hook_file = "#{rails_env.root}/vendor/plugins/#{name}/uninstall.rb"
- load uninstall_hook_file if File.exists? uninstall_hook_file
+ load uninstall_hook_file if File.exist? uninstall_hook_file
end
def install_using_export(options = {})
diff --git a/railties/lib/commands/runner.rb b/railties/lib/commands/runner.rb
index 62db8b75e1..926bc26344 100644
--- a/railties/lib/commands/runner.rb
+++ b/railties/lib/commands/runner.rb
@@ -41,7 +41,7 @@ require RAILS_ROOT + '/config/environment'
if code_or_file.nil?
$stderr.puts "Run '#{$0} -h' for help."
exit 1
-elsif File.exists?(code_or_file)
+elsif File.exist?(code_or_file)
eval(File.read(code_or_file))
else
eval(code_or_file)