Index: Gemfile =================================================================== --- Gemfile (リビジョン 21325) +++ Gemfile (作業コピー) @@ -104,7 +104,7 @@ end local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") -if File.exists?(local_gemfile) +if File.exist?(local_gemfile) eval_gemfile local_gemfile end Index: app/models/import.rb =================================================================== --- app/models/import.rb (リビジョン 21325) +++ app/models/import.rb (作業コピー) @@ -111,7 +111,7 @@ # Returns true if the file to import exists def file_exists? - filepath.present? && File.exists?(filepath) + filepath.present? && File.exist?(filepath) end # Returns the headers as an array that Index: config/application.rb =================================================================== --- config/application.rb (リビジョン 21325) +++ config/application.rb (作業コピー) @@ -83,7 +83,7 @@ :same_site => :lax ) - if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) + if File.exist?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb')) end end Index: config/boot.rb =================================================================== --- config/boot.rb (リビジョン 21325) +++ config/boot.rb (作業コピー) @@ -3,4 +3,4 @@ # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) Index: config/routes.rb =================================================================== --- config/routes.rb (リビジョン 21325) +++ config/routes.rb (作業コピー) @@ -396,7 +396,7 @@ Dir.glob File.expand_path("#{Redmine::Plugin.directory}/*") do |plugin_dir| file = File.join(plugin_dir, "config/routes.rb") - if File.exists?(file) + if File.exist?(file) begin instance_eval File.read(file) rescue SyntaxError, StandardError => e Index: lib/redmine/scm/adapters/abstract_adapter.rb =================================================================== --- lib/redmine/scm/adapters/abstract_adapter.rb (リビジョン 21325) +++ lib/redmine/scm/adapters/abstract_adapter.rb (作業コピー) @@ -216,7 +216,7 @@ writable = false path = Redmine::Configuration['scm_stderr_log_file'].presence path ||= Rails.root.join("log/#{Rails.env}.scm.stderr.log").to_s - if File.exists?(path) + if File.exist?(path) if File.file?(path) && File.writable?(path) writable = true else Index: lib/redmine/thumbnail.rb =================================================================== --- lib/redmine/thumbnail.rb (リビジョン 21325) +++ lib/redmine/thumbnail.rb (作業コピー) @@ -36,7 +36,7 @@ return nil unless convert_available? return nil if is_pdf && !gs_available? - unless File.exists?(target) + unless File.exist?(target) # Make sure we only invoke Imagemagick if the file type is allowed mime_type = File.open(source) {|f| Marcel::MimeType.for(f)} return nil if !ALLOWED_TYPES.include? mime_type @@ -43,7 +43,7 @@ return nil if is_pdf && mime_type != "application/pdf" directory = File.dirname(target) - unless File.exists?(directory) + unless File.exist?(directory) FileUtils.mkdir_p directory end size_option = "#{size}x#{size}>" Index: lib/redmine/utils.rb =================================================================== --- lib/redmine/utils.rb (リビジョン 21325) +++ lib/redmine/utils.rb (作業コピー) @@ -51,7 +51,7 @@ def save_upload(upload, path) directory = File.dirname(path) - unless File.exists?(directory) + unless File.exist?(directory) FileUtils.mkdir_p directory end File.open(path, "wb") do |f| Index: lib/tasks/testing.rake =================================================================== --- lib/tasks/testing.rake (リビジョン 21325) +++ lib/tasks/testing.rake (作業コピー) @@ -31,7 +31,7 @@ desc "Creates a test subversion repository" task :subversion => :create_dir do repo_path = "tmp/test/subversion_repository" - unless File.exists?(repo_path) + unless File.exist?(repo_path) system "svnadmin create #{repo_path}" system "gunzip < test/fixtures/repositories/subversion_repository.dump.gz | svnadmin load #{repo_path}" end @@ -40,7 +40,7 @@ desc "Creates a test mercurial repository" task :mercurial => :create_dir do repo_path = "tmp/test/mercurial_repository" - unless File.exists?(repo_path) + unless File.exist?(repo_path) bundle_path = "test/fixtures/repositories/mercurial_repository.hg" system "hg init #{repo_path}" system "hg -R #{repo_path} pull #{bundle_path}" @@ -48,7 +48,7 @@ end def extract_tar_gz(prefix) - unless File.exists?("tmp/test/#{prefix}_repository") + unless File.exist?("tmp/test/#{prefix}_repository") # system "gunzip < test/fixtures/repositories/#{prefix}_repository.tar.gz | tar -xv -C tmp/test" system "tar -xvz -C tmp/test -f test/fixtures/repositories/#{prefix}_repository.tar.gz" end Index: test/extra/redmine_pm/repository_git_test_pm.rb =================================================================== --- test/extra/redmine_pm/repository_git_test_pm.rb (リビジョン 21325) +++ test/extra/redmine_pm/repository_git_test_pm.rb (作業コピー) @@ -74,7 +74,7 @@ Dir.mktmpdir do |dir| assert_success "clone", git_url, dir Dir.chdir(dir) do - assert File.exists?(File.join(dir, "#{filename}")) + assert File.exist?(File.join(dir, "#{filename}")) end end end Index: test/extra/redmine_pm/repository_subversion_test_pm.rb =================================================================== --- test/extra/redmine_pm/repository_subversion_test_pm.rb (リビジョン 21325) +++ test/extra/redmine_pm/repository_subversion_test_pm.rb (作業コピー) @@ -305,7 +305,7 @@ assert_success "update" # checks that the working copy was updated - assert File.exists?(File.join(dir, "#{filename}_copy")) + assert File.exist?(File.join(dir, "#{filename}_copy")) assert File.directory?(File.join(dir, "#{filename}_dir")) end end Index: test/functional/issues_controller_test.rb =================================================================== --- test/functional/issues_controller_test.rb (リビジョン 21325) +++ test/functional/issues_controller_test.rb (作業コピー) @@ -4716,7 +4716,7 @@ assert_equal 'text/plain', attachment.content_type assert_equal 'test file', attachment.description assert_equal 59, attachment.filesize - assert File.exists?(attachment.diskfile) + assert File.exist?(attachment.diskfile) assert_equal 59, File.size(attachment.diskfile) end @@ -4780,7 +4780,7 @@ attachment = Attachment.order('id DESC').first assert_equal 'testfile.txt', attachment.filename - assert File.exists?(attachment.diskfile) + assert File.exist?(attachment.diskfile) assert_nil attachment.container assert_select 'input[name=?][value=?]', 'attachments[p0][token]', attachment.token @@ -6289,7 +6289,7 @@ assert_equal 'text/plain', attachment.content_type assert_equal 'test file', attachment.description assert_equal 59, attachment.filesize - assert File.exists?(attachment.diskfile) + assert File.exist?(attachment.diskfile) assert_equal 59, File.size(attachment.diskfile) mail = ActionMailer::Base.deliveries.last @@ -6323,7 +6323,7 @@ attachment = Attachment.order('id DESC').first assert_equal 'testfile.txt', attachment.filename - assert File.exists?(attachment.diskfile) + assert File.exist?(attachment.diskfile) assert_nil attachment.container assert_select 'input[name=?][value=?]', 'attachments[p0][token]', attachment.token Index: test/unit/attachment_test.rb =================================================================== --- test/unit/attachment_test.rb (リビジョン 21325) +++ test/unit/attachment_test.rb (作業コピー) @@ -208,11 +208,11 @@ copy = a.copy copy.save! - assert File.exists?(diskfile) + assert File.exist?(diskfile) a.destroy - assert File.exists?(diskfile) + assert File.exist?(diskfile) copy.destroy - assert !File.exists?(diskfile) + assert !File.exist?(diskfile) end def test_create_should_auto_assign_content_type @@ -387,7 +387,7 @@ assert_equal 59, attachment.filesize assert_equal 'test', attachment.description assert_equal 'text/plain', attachment.content_type - assert File.exists?(attachment.diskfile) + assert File.exist?(attachment.diskfile) assert_equal 59, File.size(attachment.diskfile) end Index: test/unit/issue_import_test.rb =================================================================== --- test/unit/issue_import_test.rb (リビジョン 21325) +++ test/unit/issue_import_test.rb (作業コピー) @@ -366,10 +366,10 @@ def test_run_should_remove_the_file import = generate_import_with_mapping file_path = import.filepath - assert File.exists?(file_path) + assert File.exist?(file_path) import.run - assert !File.exists?(file_path) + assert !File.exist?(file_path) end def test_run_should_consider_project_shared_versions