active_outbox 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef235321d10ec48e78a45e7b894ef50bffb6e73bf6e7d94971f19ed5f945e137
4
- data.tar.gz: df6f204e1644416d5351af321e8f2cd832b0a7fad22e9d38385902f48e1e146b
3
+ metadata.gz: 2d0e31246689108b94262916f2128e1f1085dadb8b75cb62016a23d7c1a23236
4
+ data.tar.gz: 50caba92044342c95532737086eaebac4422f9a6fc370c84b75763d28f2360e4
5
5
  SHA512:
6
- metadata.gz: f3322c31bd2dd05f239d5373fb772033583407576b5be4b14b184c5d97abc5ba1dd0aa7516e27b0f11519848d381948c8031c79c0d0916eaadd1566e78709d30
7
- data.tar.gz: 803e2a29abded8d24ecd32492c39f19b26103769b47a7952d16114b5073bf5e42711d369e43f8d09e25cd9ce6d446c7492051e661d22f2c24becc66e25e7b66f
6
+ metadata.gz: 906a6d7f317a8d178e20852601d3a52a89655e8bca6d72ebd0adb8dda5aca8d7385ab8fe8a9822380274b8e8c3c9a118e2fe14cf2f9e27c5cb926387b8dd0313
7
+ data.tar.gz: 3523ac574209865c4e061559a9517a434fb8fb43b37756abf512dc67d309bc6cedd6a870a98212de81325f2b0ab128456c42c0f4a05ee943d35c9d9213c60828
@@ -10,16 +10,21 @@ module ActiveOutbox
10
10
  *namespace, klass = name.underscore.upcase.split('/')
11
11
  namespace = namespace.reverse.join('.')
12
12
 
13
- module_parent.const_set('Events', Module.new) unless module_parent.const_defined?('Events')
13
+ module_parent.const_set('ActiveOutbox', Module.new) unless module_parent.const_defined?('ActiveOutbox', false)
14
+
15
+ unless module_parent::ActiveOutbox.const_defined?('Events', false)
16
+ module_parent::ActiveOutbox.const_set('Events', Module.new)
17
+ end
14
18
 
15
19
  { create: 'CREATED', update: 'UPDATED', destroy: 'DESTROYED' }.each do |key, value|
16
20
  const_name = "#{klass}_#{value}"
17
21
 
18
- unless module_parent::Events.const_defined?(const_name)
19
- module_parent::Events.const_set(const_name, "#{const_name}#{namespace.blank? ? '' : '.'}#{namespace}")
22
+ unless module_parent::ActiveOutbox::Events.const_defined?(const_name)
23
+ module_parent::ActiveOutbox::Events.const_set(const_name,
24
+ "#{const_name}#{namespace.blank? ? '' : '.'}#{namespace}")
20
25
  end
21
26
 
22
- event_name = module_parent::Events.const_get(const_name)
27
+ event_name = module_parent::ActiveOutbox::Events.const_get(const_name)
23
28
 
24
29
  send("after_#{key}") { create_outbox!(key, event_name) }
25
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_outbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillermo Aguirre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-16 00:00:00.000000000 Z
11
+ date: 2024-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubygems_version: 3.4.10
79
+ rubygems_version: 3.5.9
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: A Transactional Outbox implementation for ActiveRecord