Skip to content

Commit 68d1ce3

Browse files
deivid-rodriguezolleolleolle
authored andcommitted
s/File.exists?/File.exist?/
1 parent 5ce7ec0 commit 68d1ce3

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Set up gems listed in the Gemfile.
22
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
33

4-
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
4+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])

lib/warbler/task.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Task < Rake::TaskLib
4242

4343
def initialize(name = nil, config = nil)
4444
@config = config
45-
if @config.nil? && File.exists?(Config::FILE)
45+
if @config.nil? && File.exist?(Config::FILE)
4646
@config = eval(File.read(Config::FILE), binding, Config::FILE, 0)
4747
end
4848
@config ||= Config.new
@@ -148,7 +148,7 @@ def define_extra_tasks
148148

149149
def define_config_task
150150
task "config" do
151-
if File.exists?(Warbler::Config::FILE) && ENV["FORCE"].nil?
151+
if File.exist?(Warbler::Config::FILE) && ENV["FORCE"].nil?
152152
puts "There's another bird sitting on my favorite branch"
153153
puts "(file '#{Warbler::Config::FILE}' already exists. Pass argument FORCE=1 to override)"
154154
elsif !File.directory?("config")

lib/warbler/traits/gemspec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def default_executable
5656
if ! @spec.executables.empty?
5757
exe_script = @spec.executables.first
5858
exe_path = File.join(@spec.bindir, exe_script) # bin/script
59-
if File.exists?(exe_path)
59+
if File.exist?(exe_path)
6060
exe_path
61-
elsif File.exists?("bin/#{exe_script}") # compatibility
61+
elsif File.exist?("bin/#{exe_script}") # compatibility
6262
"bin/#{exe_script}" # ... should probably remove this
6363
else
6464
raise "no `#{exe_script}` executable script found"

lib/warbler/traits/jbundler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def after_configure
3232
def add_jbundler_jars
3333
require 'jbundler/config'
3434
classpath = ::JBundler::Config.new.classpath_file
35-
if File.exists?( classpath )
35+
if File.exist?( classpath )
3636
require File.expand_path( classpath )
3737
else
3838
raise 'jbundler support needs jruby to create a local config: jruby -S jbundle install'

spec/warbler/application_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545
end
4646

4747
it "should copy a fresh config file into place" do
48-
expect(File.exists?("config/warble.rb")).to_not be true
48+
expect(File.exist?("config/warble.rb")).to_not be true
4949
ARGV.unshift "config"
5050
silence { Warbler::Application.new.run }
51-
expect(File.exists?("config/warble.rb")).to be true
51+
expect(File.exist?("config/warble.rb")).to be true
5252
end
5353

5454
it "should refuse to copy over an existing config file" do

0 commit comments

Comments
 (0)