Class: Bundler::RubygemsIntegration::MoreFuture

Inherits:
Future show all
Defined in:
lib/bundler/rubygems_integration.rb

Overview

RubyGems 2.1.0

Constant Summary

Constants inherited from Bundler::RubygemsIntegration

EXT_LOCK

Instance Method Summary collapse

Methods inherited from Future

#build, #download_gem, #fetch_all_remote_specs, #fetch_specs, #gem_from_path, #gem_remote_fetcher, #repository_subdirectories, #stub_rubygems

Methods inherited from Bundler::RubygemsIntegration

#backport_base_dir, #backport_cache_file, #backport_segment_generation, #backport_spec_file, #backport_yaml_initialize, #bin_path, #build, #build_args, #build_args=, #build_gem, #clear_paths, #config_map, #configuration, #download_gem, #ext_lock, #fetch_all_remote_specs, #fetch_prerelease_specs, #fetch_specs, #gem_bindir, #gem_cache, #gem_dir, #gem_from_path, #gem_path, #inflate, #load_path_insert_index, #loaded_gem_paths, #loaded_specs, #mark_loaded, #marshal_spec_dir, #path, #platforms, #preserve_paths, #provides?, provides?, #read_binary, #redefine_method, #replace_bin_path, #replace_entrypoints, #replace_gem, #replace_refresh, #repository_subdirectories, #reverse_rubygems_kernel_mixin, #ruby_engine, #security_policies, #security_policy_keys, #set_installed_by_version, #sources, #sources=, #spec_cache_dirs, #spec_from_gem, #spec_missing_extensions?, #stub_source_index, #ui=, #user_home, #validate, version, #version, #with_build_args

Constructor Details

#initializeMoreFuture

Returns a new instance of MoreFuture.



644
645
646
647
# File 'lib/bundler/rubygems_integration.rb', line 644

def initialize
  super
  backport_ext_builder_monitor
end

Instance Method Details

#all_specsObject



649
650
651
652
653
654
# File 'lib/bundler/rubygems_integration.rb', line 649

def all_specs
  require "bundler/remote_specification"
  Gem::Specification.stubs.map do |stub|
    StubSpecification.from_stub(stub)
  end
end

#backport_ext_builder_monitorObject



656
657
658
659
660
661
662
663
664
665
666
667
# File 'lib/bundler/rubygems_integration.rb', line 656

def backport_ext_builder_monitor
  require "rubygems/ext"

  Gem::Ext::Builder.class_eval do
    unless const_defined?(:CHDIR_MONITOR)
      const_set(:CHDIR_MONITOR, EXT_LOCK)
    end

    remove_const(:CHDIR_MUTEX) if const_defined?(:CHDIR_MUTEX)
    const_set(:CHDIR_MUTEX, const_get(:CHDIR_MONITOR))
  end
end

#find_name(name) ⇒ Object



670
671
672
# File 'lib/bundler/rubygems_integration.rb', line 670

def find_name(name)
  Gem::Specification.stubs_for(name).map(&:to_spec)
end