Class: Hanami::CLI::Commands::Destroy::App Private

Inherits:
Command
  • Object
show all
Defined in:
lib/hanami/cli/commands/destroy/app.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.1.0

Instance Method Summary collapse

Methods inherited from Command

inherited, #initialize

Constructor Details

This class inherits a constructor from Hanami::CLI::Commands::Command

Instance Method Details

#call(app:, **options) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.1.0


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/hanami/cli/commands/destroy/app.rb', line 18

def call(app:, **options) # rubocop:disable Metrics/MethodLength
  app     = Utils::String.underscore(app)
  context = Context.new(app: app, options: options)

  assert_valid_app!(context)
  context = context.with(base_url: base_url(context))

  remove_test_http_session_secret(context)
  remove_development_http_session_secret(context)

  remove_mount_app(context)
  remove_require_app(context)

  recursively_destroy_precompiled_assets(context)
  destroy_assets_manifest(context)

  recursively_destroy_specs(context)
  recursively_destroy_app(context)
end