Class: Puma::Redeploy::DeployerFactory
- Inherits:
-
Object
- Object
- Puma::Redeploy::DeployerFactory
- Defined in:
- lib/puma/redeploy/deployer_factory.rb
Overview
Creates instance of the redeploy handler based on the watch file location
Class Method Summary collapse
Class Method Details
.create(target:, watch_file:, logger:) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/puma/redeploy/deployer_factory.rb', line 7 def self.create(target:, watch_file:, logger:) file_deployer = Puma::Redeploy::ZipDeployer.new(target:, logger:) if watch_file.start_with?('s3') Puma::Redeploy::S3Handler.new(watch_file:, deployer: file_deployer, logger:, s3_client:) else Puma::Redeploy::FileHandler.new(watch_file:, deployer: file_deployer, logger:) end end |
.s3_client ⇒ Object
16 17 18 |
# File 'lib/puma/redeploy/deployer_factory.rb', line 16 def self.s3_client Aws::S3::Client.new end |