Class: Avm::Git::Commit::Deploy
- Inherits:
-
Object
- Object
- Avm::Git::Commit::Deploy
- Includes:
- EacRubyUtils::SimpleCache
- Defined in:
- lib/avm/git/commit/deploy.rb
Instance Attribute Summary collapse
-
#appended_directories ⇒ Object
readonly
Returns the value of attribute appended_directories.
-
#commit ⇒ Object
readonly
Returns the value of attribute commit.
-
#target_env ⇒ Object
readonly
Returns the value of attribute target_env.
-
#target_path ⇒ Object
readonly
Returns the value of attribute target_path.
-
#variables_source ⇒ Object
readonly
Returns the value of attribute variables_source.
Instance Method Summary collapse
- #append_directories(directories) ⇒ Object
- #append_directory(directory) ⇒ Object
-
#initialize(commit, target_env, target_path) ⇒ Deploy
constructor
A new instance of Deploy.
- #run ⇒ Object
- #variables_source_set(source) ⇒ Object
Constructor Details
#initialize(commit, target_env, target_path) ⇒ Deploy
Returns a new instance of Deploy.
43 44 45 46 47 48 49 |
# File 'lib/avm/git/commit/deploy.rb', line 43 def initialize(commit, target_env, target_path) @commit = commit @target_env = target_env @target_path = target_path @appended_directories = [] @variables_source = nil end |
Instance Attribute Details
#appended_directories ⇒ Object (readonly)
Returns the value of attribute appended_directories.
41 42 43 |
# File 'lib/avm/git/commit/deploy.rb', line 41 def appended_directories @appended_directories end |
#commit ⇒ Object (readonly)
Returns the value of attribute commit.
41 42 43 |
# File 'lib/avm/git/commit/deploy.rb', line 41 def commit @commit end |
#target_env ⇒ Object (readonly)
Returns the value of attribute target_env.
41 42 43 |
# File 'lib/avm/git/commit/deploy.rb', line 41 def target_env @target_env end |
#target_path ⇒ Object (readonly)
Returns the value of attribute target_path.
41 42 43 |
# File 'lib/avm/git/commit/deploy.rb', line 41 def target_path @target_path end |
#variables_source ⇒ Object (readonly)
Returns the value of attribute variables_source.
41 42 43 |
# File 'lib/avm/git/commit/deploy.rb', line 41 def variables_source @variables_source end |
Instance Method Details
#append_directories(directories) ⇒ Object
56 57 58 59 |
# File 'lib/avm/git/commit/deploy.rb', line 56 def append_directories(directories) directories.each { |directory| append_directory(directory) } self end |
#append_directory(directory) ⇒ Object
51 52 53 54 |
# File 'lib/avm/git/commit/deploy.rb', line 51 def append_directory(directory) @appended_directories << directory self end |
#run ⇒ Object
66 67 68 69 70 71 72 73 74 75 |
# File 'lib/avm/git/commit/deploy.rb', line 66 def run on_build_dir do copy_git_content appended_directories.each { |directory| copy_appended_directory(directory) } mkdir_target clear_content send_untar_package end end |
#variables_source_set(source) ⇒ Object
61 62 63 64 |
# File 'lib/avm/git/commit/deploy.rb', line 61 def variables_source_set(source) @variables_source = source self end |