# File lib/bundler/spec_set.rb, line 58 def [](key) key = key.name if key.respond_to?(:name) lookup[key].reverse end
# File lib/bundler/spec_set.rb, line 63 def []=(key, value) @specs << value @lookup = nil @sorted = nil value end
# File lib/bundler/spec_set.rb, line 16 def for(dependencies, skip = [], check = false, match_current_platform = false) handled, deps, specs = {}, dependencies.dup, [] skip << 'bundler' until deps.empty? dep = deps.shift next if handled[dep] || skip.include?(dep.name) spec = lookup[dep.name].find do |s| if match_current_platform Gem::Platform.match(s.platform) else s.match_platform(dep.__platform) end end handled[dep] = true if spec specs << spec spec.dependencies.each do |d| next if d.type == :development d = DepProxy.new(d, dep.__platform) unless match_current_platform deps << d end elsif check return false end end if spec = lookup['bundler'].first specs << spec end check ? true : SpecSet.new(specs) end
# File lib/bundler/spec_set.rb, line 82 def materialize(deps, missing_specs = nil) materialized = self.for(deps, [], false, true).to_a deps = materialized.map {|s| s.name }.uniq materialized.map! do |s| next s unless s.is_a?(LazySpecification) s.source.dependency_names = deps if s.source.respond_to?(:dependency_names=) spec = s.__materialize__ if missing_specs missing_specs << s unless spec else raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec end spec if spec end SpecSet.new(materialized.compact) end
Generated with the Darkfish Rdoc Generator 2.