summaryrefslogtreecommitdiff
path: root/lib/bundler/process_lock.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-22 23:08:05 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-22 23:08:05 +0000
commit7825e8363d4b2ccad8e2d3f5eeba9e26f6656911 (patch)
tree83cbcf419e0feeb2ab0fd063ed85e0776eb0081b /lib/bundler/process_lock.rb
parent73bed0312895322e0fd18310e840356c8e6af812 (diff)
Postponing the Bundler merge.
I faced a big issue about Bundler with ruby core. I have no time to resolve it issue before 2.5 final release. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/bundler/process_lock.rb')
-rw-r--r--lib/bundler/process_lock.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/bundler/process_lock.rb b/lib/bundler/process_lock.rb
deleted file mode 100644
index 4bd6931577..0000000000
--- a/lib/bundler/process_lock.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler
- class ProcessLock
- def self.lock(bundle_path = Bundler.bundle_path)
- lock_file_path = File.join(bundle_path, "bundler.lock")
- has_lock = false
-
- File.open(lock_file_path, "w") do |f|
- f.flock(File::LOCK_EX)
- has_lock = true
- yield
- f.flock(File::LOCK_UN)
- end
- rescue Errno::EACCES, Errno::ENOLCK
- # In the case the user does not have access to
- # create the lock file or is using NFS where
- # locks are not available we skip locking.
- yield
- ensure
- FileUtils.rm_f(lock_file_path) if has_lock
- end
- end
-end