Class: Pulsar::CreateDeployFile
- Inherits:
-
Object
- Object
- Pulsar::CreateDeployFile
- Includes:
- Interactor, Validator
- Defined in:
- lib/pulsar/interactors/create_deploy_file.rb
Instance Method Summary collapse
Methods included from Validator
#context_fail!, included, #validable_properties, #validate_context!
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pulsar/interactors/create_deploy_file.rb', line 8 def call default_deploy = "#{context.config_path}/apps/deploy.rb" app_deploy = "#{context.config_path}/apps/#{context.application}/deploy.rb" FileUtils.mkdir_p(context.cap_config_path) FileUtils.touch(context.deploy_file_path) Rake.sh("cat #{default_deploy} >> #{context.deploy_file_path}") if File.exist?(default_deploy) Rake.sh("cat #{app_deploy} >> #{context.deploy_file_path}") if File.exist?(app_deploy) rescue context_fail!$!. end |