Spec-Zone.ru › Ruby 2.6

class Bundler::RubygemsIntegration::MoreFuture

Родитель:
Bundler::RubygemsIntegration::Future

RubyGems 2.1.0

Публичные Классовые Методы

new() Показать исходный код
# File lib/bundler/rubygems_integration.rb, line 810
def initialize
  super
  backport_ext_builder_monitor
end
Вызывает метод суперкласса Bundler::RubygemsIntegration::new

Публичные Методы Экземпляров

all_specs() Показать исходный код
# File lib/bundler/rubygems_integration.rb, line 815
def all_specs
  require "bundler/remote_specification"
  Gem::Specification.stubs.map do |stub|
    StubSpecification.from_stub(stub)
  end
end
backport_ext_builder_monitor() Показать исходный код
# File lib/bundler/rubygems_integration.rb, line 822
      def backport_ext_builder_monitor
        # So we can avoid requiring "rubygems/ext" in its entirety
        Gem.module_eval <<-RB, __FILE__, __LINE__ + 1
          module Ext
          end
        RB

        require "rubygems/ext/builder"

        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
binstubs_call_gem?() Показать исходный код
# File lib/bundler/rubygems_integration.rb, line 864
def binstubs_call_gem?
  false
end

Сгенерированные RubyGems binstubs вызывают Kernel#gem

find_name(name) Показать исходный код
# File lib/bundler/rubygems_integration.rb, line 842
def find_name(name)
  Gem::Specification.stubs_for(name).map(&:to_spec)
end
stubs_provide_full_functionality?() Показать исходный код
# File lib/bundler/rubygems_integration.rb, line 872
def stubs_provide_full_functionality?
  true
end

Только версии 2.5.2+ имеют все необходимые методы-заглушки, и поскольку это оптимизация производительности, мы ограничимся последними версиями RG, а не всеми версиями с заглушками

use_gemdeps(gemfile) Показать исходный код
# File lib/bundler/rubygems_integration.rb, line 853
def use_gemdeps(gemfile)
  ENV["BUNDLE_GEMFILE"] ||= File.expand_path(gemfile)
  require "bundler/gemdeps"
  runtime = Bundler.setup
  Bundler.ui = nil
  activated_spec_names = runtime.requested_specs.map(&:to_spec).sort_by(&:name)
  [Gemdeps.new(runtime), activated_spec_names]
end

Ruby Core © 1993–2017 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API