Sha256: a49eb97a0da8ffda55e4355b04715c183e593fa06b22d48d045571d169fd2d7b

Contents?: true

Size: 547 Bytes

Versions: 10

Compression:

Stored size: 547 Bytes

Contents

require 'rest-client'
require 'json'
require 'minitar'
module Popito
  class ArchiveDownloading < Popito::ClientBase
    def download_and_extract(stage:)
      payload = { stage: stage, build_config: config_payload.build_config,
                  included_files: config_payload.included_files_payload }
      response = RestClient.post("#{config_payload.api_endpoint}/api/v1/archive", payload, headers = default_headers)
      extract_tgz(response.body)
    rescue RestClient::UnprocessableEntity => e
      raise parse_error(e)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
popito-0.0.11.alpha lib/popito/deployer/client/archive_downloading.rb
popito-0.0.10.alpha lib/popito/deployer/client/archive_downloading.rb
popito-0.0.9.alpha lib/popito/deployer/client/archive_downloading.rb
popito-0.0.8.alpha lib/popito/deployer/client/archive_downloading.rb
popito-0.0.7.alpha lib/popito/deployer/client/archive_downloading.rb
popito-0.0.6.alpha lib/popito/deployer/client/archive_downloading.rb
popito-0.0.5.alpha lib/popito/deployer/client/archive_downloading.rb
popito-0.0.4.alpha lib/popito/deployer/client/archive_downloading.rb
popito-0.0.3.alpha lib/popito/deployer/client/archive_downloading.rb
popito-0.0.2.alpha lib/popito/deployer/client/archive_downloading.rb