From c5f88905de065e4a5af805cc2d5aa5adb57d0110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20Dem=C4=8Denko?= Date: Mon, 9 Jun 2025 11:18:35 +0100 Subject: [PATCH] Use File.exist? instead of deprecated File.exists? --- lib/grack/git.rb | 2 +- lib/grack/server.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/grack/git.rb b/lib/grack/git.rb index 8469575..7bfc54a 100644 --- a/lib/grack/git.rb +++ b/lib/grack/git.rb @@ -57,7 +57,7 @@ def config(config_name) end def valid_repo? - return false unless File.exists?(repo) && File.realpath(repo) == repo + return false unless File.exist?(repo) && File.realpath(repo) == repo match = execute(%W(rev-parse --git-dir)).match(/\.$|\.git$/) diff --git a/lib/grack/server.rb b/lib/grack/server.rb index 59e0bc2..15474e6 100644 --- a/lib/grack/server.rb +++ b/lib/grack/server.rb @@ -163,7 +163,7 @@ def get_text_file # some of this borrowed from the Rack::File implementation def send_file(reqfile, content_type) reqfile = File.join(git.repo, reqfile) - return render_not_found unless File.exists?(reqfile) + return render_not_found unless File.exist?(reqfile) return render_not_found unless reqfile == File.realpath(reqfile)