Sha256: 75011889377f45a1b8316c4882ff26eea8369331268840d3b9a5f4edab3efcfb

Contents?: true

Size: 626 Bytes

Versions: 11

Compression:

Stored size: 626 Bytes

Contents

require 'json'
# require 'aescrypt'

module  LgPodPlugin

  class Concurrency

    public
    def self.async_download_pods(installers)
      return if installers.empty?
      hash = installers.map(&:download_params).uniq
      json_text = JSON.generate(hash)
      file_path = LFileManager.download_director.join(LUtils.md5(json_text)).to_path + ".json"
      # pp file_path
      File.open(file_path, 'w+') { |f| f.write(json_text) }
      pwd = Pathname.new(File.dirname(__FILE__)).realpath
      FileUtils.chdir pwd
      system("./PodDownload #{file_path}")
      installers.each(&:copy_file_to_caches)
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
lg_pod_plugin-1.2.2 lib/lg_pod_plugin/installer/concurrency.rb
lg_pod_plugin-1.2.1 lib/lg_pod_plugin/installer/concurrency.rb
lg_pod_plugin-1.2.0.1 lib/lg_pod_plugin/installer/concurrency.rb
lg_pod_plugin-1.2.0.0 lib/lg_pod_plugin/installer/concurrency.rb
lg_pod_plugin-1.1.8.2 lib/lg_pod_plugin/installer/concurrency.rb
lg_pod_plugin-1.1.8.1 lib/lg_pod_plugin/installer/concurrency.rb
lg_pod_plugin-1.1.7.4 lib/lg_pod_plugin/installer/concurrency.rb
lg_pod_plugin-1.1.7.3 lib/lg_pod_plugin/installer/concurrency.rb
lg_pod_plugin-1.1.6.7 lib/lg_pod_plugin/installer/concurrency.rb
lg_pod_plugin-1.1.6.6 lib/lg_pod_plugin/installer/concurrency.rb
lg_pod_plugin-1.1.6.5 lib/lg_pod_plugin/installer/concurrency.rb