Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ruby3.2] Replace File.exists? with File.file? #117

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ release_ops_path = File.expand_path('../releaseops/lib', __FILE__)
# we use a submodule because it doesn't depend on anything else (*cough* bundler)
# and can be shared across projects
#
if File.exists?(release_ops_path)
if File.file?(release_ops_path)
require File.join(release_ops_path, 'releaseops')

# sets up the multi-ruby zk:test_all rake tasks
Expand Down
2 changes: 1 addition & 1 deletion ext/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ZKRB_WRAPPER = %w[zkrb_wrapper.c zkrb_wrapper.h]

namespace :zkrb do
task :clean do
if File.exists?('Makefile')
if File.file?('Makefile')
sh 'make clean'
rm 'Makefile' # yep, regenerate this
else
Expand Down
4 changes: 2 additions & 2 deletions ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def safe_sh(cmd)
else
puts "Building zkc."

unless File.exists?('c')
unless File.file?('c')
safe_sh "tar xzf #{BUNDLE} 2>&1"
PATCHES.each do |patch|
safe_sh "patch -p0 < #{patch} 2>&1"
Expand Down Expand Up @@ -87,7 +87,7 @@ def safe_sh(cmd)
%w[a la dylib].each do |ext|
origin_lib_name = "libzookeeper_#{stmt}.#{ext}"
dest_lib_name = "libzookeeper_#{stmt}_gem.#{ext}"
system("cp -f #{origin_lib_name} #{dest_lib_name}") if File.exists?(origin_lib_name)
system("cp -f #{origin_lib_name} #{dest_lib_name}") if File.file?(origin_lib_name)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/zookeeper/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Zookeeper
VERSION = '1.5.3'
VERSION = '1.5.4'
DRIVER_VERSION = '3.4.5'
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

release_ops_path = File.expand_path('../../releaseops/lib', __FILE__)

if File.exists?(release_ops_path)
if File.file?(release_ops_path)
require File.join(release_ops_path, 'releaseops')
ReleaseOps::SimpleCov.maybe_start
end
Expand Down