Class: Avm::Git::Commit::Deploy

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/git/commit/deploy.rb,
lib/avm/git/commit/deploy/appended.rb,
lib/avm/git/commit/deploy/appended/base.rb,
lib/avm/git/commit/deploy/appended/directory.rb,
lib/avm/git/commit/deploy/appended/file_content.rb

Defined Under Namespace

Modules: Appended

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(commit, target_env, target_path) ⇒ Deploy

Returns a new instance of Deploy.



16
17
18
19
20
21
# File 'lib/avm/git/commit/deploy.rb', line 16

def initialize(commit, target_env, target_path)
  @commit = commit
  @target_env = target_env
  @target_path = target_path
  @variables_source = nil
end

Instance Attribute Details

#build_dirObject (readonly)

Returns the value of attribute build_dir.



14
15
16
# File 'lib/avm/git/commit/deploy.rb', line 14

def build_dir
  @build_dir
end

#commitObject (readonly)

Returns the value of attribute commit.



14
15
16
# File 'lib/avm/git/commit/deploy.rb', line 14

def commit
  @commit
end

#target_envObject (readonly)

Returns the value of attribute target_env.



14
15
16
# File 'lib/avm/git/commit/deploy.rb', line 14

def target_env
  @target_env
end

#target_pathObject (readonly)

Returns the value of attribute target_path.



14
15
16
# File 'lib/avm/git/commit/deploy.rb', line 14

def target_path
  @target_path
end

#variables_sourceObject (readonly)

Returns the value of attribute variables_source.



14
15
16
# File 'lib/avm/git/commit/deploy.rb', line 14

def variables_source
  @variables_source
end

Instance Method Details

#runObject



28
29
30
31
32
33
34
35
36
37
# File 'lib/avm/git/commit/deploy.rb', line 28

def run
  on_build_dir do
    copy_git_content
    copy_appended_content
    mkdir_target
    clear_content
    send_untar_package
    set_target_permission
  end
end

#variables_source_set(source) ⇒ Object



23
24
25
26
# File 'lib/avm/git/commit/deploy.rb', line 23

def variables_source_set(source)
  @variables_source = source
  self
end