Class: Stable::Services::AppRemover
- Inherits:
-
Object
- Object
- Stable::Services::AppRemover
- Defined in:
- lib/stable/services/app_remover.rb
Overview
Service for removing Rails applications
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(name) ⇒ AppRemover
constructor
A new instance of AppRemover.
Constructor Details
#initialize(name) ⇒ AppRemover
Returns a new instance of AppRemover.
7 8 9 |
# File 'lib/stable/services/app_remover.rb', line 7 def initialize(name) @name = name end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/stable/services/app_remover.rb', line 11 def call app = AppRegistry.fetch(@name) ProcessManager.stop(app) HostsManager.remove(app[:domain]) CaddyManager.remove(app[:domain]) AppRegistry.remove(@name) CaddyManager.reload puts "✔ #{@name} removed" end |