Class: Dply::Cli::Ctl
- Inherits:
-
Object
- Object
- Dply::Cli::Ctl
- Defined in:
- lib/dply/cli/ctl.rb
Instance Method Summary collapse
Instance Method Details
#config ⇒ Object
25 26 27 |
# File 'lib/dply/cli/ctl.rb', line 25 def config @config ||= DeployConfig.build("#{Dir.pwd}/deploy.rb") end |
#lock ⇒ Object
29 30 31 |
# File 'lib/dply/cli/ctl.rb', line 29 def lock @lock ||= Lock.new(Dir.pwd) end |
#run(command) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/dply/cli/ctl.rb', line 10 def run(command) case command when :start, :stop, :reopen_logs lock.acquire Dir.chdir("current") { util.run command } when :reload lock.acquire strategy.reload end end |