Class: Puma::Redeploy::ZipDeployer
- Inherits:
-
Object
- Object
- Puma::Redeploy::ZipDeployer
- Defined in:
- lib/puma/redeploy/zip_deployer.rb
Overview
Deploys zip archive
Instance Method Summary collapse
- #deploy(source:) ⇒ Object
-
#initialize(target:, logger:) ⇒ ZipDeployer
constructor
A new instance of ZipDeployer.
Constructor Details
#initialize(target:, logger:) ⇒ ZipDeployer
Returns a new instance of ZipDeployer.
9 10 11 12 |
# File 'lib/puma/redeploy/zip_deployer.rb', line 9 def initialize(target:, logger:) @target = target @logger = logger end |
Instance Method Details
#deploy(source:) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/puma/redeploy/zip_deployer.rb', line 14 def deploy(source:) return unless source Dir.chdir(@target) do stdout, stderr, status = Open3.capture3("unzip -o -K #{source}") @logger.info "stdout: #{stdout}" @logger.info "stderr: #{stderr}" @logger.info "status: #{status&.exitstatus}" end end |