Class: Hanami::CLI::Commands::Generate::App Private
- Defined in:
- lib/hanami/cli/commands/generate/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.
Direct Known Subclasses
Instance Method Summary collapse
-
#call(app:, application_base_url: nil, **options) ⇒ Object
private
rubocop:disable Metrics/AbcSize rubocop:disable Metrics/MethodLength.
Methods inherited from Command
Constructor Details
This class inherits a constructor from Hanami::CLI::Commands::Command
Instance Method Details
#call(app:, application_base_url: nil, **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.
rubocop:disable Metrics/AbcSize rubocop:disable Metrics/MethodLength
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/hanami/cli/commands/generate/app.rb', line 25 def call(app:, application_base_url: nil, **) app = Utils::String.underscore(app) template = .fetch(:template) base_url = application_base_url || "/#{app}" context = Context.new(app: app, base_url: base_url, test: .fetch(:test), template: template, options: ) assert_valid_base_url!(context) generate_app(context) generate_routes(context) generate_layout(context) generate_template(context) generate_favicon(context) create_controllers_directory(context) create_assets_images_directory(context) create_assets_javascripts_directory(context) create_assets_stylesheets_directory(context) create_spec_features_directory(context) create_spec_controllers_directory(context) generate_layout_spec(context) inject_require_app(context) inject_mount_app(context) append_development_http_session_secret(context) append_test_http_session_secret(context) end |