Class: Vert::Configuration
- Inherits:
-
Object
- Object
- Vert::Configuration
- Defined in:
- lib/vert/configuration.rb
Overview
Configuração central da gem. Todos os recursos são opcionais e ativados no initializer.
Instance Attribute Summary collapse
-
#auto_mount_health_routes ⇒ Object
— Health —.
-
#document_service_url ⇒ Object
— Document service client —.
-
#enable_auditable ⇒ Object
— Flags de funcionalidade (todos opcionais) —.
-
#enable_authorization ⇒ Object
— Flags de funcionalidade (todos opcionais) —.
-
#enable_company_scoped ⇒ Object
— Flags de funcionalidade (todos opcionais) —.
-
#enable_document_storeable ⇒ Object
— Flags de funcionalidade (todos opcionais) —.
-
#enable_health ⇒ Object
— Flags de funcionalidade (todos opcionais) —.
-
#enable_jwt_auth ⇒ Object
— Flags de funcionalidade (todos opcionais) —.
-
#enable_multi_tenant ⇒ Object
— Flags de funcionalidade (todos opcionais) —.
-
#enable_outbox ⇒ Object
— Flags de funcionalidade (todos opcionais) —.
-
#enable_rls ⇒ Object
— Flags de funcionalidade (todos opcionais) —.
-
#enable_soft_deletable ⇒ Object
— Flags de funcionalidade (todos opcionais) —.
-
#enable_uuid_primary_key ⇒ Object
— Flags de funcionalidade (todos opcionais) —.
-
#exchange_name ⇒ Object
— RabbitMQ / Outbox —.
-
#health_check_database ⇒ Object
— Health —.
-
#health_check_path ⇒ Object
— Health —.
-
#health_check_rabbitmq ⇒ Object
— Health —.
-
#health_check_redis ⇒ Object
— Health —.
-
#health_check_sidekiq ⇒ Object
— Health —.
-
#rabbitmq_url ⇒ Object
— RabbitMQ / Outbox —.
-
#rls_user ⇒ Object
— RLS (Row Level Security) —.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/vert/configuration.rb', line 41 def initialize # Funcionalidades desativadas por padrão; ative no initializer conforme necessário @enable_rls = false @enable_outbox = false @enable_health = true @enable_authorization = false @enable_jwt_auth = false @enable_multi_tenant = false @enable_auditable = false @enable_soft_deletable = false @enable_uuid_primary_key = false @enable_company_scoped = false @enable_document_storeable = false # Production: set RABBITMQ_URL, DOCUMENT_SERVICE_URL, REDIS_URL via ENV; do not rely on defaults. @rls_user = ENV.fetch("RLS_USER", "app_user") @rabbitmq_url = ENV.fetch("RABBITMQ_URL", "amqp://vfarma:vfarma123@localhost:5672/") @exchange_name = ENV.fetch("RABBITMQ_EXCHANGE", "verticalerp.events") @document_service_url = ENV.fetch("DOCUMENT_SERVICE_URL", "http://localhost:3020") @health_check_path = "/health" @auto_mount_health_routes = false @health_check_database = true @health_check_redis = false @health_check_rabbitmq = false @health_check_sidekiq = false end |
Instance Attribute Details
#auto_mount_health_routes ⇒ Object
— Health —
37 38 39 |
# File 'lib/vert/configuration.rb', line 37 def auto_mount_health_routes @auto_mount_health_routes end |
#document_service_url ⇒ Object
— Document service client —
34 35 36 |
# File 'lib/vert/configuration.rb', line 34 def document_service_url @document_service_url end |
#enable_auditable ⇒ Object
— Flags de funcionalidade (todos opcionais) —
15 16 17 |
# File 'lib/vert/configuration.rb', line 15 def enable_auditable @enable_auditable end |
#enable_authorization ⇒ Object
— Flags de funcionalidade (todos opcionais) —
15 16 17 |
# File 'lib/vert/configuration.rb', line 15 def @enable_authorization end |
#enable_company_scoped ⇒ Object
— Flags de funcionalidade (todos opcionais) —
15 16 17 |
# File 'lib/vert/configuration.rb', line 15 def enable_company_scoped @enable_company_scoped end |
#enable_document_storeable ⇒ Object
— Flags de funcionalidade (todos opcionais) —
15 16 17 |
# File 'lib/vert/configuration.rb', line 15 def enable_document_storeable @enable_document_storeable end |
#enable_health ⇒ Object
— Flags de funcionalidade (todos opcionais) —
15 16 17 |
# File 'lib/vert/configuration.rb', line 15 def enable_health @enable_health end |
#enable_jwt_auth ⇒ Object
— Flags de funcionalidade (todos opcionais) —
15 16 17 |
# File 'lib/vert/configuration.rb', line 15 def enable_jwt_auth @enable_jwt_auth end |
#enable_multi_tenant ⇒ Object
— Flags de funcionalidade (todos opcionais) —
15 16 17 |
# File 'lib/vert/configuration.rb', line 15 def enable_multi_tenant @enable_multi_tenant end |
#enable_outbox ⇒ Object
— Flags de funcionalidade (todos opcionais) —
15 16 17 |
# File 'lib/vert/configuration.rb', line 15 def enable_outbox @enable_outbox end |
#enable_rls ⇒ Object
— Flags de funcionalidade (todos opcionais) —
15 16 17 |
# File 'lib/vert/configuration.rb', line 15 def enable_rls @enable_rls end |
#enable_soft_deletable ⇒ Object
— Flags de funcionalidade (todos opcionais) —
15 16 17 |
# File 'lib/vert/configuration.rb', line 15 def enable_soft_deletable @enable_soft_deletable end |
#enable_uuid_primary_key ⇒ Object
— Flags de funcionalidade (todos opcionais) —
15 16 17 |
# File 'lib/vert/configuration.rb', line 15 def enable_uuid_primary_key @enable_uuid_primary_key end |
#exchange_name ⇒ Object
— RabbitMQ / Outbox —
31 32 33 |
# File 'lib/vert/configuration.rb', line 31 def exchange_name @exchange_name end |
#health_check_database ⇒ Object
— Health —
37 38 39 |
# File 'lib/vert/configuration.rb', line 37 def health_check_database @health_check_database end |
#health_check_path ⇒ Object
— Health —
37 38 39 |
# File 'lib/vert/configuration.rb', line 37 def health_check_path @health_check_path end |
#health_check_rabbitmq ⇒ Object
— Health —
37 38 39 |
# File 'lib/vert/configuration.rb', line 37 def health_check_rabbitmq @health_check_rabbitmq end |
#health_check_redis ⇒ Object
— Health —
37 38 39 |
# File 'lib/vert/configuration.rb', line 37 def health_check_redis @health_check_redis end |
#health_check_sidekiq ⇒ Object
— Health —
37 38 39 |
# File 'lib/vert/configuration.rb', line 37 def health_check_sidekiq @health_check_sidekiq end |
#rabbitmq_url ⇒ Object
— RabbitMQ / Outbox —
31 32 33 |
# File 'lib/vert/configuration.rb', line 31 def rabbitmq_url @rabbitmq_url end |
#rls_user ⇒ Object
— RLS (Row Level Security) —
28 29 30 |
# File 'lib/vert/configuration.rb', line 28 def rls_user @rls_user end |