Class: Avm::Git::Commit::Deploy
- Inherits:
-
Object
- Object
- Avm::Git::Commit::Deploy
- Includes:
- Files::Appendable
- Defined in:
- lib/avm/git/commit/deploy.rb
Instance Attribute Summary collapse
-
#build_dir ⇒ Object
readonly
Returns the value of attribute build_dir.
-
#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.
Instance Method Summary collapse
-
#initialize(commit, target_env, target_path) ⇒ Deploy
constructor
A new instance of Deploy.
- #run ⇒ Object
Constructor Details
#initialize(commit, target_env, target_path) ⇒ Deploy
Returns a new instance of Deploy.
17 18 19 20 21 |
# File 'lib/avm/git/commit/deploy.rb', line 17 def initialize(commit, target_env, target_path) @commit = commit @target_env = target_env @target_path = target_path end |
Instance Attribute Details
#build_dir ⇒ Object (readonly)
Returns the value of attribute build_dir.
15 16 17 |
# File 'lib/avm/git/commit/deploy.rb', line 15 def build_dir @build_dir end |
#commit ⇒ Object (readonly)
Returns the value of attribute commit.
15 16 17 |
# File 'lib/avm/git/commit/deploy.rb', line 15 def commit @commit end |
#target_env ⇒ Object (readonly)
Returns the value of attribute target_env.
15 16 17 |
# File 'lib/avm/git/commit/deploy.rb', line 15 def target_env @target_env end |
#target_path ⇒ Object (readonly)
Returns the value of attribute target_path.
15 16 17 |
# File 'lib/avm/git/commit/deploy.rb', line 15 def target_path @target_path end |
Instance Method Details
#run ⇒ Object
23 24 25 26 27 28 |
# File 'lib/avm/git/commit/deploy.rb', line 23 def run fd = ::Avm::Files::Deploy.new(target_env, target_path) fd.append_tar_output_command(git_archive_command) fd.appended.push(*appended) fd.run end |