Skip to content

Comments

Isolate and namespace CableReady::Installer#295

Merged
marcoroth merged 1 commit intomainfrom
isolate-installer
May 6, 2024
Merged

Isolate and namespace CableReady::Installer#295
marcoroth merged 1 commit intomainfrom
isolate-installer

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

@netlify
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
@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