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

Move logic to set a specific pack namespace to its own method. #23

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

vaot
Copy link
Contributor

@vaot vaot commented Nov 12, 2024

Context

Applications might want to enforce automatic namespaces based on certain criteria specific to their package.yml, let's say, version: v2, or any other application-specific property. By exposing a public method to do the namespacing, applications can call this method rather than duplicating the code from this gem.

Changes

  • Extract loop logic into its own method where we can define a namespace per pack/metadata
  • Renaming set namespacing method for clarity given the new changes

This allows applications to hook into this public method to do
any on-demand custom namespacing without duplicating the logic
defined in this gem.
@vaot
Copy link
Contributor Author

vaot commented Nov 12, 2024

Hey @gap777, would love to hear your thoughts on this one.

@gap777 gap777 merged commit 3159275 into gap777:main Nov 13, 2024
3 checks passed
@vaot
Copy link
Contributor Author

vaot commented Nov 13, 2024

@gap777 Thank you. One thing that I was hoping to get your take on is: Autoloader is currently private, do you think we can make it public or expose the logic to define the namespace via a different interface?

@gap777
Copy link
Owner

gap777 commented Nov 13, 2024

I just merged your PR, as I thought it satisfied your use case.... please open a new one with the changes you're proposing.

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.

2 participants