Sha256: 53e9d01fc2831e11087650f1d52f8497ccf565a8d13545b02ae3edb7330e1612

Contents?: true

Size: 635 Bytes

Versions: 3

Compression:

Stored size: 635 Bytes

Contents

# frozen_string_literal: true
require "bundler/remote_specification"

module Bundler
  class StubSpecification < RemoteSpecification
    def self.from_stub(stub)
      spec = new(stub.name, stub.version, stub.platform, nil)
      spec.stub = stub
      spec
    end

    attr_accessor :stub

    def to_yaml
      _remote_specification.to_yaml
    end

    if Bundler.rubygems.provides?(">= 2.3")
      # This is defined directly to avoid having to load every installed spec
      def missing_extensions?
        stub.missing_extensions?
      end
    end

  private

    def _remote_specification
      stub.to_spec
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/bundler-1.14.6/lib/bundler/stub_specification.rb
bundler-1.14.6 lib/bundler/stub_specification.rb
bundler-1.14.5 lib/bundler/stub_specification.rb