summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/endpoint_specification.rb2
-rw-r--r--lib/bundler/installer.rb2
-rw-r--r--lib/bundler/runtime.rb12
-rw-r--r--lib/bundler/source/path.rb2
-rw-r--r--spec/install/gems/simple_case_spec.rb2
-rw-r--r--spec/runtime/load_spec.rb2
6 files changed, 11 insertions, 11 deletions
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb
index 4ab6b1b13d..8566f26562 100644
--- a/lib/bundler/endpoint_specification.rb
+++ b/lib/bundler/endpoint_specification.rb
@@ -61,7 +61,7 @@ module Bundler
end
def _local_specification
- eval(File.read(local_specification_path)) if @loaded_from && File.exists?(local_specification_path)
+ eval(File.read(local_specification_path)) if @loaded_from && File.exist?(local_specification_path)
end
def __swap__(spec)
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 3069843ac4..9fb31afd9a 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -172,7 +172,7 @@ module Bundler
next if executable == "bundle"
binstub_path = "#{bin_path}/#{executable}"
- if File.exists?(binstub_path) && !options[:force]
+ if File.exist?(binstub_path) && !options[:force]
exists << executable
next
end
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index 1809672b59..b3862711cb 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -106,7 +106,7 @@ module Bundler
def cache(custom_path = nil)
cache_path = cache_path(custom_path)
- FileUtils.mkdir_p(cache_path) unless File.exists?(cache_path)
+ FileUtils.mkdir_p(cache_path) unless File.exist?(cache_path)
Bundler.ui.info "Updating files in vendor/cache"
specs.each do |spec|
@@ -124,7 +124,7 @@ module Bundler
def prune_cache(custom_path)
cache_path = cache_path(custom_path)
- FileUtils.mkdir_p(cache_path) unless File.exists?(cache_path)
+ FileUtils.mkdir_p(cache_path) unless File.exist?(cache_path)
resolve = @definition.resolve
prune_gem_cache(resolve, custom_path)
prune_git_and_path_cache(resolve, custom_path)
@@ -202,10 +202,10 @@ module Bundler
end
unless dry_run
- stale_gem_bins.each { |bin| FileUtils.rm(bin) if File.exists?(bin) }
- stale_gem_files.each { |file| FileUtils.rm(file) if File.exists?(file) }
- stale_gemspec_files.each { |file| FileUtils.rm(file) if File.exists?(file) }
- stale_git_cache_dirs.each { |dir| FileUtils.rm_rf(dir) if File.exists?(dir) }
+ stale_gem_bins.each { |bin| FileUtils.rm(bin) if File.exist?(bin) }
+ stale_gem_files.each { |file| FileUtils.rm(file) if File.exist?(file) }
+ stale_gemspec_files.each { |file| FileUtils.rm(file) if File.exist?(file) }
+ stale_git_cache_dirs.each { |dir| FileUtils.rm_rf(dir) if File.exist?(dir) }
end
output
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index 1f25674a1b..8cde7dc2cd 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -146,7 +146,7 @@ module Bundler
end
end
end
- elsif File.exists?(expanded_path)
+ elsif File.exist?(expanded_path)
raise PathError, "The path `#{expanded_path}` is not a directory."
else
raise PathError, "The path `#{expanded_path}` does not exist."
diff --git a/spec/install/gems/simple_case_spec.rb b/spec/install/gems/simple_case_spec.rb
index 505e3d1f7e..7fbd9e0e6c 100644
--- a/spec/install/gems/simple_case_spec.rb
+++ b/spec/install/gems/simple_case_spec.rb
@@ -298,7 +298,7 @@ describe "bundle install with gem sources" do
install_gemfile <<-G
G
- expect(File.exists?(bundled_app("Gemfile.lock"))).to eq(true)
+ expect(File.exist?(bundled_app("Gemfile.lock"))).to eq(true)
end
it "gracefully handles error when rubygems server is unavailable" do
diff --git a/spec/runtime/load_spec.rb b/spec/runtime/load_spec.rb
index 8a53be561f..cc2cebf8e5 100644
--- a/spec/runtime/load_spec.rb
+++ b/spec/runtime/load_spec.rb
@@ -53,7 +53,7 @@ describe "Bundler.load" do
it "does not find a Gemfile above the testing directory" do
bundler_gemfile = tmp.join("../Gemfile")
- unless File.exists?(bundler_gemfile)
+ unless File.exist?(bundler_gemfile)
FileUtils.touch(bundler_gemfile)
@remove_bundler_gemfile = true
end