Sha256: becb3089093d24f6ddffbb93de05634dc74c62878211e233329fe799e336ccc5

Contents?: true

Size: 1.63 KB

Versions: 25

Compression:

Stored size: 1.63 KB

Contents

# frozen_string_literal: true

module Bundler
  class Source
    class Metadata < Source
      def specs
        @specs ||= Index.build do |idx|
          idx << Gem::Specification.new("Ruby\0", RubyVersion.system.to_gem_version_with_patchlevel)
          idx << Gem::Specification.new("RubyGems\0", Gem::VERSION) do |s|
            s.required_rubygems_version = Gem::Requirement.default
          end

          idx << Gem::Specification.new do |s|
            s.name     = "bundler"
            s.version  = VERSION
            s.license  = "MIT"
            s.platform = Gem::Platform::RUBY
            s.source   = self
            s.authors  = ["bundler team"]
            s.bindir   = "exe"
            s.homepage = "https://bundler.io"
            s.summary  = "The best way to manage your application's dependencies"
            s.executables = %w[bundle]
            # can't point to the actual gemspec or else the require paths will be wrong
            s.loaded_from = File.expand_path("..", __FILE__)
          end

          if local_spec = Bundler.rubygems.find_bundler(VERSION)
            idx << local_spec
          end

          idx.each {|s| s.source = self }
        end
      end

      def options
        {}
      end

      def install(spec, _opts = {})
        print_using_message "Using #{version_message(spec)}"
        nil
      end

      def to_s
        "the local ruby installation"
      end

      def ==(other)
        self.class == other.class
      end
      alias_method :eql?, :==

      def hash
        self.class.hash
      end

      def version_message(spec)
        "#{spec.name} #{spec.version}"
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 4 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/bundler-2.3.5/lib/bundler/source/metadata.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/bundler-2.3.5/lib/bundler/source/metadata.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/bundler-2.3.7/lib/bundler/source/metadata.rb
rubygems-update-3.3.10 bundler/lib/bundler/source/metadata.rb
bundler-2.3.10 lib/bundler/source/metadata.rb
rubygems-update-3.3.9 bundler/lib/bundler/source/metadata.rb
bundler-2.3.9 lib/bundler/source/metadata.rb
rubygems-update-3.3.8 bundler/lib/bundler/source/metadata.rb
bundler-2.3.8 lib/bundler/source/metadata.rb
rubygems-update-3.3.7 bundler/lib/bundler/source/metadata.rb
bundler-2.3.7 lib/bundler/source/metadata.rb
rubygems-update-3.3.6 bundler/lib/bundler/source/metadata.rb
bundler-2.3.6 lib/bundler/source/metadata.rb
rubygems-update-3.3.5 bundler/lib/bundler/source/metadata.rb
bundler-2.3.5 lib/bundler/source/metadata.rb
rubygems-update-3.3.4 bundler/lib/bundler/source/metadata.rb
bundler-2.3.4 lib/bundler/source/metadata.rb
rubygems-update-3.3.3 bundler/lib/bundler/source/metadata.rb
bundler-2.3.3 lib/bundler/source/metadata.rb
rubygems-update-3.3.2 bundler/lib/bundler/source/metadata.rb