diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-17 18:54:55 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-17 18:54:55 +0000 |
commit | ab9e4c0eaacba34c9f1d16cf34c82e0e906edad5 (patch) | |
tree | 968f6acc717f524c8ff9bae281663016452da07d /railties/lib/tasks | |
parent | 0f6c86ff40d0b0efe672ae76f2b5b536feaf7255 (diff) | |
download | rails-ab9e4c0eaacba34c9f1d16cf34c82e0e906edad5.tar.gz rails-ab9e4c0eaacba34c9f1d16cf34c82e0e906edad5.tar.bz2 rails-ab9e4c0eaacba34c9f1d16cf34c82e0e906edad5.zip |
Ruby 1.9 compatibility. References #1689.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8431 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/tasks')
-rw-r--r-- | railties/lib/tasks/documentation.rake | 4 | ||||
-rw-r--r-- | railties/lib/tasks/framework.rake | 2 | ||||
-rw-r--r-- | railties/lib/tasks/testing.rake | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/tasks/documentation.rake b/railties/lib/tasks/documentation.rake index 41e52f1371..331b2450a3 100644 --- a/railties/lib/tasks/documentation.rake +++ b/railties/lib/tasks/documentation.rake @@ -65,11 +65,11 @@ namespace :doc do options << '-T html' files.include("#{plugin_base}/lib/**/*.rb") - if File.exists?("#{plugin_base}/README") + if File.exist?("#{plugin_base}/README") files.include("#{plugin_base}/README") options << "--main '#{plugin_base}/README'" end - files.include("#{plugin_base}/CHANGELOG") if File.exists?("#{plugin_base}/CHANGELOG") + files.include("#{plugin_base}/CHANGELOG") if File.exist?("#{plugin_base}/CHANGELOG") options << files.to_s diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index ebc24f46af..77f74aa156 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -105,7 +105,7 @@ namespace :rails do require 'railties_path' project_dir = RAILS_ROOT + '/public/javascripts/' scripts = Dir[RAILTIES_PATH + '/html/javascripts/*.js'] - scripts.reject!{|s| File.basename(s) == 'application.js'} if File.exists?(project_dir + 'application.js') + scripts.reject!{|s| File.basename(s) == 'application.js'} if File.exist?(project_dir + 'application.js') FileUtils.cp(scripts, project_dir) end diff --git a/railties/lib/tasks/testing.rake b/railties/lib/tasks/testing.rake index f495031b79..dc513108fc 100644 --- a/railties/lib/tasks/testing.rake +++ b/railties/lib/tasks/testing.rake @@ -13,11 +13,11 @@ def recent_tests(source_pattern, test_path, touched_since = 10.minutes.ago) # For modified files in app/ run the tests for it. ex. /test/functional/account_controller.rb test = "#{modified_test_path}/#{source_file}_test.rb" - tests.push test if File.exists?(test) + tests.push test if File.exist?(test) # For modified files in app, run tests in subdirs too. ex. /test/functional/account/*_test.rb test = "#{modified_test_path}/#{File.basename(path, '.rb').sub("_controller","")}" - FileList["#{test}/*_test.rb"].each { |f| tests.push f } if File.exists?(test) + FileList["#{test}/*_test.rb"].each { |f| tests.push f } if File.exist?(test) return tests |