Skip to content

Commit 4bcd8b0

Browse files
committed
Fixes deprecated File.exists?
1 parent 138e5c3 commit 4bcd8b0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

elasticsearch-api/Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace :test do
6565
filename = 'tmp/artifacts.json'
6666
`curl -s https://artifacts-api.elastic.co/v1/versions/#{version_number} -o #{filename}`
6767

68-
unless File.exists?("./#{filename}")
68+
unless File.exist?("./#{filename}")
6969
STDERR.puts '[!] Couldn\'t download artifacts file'
7070
exit 1
7171
end
@@ -82,7 +82,7 @@ namespace :test do
8282
puts 'Downloading zip file:'
8383
`curl -s #{zip_url} -o tmp/#{filename}`
8484

85-
unless File.exists?("./tmp/#{filename}")
85+
unless File.exist?("./tmp/#{filename}")
8686
STDERR.puts '[!] Couldn\'t download artifact'
8787
exit 1
8888
end

profile/benchmarking/benchmarking_tasks.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ namespace :benchmark do
164164
task :download_dataset do
165165
current_path = File.expand_path(File.dirname(__FILE__))
166166
data_path = [current_path, 'data'].join('/')
167-
unless File.exists?([data_path, 'stackoverflow.json'].join('/'))
167+
unless File.exist?([data_path, 'stackoverflow.json'].join('/'))
168168
`gsutil cp gs://clients-team-files/stackoverflow.json "#{data_path}/"`
169169
end
170170
end

rake_tasks/elasticsearch_tasks.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ namespace :elasticsearch do
8080
end
8181
puts "Successfully downloaded #{filename}"
8282

83-
unless File.exists?(filename)
83+
unless File.exist?(filename)
8484
STDERR.puts "[!] Couldn't download #{filename}"
8585
exit 1
8686
end

0 commit comments

Comments
 (0)