active_outbox 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_outbox/outboxable.rb +9 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d0e31246689108b94262916f2128e1f1085dadb8b75cb62016a23d7c1a23236
|
4
|
+
data.tar.gz: 50caba92044342c95532737086eaebac4422f9a6fc370c84b75763d28f2360e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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('
|
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,
|
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.
|
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:
|
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.
|
79
|
+
rubygems_version: 3.5.9
|
80
80
|
signing_key:
|
81
81
|
specification_version: 4
|
82
82
|
summary: A Transactional Outbox implementation for ActiveRecord
|