Server IP : 66.29.132.122 / Your IP : 3.144.243.80 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/opt/alt/ruby31/share/gems/gems/bundler-2.3.27/lib/bundler/resolver/ |
Upload File : |
# frozen_string_literal: true module Bundler class Resolver class Base def initialize(base, additional_base_requirements) @base = base @additional_base_requirements = additional_base_requirements end def [](name) @base[name] end def delete(spec) @base.delete(spec) end def base_requirements @base_requirements ||= build_base_requirements end def unlock_deps(deps) exact, lower_bound = deps.partition(&:specific?) exact.each do |exact_dep| @base.delete_by_name_and_version(exact_dep.name, exact_dep.requirement.requirements.first.last) end lower_bound.each do |lower_bound_dep| @additional_base_requirements.delete(lower_bound_dep) end @base_requirements = nil end private def build_base_requirements base_requirements = {} @base.each do |ls| dep = Dependency.new(ls.name, ls.version) base_requirements[ls.name] = dep end @additional_base_requirements.each {|d| base_requirements[d.name] = d } base_requirements end end end end