class Bundler::PubGrub::StaticPackageSource::DSL
def add(name, version, deps: {})
def add(name, version, deps: {}) version = Gem::Version.new(version) @packages[name] ||= {} raise ArgumentError, "#{name} #{version} declared twice" if @packages[name].key?(version) @packages[name][version] = clean_deps(name, version, deps) end
def clean_deps(name, version, deps)
def clean_deps(name, version, deps) deps.reject {|dep_name, req| name == dep_name && Bundler::PubGrub::RubyGems.parse_range(req).include?(version) } end
def initialize(packages, root_deps)
def initialize(packages, root_deps) @packages = packages @root_deps = root_deps end
def root(deps:)
def root(deps:) @root_deps.update(deps) end