stimulusreflex / stimulus_reflex

Build reactive applications with the Rails tooling you already know and love.
https://docs.stimulusreflex.com
MIT License
2.29k stars 174 forks source link

Isolate and namespace `StimulusReflex::Installer` #699

Closed marcoroth closed 6 months ago

marcoroth commented 6 months ago

Type of PR

Enhancement

Description

This pull request isolates the methods defined lib/stimulus_reflex/installer.rb into a StimulusReflex::Installer constant so they don't pollute the global namespace if the file is required.

CableReady got a similar PR: https://github.com/stimulusreflex/cable_ready/pull/295

Why should this be added

Exposing all the methods from the installer in the global namespace could lead to issues down the road. Methods like options are likely to be overridden.

Checklist

netlify[bot] commented 6 months ago

Deploy Preview for stimulusreflex ready!

Name Link
Latest commit 388934cad35ac8db7186b4488ec39a7d337c4121
Latest deploy log https://app.netlify.com/sites/stimulusreflex/deploys/6633fa5d7b0731000825d7cd
Deploy Preview https://deploy-preview-699--stimulusreflex.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.