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

Rename Events to ActiveOutbox::Events to avoid conflicts. #22

Merged
merged 6 commits into from
Apr 25, 2024

Conversation

guillermoap
Copy link
Contributor

@guillermoap guillermoap commented Mar 16, 2024

* Issue was raised that the Events const name was pretty common and this could cause conflicts.

* Added false in const_defined so it won't lookup to ancestors.
@guillermoap guillermoap changed the title Rename Events to ActiveOutboxEvents to avoid conflicts. Rename Events to ActiveOutbox::Events to avoid conflicts. Apr 24, 2024
@guillermoap guillermoap marked this pull request as ready for review April 24, 2024 17:33
@@ -10,16 +10,21 @@ module Outboxable
*namespace, klass = name.underscore.upcase.split('/')
namespace = namespace.reverse.join('.')

module_parent.const_set('Events', Module.new) unless module_parent.const_defined?('Events')
module_parent.const_set('ActiveOutbox', Module.new) unless module_parent.const_defined?('ActiveOutbox', false)
Copy link
Member

Choose a reason for hiding this comment

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

what is module_parent ? is it configurable?

What I was saying is that any class created by this gem should go in ::ActiveOutbox namespace

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that would be the module name of where this concern is included. That we are not creating ourselves

Copy link
Member

Choose a reason for hiding this comment

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

hmm ok, I think we are good then

@guillermoap guillermoap merged commit 65a81f9 into main Apr 25, 2024
3 of 4 checks passed
@guillermoap guillermoap deleted the rename-event-constant branch April 25, 2024 15:41
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.

3 participants