0
  /   ˆ{‹„„-i[D<†ªoZƒ›Ù«Â558_‘I|¥‰ÓMdœv ©ƒ†ü+=ÂÁ .    ‹      Õ•QoÚ0…ßû+<?ì-¹X‘¨ã©#HCkQ¦iš¦É‰±šÄ‘í@Ù¯ŸC`°ª¬›´®ÛCäûÄ>ßIb“Ñd0ÿ8¢·óë+4}ÿæj4@ØøÐ Dó¨èú­ `8Æ§Ö–}€õzí¯;¾ÒK˜Ï µyÖcµL¬Ï-ÇôŒÔ}ô‘T0îZD¬´™ £‚‹;¤Te�äÂÍ\Vq&“}p•0¢à™	Ÿ‹\ù©ñ¥J·W‰ñŒÉöj·ìÆ +™S×Vä�”U}õ Pn0UÜhL8[°óEbÅ7µÝà¹­9Û˜X¼uX—š›¢Ëä²±U%¦DæKdtb�‰*Ä+ný¥\`Ä2âO£Áä³Ó�Më§)a(Õbâ×ƒp|1	#LÇ,ØÃšk§¹ÄôŠ‹rÅåB
~R|Óˆoä×ÓF�&&Ñ²´R)8ÄcÔDe¦dŽõ•#Hõ±ª‘ðÇÒ`ÉaL/gÃñ<ÍšHx=ÅÁÝ_|Ñ˜N™…E‘Ô"±Jov)4–^±)/ö·hÇ¨å2µ˜"ä¡•¿ÌBe\èãhN…²çÀt_;½g­ÝjŸ{AàuZ(èõ»=„þ-WBovÕ£m¯ÕFA»ß9R†ª¸-Ôº8†pßÿÏ ¾°ÊM¥U,¾Óºþ–ÛÝß=Ö=¤ÿ§+÷[cÚ´Oð‹»%ìÎÛŽ@sCQ˜ò       ˆÀ¿Ã532¾ÂÁ     ‹      ÕUÑnÚ0}ïWx~Ø¹º>´Ž§Ž �¢LÓ4M•cb‘Ø‘mFÙ×Ï!°Ò	´ía�xH|ãß{Î‰r/y•Ž{³Ï“>z?»¢ÉÇwÃAáÀ§n �¥Í‹Ë¨Ýè�0Â¹÷Õ5Àz½ŽÖÝÈØÌ¦�û²¸ç­â>^`zAê=z�H.™+"^ùBÒ�ò™9³òN	ï¦tà¤sUÈHÈÒD¹‹¸1U( w-çŠ=:”Û8È
Ã—à«¯¸Uv½,¡§bð–qI ©¸ÀŽÉŒØÔ;ÿ…O(»5„e[Zuh)ñ9úÆ
µÐ	ö¦Â”¨r�œå	Å�®“3½ŒjŽ+|‚¿zã¯>¯OSÂPnå<Áo{Éèfœ¤˜ŽXê±ã˜»€¹ÅtÈœG¥j®¤8	¾oÀ÷êûé„iƒI¥ãVU^ýÚŸIå¦pZß¹=D5ñ;7fÆävÚÍÒÁ´±DÔ)žØ½Ä×ÅtÂ¬Ô¥ÊJî�Ýìä7\^ëÌU7ûG´gÕ"÷˜"ÔBG‘áÈJ/µYëCS‚áGí`Ü?”Ì-1ÝG‡Tá·ã«V'nµcÔ‰¯»W� †6ñáEH]ÿ@˜6ëY
EÆjÛà%T*4ûp;CêÎ3ëÿ†ÿ^Æ¶@ØÛQE §? ûcä¾±    D   ˆl–ßi~””†»%�À¶¦-ÿ�þd�õ›�Ž²¼Ü£ ?ŸÅƒe°³Ä_�uÐb&=LyZËcõÄÃ ¹    # frozen_string_literal: true

module Bundler
  # Handles the installation of plugin in appropriate directories.
  #
  # This class is supposed to be wrapper over the existing gem installation infra
  # but currently it itself handles everything as the Source's subclasses (e.g. Source::RubyGems)
  # are heavily dependent on the Gemfile.
  module Plugin
    class Installer
      autoload :Rubygems, File.expand_path("installer/rubygems", __dir__)
      autoload :Git,      File.expand_path("installer/git", __dir__)

      def install(names, options)
        check_sources_consistency!(options)

        version = options[:version] || [">= 0"]

        if options[:git]
          install_git(names, version, options)
        elsif options[:local_git]
          install_local_git(names, version, options)
        else
          sources = options[:source] || Gem.sources
          install_rubygems(names, version, sources)
        end
      end

      # Installs the plugin from Definition object created by limited parsing of
      # Gemfile searching for plugins to be installed
      #
      # @param [Definition] definition object
      # @return [Hash] map of names to their specs they are installed with
      def install_definition(definition)
        def definition.lock(*); end
        definition.resolve_remotely!
        specs = definition.specs

        install_from_specs specs
      end

      private

      def check_sources_consistency!(options)
        if options.key?(:git) && options.key?(:local_git)
          raise InvalidOption, "Remote and local plugin git sources can't be both specified"
        end
      end

      def install_git(names, version, options)
        uri = options.delete(:git)
        options["uri"] = uri

        install_all_sources(names, version, options, options[:source])
      end

      def install_local_git(names, version, options)
        uri = options.delete(:local_git)
        options["uri"] = uri

        install_all_sources(names, version, options, options[:source])
      end

      # Installs the plugin from rubygems source and returns the path where the
      # plugin was installed
      #
      # @param [String] name of the plugin gem to search in the source
      # @param [Array] version of the gem to install
      # @param [String, Array<String>] source(s) to resolve the gem
      #
      # @return [Hash] map of names to the specs of plugins installed
      def install_rubygems(names, version, sources)
        install_all_sources(names, version, nil, sources)
      end

      def install_all_sources(names, version, git_source_options, rubygems_source)
        source_list = SourceList.new

        source_list.add_git_source(git_source_options) if git_source_options
        Array(rubygems_source).each {|remote| source_list.add_global_rubygems_r