Class: Terraspace::Cloud::Upload::Base

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

Direct Known Subclasses

Package, Tidy

Instance Method Summary collapse

Methods inherited from Base

#cancelled?, #changes?, #clean_cache2_stage, #cloud_upload, #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?

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



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

def initialize(options={})
  super
  @type = options[:type]
end

Instance Method Details

#artifacts_pathObject



13
14
15
# File 'lib/terraspace/cloud/upload/base.rb', line 13

def artifacts_path
  "#{@mod.cache_dir}/.terraspace-cache/.cache2/artifacts/#{@type}"
end

#zip_pathObject

final zip dest



9
10
11
# File 'lib/terraspace/cloud/upload/base.rb', line 9

def zip_path
  "#{artifacts_path}.zip"
end