Skip to content

Encapsulate the Spotlight config - #2144

Open
jcoyne wants to merge 1 commit into
mainfrom
encapsulate_config
Open

jcoyne wants to merge 1 commit into
mainfrom
encapsulate_config

Conversation

@jcoyne

@jcoyne jcoyne commented Mar 7, 2019

Copy link
Copy Markdown
Member

All values set on Spotlight::Engine.config are actually stored
in a class variable on Railtie::Configuration. So these pollute
that namespace. All other railties are encapsulating their configs
onto a single entry in that scope. This change makes Spotlight do
likewise.

This probably needs to be a major revision

@cbeer cbeer added the v3 label Oct 29, 2019

@hackartisan hackartisan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We looked at this in a PR review ensemble. We're interested in whether this could be made more backwards compatible.

  • could we check first for the spotlight namespaced config, then fall back if it's not found?
  • could we use an initializer to pull the configs we expect to find into a spotlight namespace?
  • other ideas?

All values set on Spotlight::Engine.config are actually stored
in a class variable on Railtie::Configuration. So these pollute
that namespace. All other railties are encapsulating their configs
onto a single entry in that scope. This change makes Spotlight do
likewise.

This probably needs to be a major revision
@jcoyne
jcoyne force-pushed the encapsulate_config branch from 5dd4a6b to 9b545a4 Compare July 15, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants