Module: Gem
| Relationships & Source Files | |
| Namespace Children | |
|
Modules:
| |
|
Classes:
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Instance Chain:
|
|
| Defined in: | lib/bundler/rubygems_ext.rb |
Constant Summary
-
VALIDATES_FOR_RESOLUTION =
# File 'lib/bundler/rubygems_ext.rb', line 257
Can be removed once RubyGems 3.5.14 support is dropped
Specification.new.respond_to?(:validate_for_resolution).freeze
Class Attribute Summary
- .freebsd_platform? ⇒ Boolean readonly
Class Method Summary
Instance Method Summary
FixFullNameEncoding - Included
SplitCompactIndexEntryOnFirstColon - Included
UnfreezeCompactIndexParsedResponse - Included
Class Attribute Details
.freebsd_platform? ⇒ Boolean (readonly)
[ GitHub ]
# File 'lib/bundler/rubygems_ext.rb', line 88
def self.freebsd_platform? RbConfig::CONFIG["host_os"].to_s.include?("bsd") end
Class Method Details
.open_file_with_flock(path, &block)
[ GitHub ]# File 'lib/bundler/rubygems_ext.rb', line 98
def open_file_with_flock(path, &block) # read-write mode is used rather than read-only in order to support NFS mode = IO::RDWR | IO::APPEND | IO::CREAT | IO::BINARY mode |= IO::SHARE_DELETE if IO.const_defined?(:SHARE_DELETE) File.open(path, mode) do |io| begin io.flock(File::LOCK_EX) rescue Errno::ENOSYS, Errno::ENOTSUP end yield io end end
.open_file_with_lock(path)
[ GitHub ]# File 'lib/bundler/rubygems_ext.rb', line 112
def open_file_with_lock(path) file_lock = "#{path}.lock" loop do open_file_with_flock(file_lock) do |io| # The previous holder removed the file while we were waiting on it, # so leave this block and try again on the file now at the lock path next unless File.identical?(io, file_lock) begin return yield io ensure FileUtils.rm_f file_lock end end end end
.ruby_abi
[ GitHub ]# File 'lib/bundler/rubygems_ext.rb', line 66
def self.ruby_abi ruby_version.segments.first(2).join(".") end