Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate and namespace CableReady::Installer #295

Merged
merged 1 commit into from
May 6, 2024
Merged

Conversation

marcoroth
Copy link
Member

Type of PR

Enhancement

Description

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

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

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing

Copy link

netlify bot commented May 2, 2024

Deploy Preview for cableready ready!

Name Link
🔨 Latest commit a87a16e
🔍 Latest deploy log https://app.netlify.com/sites/cableready/deploys/6633f08ffaf1420008c5b2d2
😎 Deploy Preview https://deploy-preview-295--cableready.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.

marcoroth added a commit to stimulusreflex/stimulus_reflex that referenced this pull request May 6, 2024
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:
stimulusreflex/cable_ready#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.
@marcoroth marcoroth merged commit 7f3b6e6 into main May 6, 2024
19 checks passed
@marcoroth marcoroth deleted the isolate-installer branch May 6, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant