Sha256: 56a31a304de9f64392e230a40b02a978f3d54ce780647c7fc40dd8311d009297

Contents?: true

Size: 1.82 KB

Versions: 3

Compression:

Stored size: 1.82 KB

Contents

module RBS
  module Collection
    class Config
      class LockfileGenerator
        class GemfileLockMismatchError < StandardError
          @expected: Pathname

          @actual: Pathname

          def initialize: (expected: Pathname, actual: Pathname) -> void

          def message: () -> String
        end

        attr_reader config: Config

        attr_reader lockfile: Lockfile
        attr_reader existing_lockfile: Lockfile?

        attr_reader definition: Bundler::Definition

        # A hash table to look up a spec from name of the gem
        attr_reader gem_hash: Hash[String, Bundler::LazySpecification]

        def self.generate: (config: Config, definition: Bundler::Definition, ?with_lockfile: boolish) -> Lockfile

        def initialize: (config: Config, definition: Bundler::Definition, with_lockfile: boolish) -> void

        def generate: () -> void

        private

        # Ensure if current `gemfile_lock_path` is the same with the path saved in `lock`
        #
        def validate_gemfile_lock_path!: (lock: Lockfile?, gemfile_lock_path: Pathname) -> void

        # Inserts a entry to lockfile of a gem and its dependencies, if not included in `ignored_gems:`
        #
        # * If `skip:` is true, it skips adding the gem, but adds it's dependencies.
        #
        def assign_gem: (name: String, version: String?, src_data: Sources::source_entry?, ignored_gems: Set[String], ?skip: bool) -> void

        def assign_stdlib: (name: String, from_gem: String?) -> void

        # Find a source of a gem from ones registered in `config.sources`
        #
        # Returns `nil` if no source contains the definition of the gem.
        #
        def find_source: (name: String) -> Sources::t?

        def find_best_version: (version: String?, versions: Array[String]) -> Gem::Version
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rbs-3.1.2 sig/collection/config/lockfile_generator.rbs
rbs-3.1.1 sig/collection/config/lockfile_generator.rbs
rbs-3.1.0 sig/collection/config/lockfile_generator.rbs