Module: Belt
- Defined in:
- lib/belt.rb,
lib/belt/cli.rb,
lib/belt/root.rb,
lib/belt/version.rb,
lib/belt/inflector.rb,
lib/belt/rendering.rb,
lib/belt/route_dsl.rb,
lib/belt/action_router.rb,
lib/belt/observability.rb,
lib/belt/lambda_handler.rb,
lib/belt/cli/new_command.rb,
lib/belt/table_inference.rb,
lib/belt/cli/env_resolver.rb,
lib/belt/helpers/response.rb,
lib/belt/cli/app_detection.rb,
lib/belt/cli/backup_config.rb,
lib/belt/cli/backup_runner.rb,
lib/belt/cli/setup_command.rb,
lib/belt/cli/tasks_command.rb,
lib/belt/cli/views_command.rb,
lib/belt/cli/deploy_command.rb,
lib/belt/cli/routes_command.rb,
lib/belt/cli/server_command.rb,
lib/belt/cli/tables_command.rb,
lib/belt/cli/bucket_security.rb,
lib/belt/cli/console_command.rb,
lib/belt/cli/destroy_command.rb,
lib/belt/helpers/cors_origin.rb,
lib/belt/cli/frontend_command.rb,
lib/belt/cli/frontend_env_map.rb,
lib/belt/cli/generate_command.rb,
lib/belt/cli/terraform_command.rb,
lib/belt/helpers/error_logging.rb,
lib/belt/cli/environment_config.rb,
lib/belt/cli/generator_registry.rb,
lib/belt/cli/environment_command.rb,
lib/belt/cli/frontend_env_command.rb,
lib/belt/cli/lambda_config_command.rb,
lib/belt/cli/frontend_setup_command.rb,
lib/belt/cli/frontend_deploy_command.rb,
lib/belt/controllers/welcome_controller.rb,
lib/belt/cli/routes_command/schema_loader.rb,
lib/belt/cli/routes_command/route_inference.rb
Defined Under Namespace
Modules: CLI, Generators, Helpers, Inflector, LambdaHandler, Observability, Rendering Classes: ActionNotFound, ActionRouter, ApiGateway, Application, AuthenticationError, ContextBuilder, MemberCollectionBuilder, NestedResourceBuilder, RecordNotFound, RequestModelBuilder, ResponseModelBuilder, Route, RouteDSL, SchemaBuilder, TableInference, TemplateNotFound, WelcomeController
Constant Summary collapse
- VERSION =
'0.2.9'
Class Attribute Summary collapse
-
.controller_paths ⇒ Object
readonly
Returns the value of attribute controller_paths.
Class Method Summary collapse
-
.all_controller_paths ⇒ Object
All controller paths: app-defined + gem-discovered.
-
.all_model_paths ⇒ Object
All gem model paths that exist on disk.
- .application ⇒ Object
-
.gem_controller_paths ⇒ Object
Auto-discover lambda/controllers dirs in all loaded gems.
-
.gem_model_paths ⇒ Object
Auto-discover lambda/models dirs in all loaded gems.
-
.lambda_config_dir ⇒ Object
Resolves the lambda config directory.
-
.reset_gem_paths! ⇒ Object
Reset cached paths (useful in tests).
- .root ⇒ Object
- .root=(path) ⇒ Object
-
.routes_file ⇒ Object
Resolves the path to routes.tf.rb, checking config/ first then infrastructure/ (legacy).
-
.schema_file ⇒ Object
Resolves the path to schema.tf.rb, checking config/ first then infrastructure/ (legacy).
Class Attribute Details
.controller_paths ⇒ Object (readonly)
Returns the value of attribute controller_paths.
19 20 21 |
# File 'lib/belt.rb', line 19 def controller_paths @controller_paths end |
Class Method Details
.all_controller_paths ⇒ Object
All controller paths: app-defined + gem-discovered
32 33 34 |
# File 'lib/belt.rb', line 32 def all_controller_paths controller_paths + gem_controller_paths end |
.all_model_paths ⇒ Object
All gem model paths that exist on disk
37 38 39 |
# File 'lib/belt.rb', line 37 def all_model_paths gem_model_paths end |
.application ⇒ Object
495 496 497 |
# File 'lib/belt/route_dsl.rb', line 495 def application @application ||= Application.new end |
.gem_controller_paths ⇒ Object
Auto-discover lambda/controllers dirs in all loaded gems
22 23 24 |
# File 'lib/belt.rb', line 22 def gem_controller_paths @gem_controller_paths ||= discover_gem_paths('lambda/controllers') end |
.gem_model_paths ⇒ Object
Auto-discover lambda/models dirs in all loaded gems
27 28 29 |
# File 'lib/belt.rb', line 27 def gem_model_paths @gem_model_paths ||= discover_gem_paths('lambda/models') end |
.lambda_config_dir ⇒ Object
Resolves the lambda config directory.
31 32 33 |
# File 'lib/belt/root.rb', line 31 def self.lambda_config_dir File.join(root, 'config/lambda') end |
.reset_gem_paths! ⇒ Object
Reset cached paths (useful in tests)
42 43 44 45 |
# File 'lib/belt.rb', line 42 def reset_gem_paths! @gem_controller_paths = nil @gem_model_paths = nil end |
.root ⇒ Object
4 5 6 |
# File 'lib/belt/root.rb', line 4 def self.root @root ||= detect_root end |
.root=(path) ⇒ Object
8 9 10 |
# File 'lib/belt/root.rb', line 8 def self.root=(path) @root = path end |
.routes_file ⇒ Object
Resolves the path to routes.tf.rb, checking config/ first then infrastructure/ (legacy).
13 14 15 16 17 18 19 |
# File 'lib/belt/root.rb', line 13 def self.routes_file candidates = [ File.join(root, 'config/routes.tf.rb'), File.join(root, 'infrastructure/routes.tf.rb') ] candidates.find { |f| File.exist?(f) } end |
.schema_file ⇒ Object
Resolves the path to schema.tf.rb, checking config/ first then infrastructure/ (legacy).
22 23 24 25 26 27 28 |
# File 'lib/belt/root.rb', line 22 def self.schema_file candidates = [ File.join(root, 'config/schema.tf.rb'), File.join(root, 'infrastructure/schema.tf.rb') ] candidates.find { |f| File.exist?(f) } end |