active_outbox 0.0.3 → 0.0.5
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 +2 -2
- data/lib/active_outbox.rb +8 -1
- metadata +18 -5
- data/lib/active_outbox/configuration.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88b2644a74013b8c15f3ce2f4bb270cdb6603c19eba19221fe4cefa1bb0ac859
|
4
|
+
data.tar.gz: 6ea80cb79adbe607ca93ca5710fce0a5b0fef1a22f24209811082b8ab7993261
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a5bce340343c741fd131938504c2040cdf130c6c8b0e989c2600744501e5ab57e248e373ddc6e16241d0d9967242d9885245b8a2a6252027a048bbede4175ae
|
7
|
+
data.tar.gz: 3ae68085af021db07572b7d23b81c85b7e7a16f7c80e340e8fd3e1c68c3e0b37314ad1f4eefe37bc44bdf3b8b3f37329c31f83d76703896855ad211e8a0e2636
|
@@ -71,11 +71,11 @@ module ActiveOutbox
|
|
71
71
|
def namespace_outbox_mapping
|
72
72
|
namespace = self.class.name.split('/').first
|
73
73
|
|
74
|
-
ActiveOutbox.
|
74
|
+
ActiveOutbox.config.outbox_mapping[namespace&.underscore]
|
75
75
|
end
|
76
76
|
|
77
77
|
def default_outbox_mapping
|
78
|
-
ActiveOutbox.
|
78
|
+
ActiveOutbox.config.outbox_mapping['default']
|
79
79
|
end
|
80
80
|
|
81
81
|
def handle_outbox_errors(outbox)
|
data/lib/active_outbox.rb
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'active_outbox/adapter_helper'
|
4
|
-
require 'active_outbox/configuration'
|
5
4
|
require 'active_outbox/errors'
|
6
5
|
require 'active_outbox/generators/active_outbox_generator'
|
7
6
|
require 'active_outbox/outboxable'
|
8
7
|
require 'active_outbox/railtie' if defined?(Rails::Railtie)
|
8
|
+
require 'dry-configurable'
|
9
|
+
|
10
|
+
module ActiveOutbox
|
11
|
+
extend Dry::Configurable
|
12
|
+
|
13
|
+
setting :adapter, default: :sqlite
|
14
|
+
setting :outbox_mapping, default: {}
|
15
|
+
end
|
metadata
CHANGED
@@ -1,27 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_outbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
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-10-
|
11
|
+
date: 2023-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: dry-configurable
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '6.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '6.1'
|
27
41
|
description:
|
@@ -35,7 +49,6 @@ files:
|
|
35
49
|
- bin/outbox
|
36
50
|
- lib/active_outbox.rb
|
37
51
|
- lib/active_outbox/adapter_helper.rb
|
38
|
-
- lib/active_outbox/configuration.rb
|
39
52
|
- lib/active_outbox/errors.rb
|
40
53
|
- lib/active_outbox/generators/active_outbox_generator.rb
|
41
54
|
- lib/active_outbox/generators/templates/migration.rb
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ActiveOutbox
|
4
|
-
class << self
|
5
|
-
attr_accessor :configuration
|
6
|
-
|
7
|
-
def configuration
|
8
|
-
@configuration ||= ActiveOutbox::Configuration.new
|
9
|
-
end
|
10
|
-
|
11
|
-
def reset
|
12
|
-
@configuration = ActiveOutbox::Configuration.new
|
13
|
-
end
|
14
|
-
|
15
|
-
def configure
|
16
|
-
yield(configuration)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
class Configuration
|
21
|
-
attr_accessor :adapter, :outbox_mapping
|
22
|
-
|
23
|
-
def initialize
|
24
|
-
@adapter = :sqlite
|
25
|
-
@outbox_mapping = {}
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|