AnonSec Shell
Server IP : 68.65.120.251  /  Your IP : 18.116.85.79   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux server105.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : travtpib ( 6521)
PHP Version : 7.4.33
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/ruby34/share/gems/gems/bundler-2.6.2/lib/bundler/resolver/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /opt/alt/ruby34/share/gems/gems/bundler-2.6.2/lib/bundler/resolver/spec_group.rb
# frozen_string_literal: true

module Bundler
  class Resolver
    class SpecGroup
      attr_reader :specs

      def initialize(specs)
        @specs = specs
      end

      def empty?
        @specs.empty?
      end

      def name
        @name ||= exemplary_spec.name
      end

      def version
        @version ||= exemplary_spec.version
      end

      def source
        @source ||= exemplary_spec.source
      end

      def to_specs(force_ruby_platform, most_specific_locked_platform)
        @specs.map do |s|
          lazy_spec = LazySpecification.from_spec(s)
          lazy_spec.force_ruby_platform = force_ruby_platform
          lazy_spec.most_specific_locked_platform = most_specific_locked_platform
          lazy_spec
        end
      end

      def to_s
        sorted_spec_names.join(", ")
      end

      def dependencies
        @dependencies ||= @specs.flat_map do |spec|
          __dependencies(spec) + metadata_dependencies(spec)
        end.uniq.sort
      end

      def ==(other)
        sorted_spec_names == other.sorted_spec_names
      end

      def merge(other)
        return false unless equivalent?(other)

        @specs |= other.specs

        true
      end

      protected

      def sorted_spec_names
        @specs.map(&:full_name).sort
      end

      private

      def equivalent?(other)
        name == other.name && version == other.version && source == other.source && dependencies == other.dependencies
      end

      def exemplary_spec
        @specs.first
      end

      def __dependencies(spec)
        dependencies = []
        spec.dependencies.each do |dep|
          next if dep.type == :development
          dependencies << Dependency.new(dep.name, dep.requirement)
        end
        dependencies
      end

      def metadata_dependencies(spec)
        [
          metadata_dependency("Ruby", spec.required_ruby_version),
          metadata_dependency("RubyGems", spec.required_rubygems_version),
        ].compact
      end

      def metadata_dependency(name, requirement)
        return if requirement.nil? || requirement.none?

        Dependency.new("#{name}\0", requirement)
      end
    end
  end
end

Anon7 - 2022
AnonSec Team