Sha256: 5e520354996030e9e93a5f46d8135b17a279fe44154a3e7c9d42a341136b4a9d

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

module Pod
  class Installer
    # Controller class responsible of installing the activated specifications
    # of a single Pod.
    #
    # @note This class needs to consider all the activated specs of a Pod.
    #
    class PodSourceInstaller
      def download_source
        if root_spec.source[:git] =~ /http/
          source = root_spec.attributes_hash["source"]
          # 替换
          if source["git"].include? "https://g.hz.netease.com"
            source["git"]["https://g.hz.netease.com"] = "ssh://git@g.hz.netease.com:22222"
          end
    
          if source["git"].include? "http://g.hz.netease.com"
            source["git"]["http://g.hz.netease.com"] = "ssh://git@g.hz.netease.com:22222"
          end
        end
        download_result = Downloader.download(download_request, root, :can_cache => can_cache?)

        if (specific_source = download_result.checkout_options) && specific_source != root_spec.source
          sandbox.store_checkout_source(root_spec.name, specific_source)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cocoapods-pdk8-0.0.3 lib/cocoapods-pdk8/hook/installer/pod_source_installer.rb
cocoapods-pdk8-0.0.2 lib/cocoapods-pdk8/hook/installer/pod_source_installer.rb
cocoapods-pdk8-0.0.1 lib/cocoapods-pdk8/hook/installer/pod_source_installer.rb