Skip to content

Commit 48872df

Browse files
author
Clemens Kofler
committed
Use File.exist? instead of deprecated File.exists?
1 parent daf2f21 commit 48872df

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/dashing/app.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def authenticated?(token)
4343
set :auth_token, nil
4444
set :template_languages, %i[html erb]
4545

46-
if File.exists?(settings.history_file)
46+
if File.exist?(settings.history_file)
4747
set :history, YAML.load_file(settings.history_file)
4848
else
4949
set :history, {}
@@ -171,7 +171,7 @@ def require_glob(relative_glob)
171171
end
172172

173173
settings_file = File.join(settings.root, 'config/settings.rb')
174-
require settings_file if File.exists?(settings_file)
174+
require settings_file if File.exist?(settings_file)
175175

176176
{}.to_json # Forces your json codec to initialize (in the event that it is lazily loaded). Does this before job threads start.
177177
job_path = ENV["JOB_PATH"] || 'jobs'

test/test_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def temp
3333
yield path
3434
ensure
3535
Dir.chdir WORKING_DIRECTORY
36-
FileUtils.rm_rf(path) if File.exists?(path)
36+
FileUtils.rm_rf(path) if File.exist?(path)
3737
end
3838

3939
module Dashing

0 commit comments

Comments
 (0)