Class: Pgbus::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- Pgbus::Engine
- Defined in:
- lib/pgbus/engine.rb
Class Method Summary collapse
-
.warn_if_legacy_yaml_config(root, logger) ⇒ Object
Emits the legacy-YAML deprecation warning when +root+/config/pgbus.yml exists.
Class Method Details
.warn_if_legacy_yaml_config(root, logger) ⇒ Object
Emits the legacy-YAML deprecation warning when +root+/config/pgbus.yml exists. Extracted so it can be unit-tested without booting Rails. A nil logger is a no-op (logger may be unset in a bare/embedded boot).
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/pgbus/engine.rb', line 27 def self.warn_if_legacy_yaml_config(root, logger) return if logger.nil? config_path = root.join("config", "pgbus.yml") return unless config_path.exist? logger.warn do "[Pgbus] config/pgbus.yml is no longer loaded (YAML config was removed in 1.0). " \ "Port its settings into config/initializers/pgbus.rb as a Pgbus.configure block " \ "and delete the YAML. See https://pgbus.zoolutions.llc/docs/configuration " \ "(the pgbus MCP server can also help port it)." end end |