Class: Terraspace::Cloud::Upload

Inherits:
Base show all
Defined in:
lib/terraspace/cloud/upload.rb,
lib/terraspace/cloud/upload/base.rb,
lib/terraspace/cloud/upload/tidy.rb,
lib/terraspace/cloud/upload/package.rb

Defined Under Namespace

Classes: Base, Package, Tidy

Instance Method Summary collapse

Methods inherited from Base

#cancelled?, #changes?, #clean_cache2_stage, #cloud_upload, #initialize, #record?, #sh, #stage_attrs, #success_status

Methods included from Util::Pretty

#pretty_path, #pretty_time

Methods included from Util::Sure

#sure?

Methods included from Util::Logging

#logger

Methods included from Context

#setup_context

Methods included from Api::Validate

#validate

Methods included from Api::Concern

#api, #cloud_stack_name, #expander, #region

Methods included from Api::Concern::Errors

#error_message, #errors?

Methods inherited from Terraspace::CLI::Base

#initialize

Constructor Details

This class inherits a constructor from Terraspace::Cloud::Base

Instance Method Details

#create(data) ⇒ Object

data: {stream_id:, type: }



3
4
5
6
7
8
# File 'lib/terraspace/cloud/upload.rb', line 3

def create(data) # data: {stream_id:, type: }
  zip_path = Package.new(@options.merge(data)).build
  upload = create_upload(data)
  upload_project(upload, zip_path)
  upload
end