Class: Bundler::RubyGemsGemInstaller
- Inherits:
-
Gem::Installer
- Object
- Gem::Installer
- Bundler::RubyGemsGemInstaller
- Defined in:
- lib/bundler/rubygems_gem_installer.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #build_extensions ⇒ Object
- #check_executable_overwrite(filename) ⇒ Object
-
#initialize(gem, options = {}) ⇒ RubyGemsGemInstaller
constructor
A new instance of RubyGemsGemInstaller.
- #pre_install_checks ⇒ Object
Constructor Details
#initialize(gem, options = {}) ⇒ RubyGemsGemInstaller
Returns a new instance of RubyGemsGemInstaller.
15 16 17 18 |
# File 'lib/bundler/rubygems_gem_installer.rb', line 15 def initialize(gem, = {}) @options = {} super end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
13 14 15 |
# File 'lib/bundler/rubygems_gem_installer.rb', line 13 def @options end |
Class Method Details
.at(*args) ⇒ Object
8 9 10 |
# File 'lib/bundler/rubygems_gem_installer.rb', line 8 def self.at(*args) new(*args) end |
Instance Method Details
#build_extensions ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/bundler/rubygems_gem_installer.rb', line 28 def build_extensions extension_cache_path = [:bundler_extension_cache_path] return super unless extension_cache_path && extension_dir = Bundler.rubygems.spec_extension_dir(spec) extension_dir = Pathname.new(extension_dir) build_complete = SharedHelpers.filesystem_access(extension_cache_path.join("gem.build_complete"), :read, &:file?) if build_complete && ![:force] SharedHelpers.filesystem_access(extension_dir.parent, &:mkpath) SharedHelpers.filesystem_access(extension_cache_path) do FileUtils.cp_r extension_cache_path, spec.extension_dir end else super if extension_dir.directory? # not made for gems without extensions SharedHelpers.filesystem_access(extension_cache_path.parent, &:mkpath) SharedHelpers.filesystem_access(extension_cache_path) do FileUtils.cp_r extension_dir, extension_cache_path end end end end |
#check_executable_overwrite(filename) ⇒ Object
20 21 22 |
# File 'lib/bundler/rubygems_gem_installer.rb', line 20 def check_executable_overwrite(filename) # Bundler needs to install gems regardless of binstub overwriting end |
#pre_install_checks ⇒ Object
24 25 26 |
# File 'lib/bundler/rubygems_gem_installer.rb', line 24 def pre_install_checks super && validate_bundler_checksum([:bundler_expected_checksum]) end |