active_outbox 0.0.3 → 0.0.4

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: f366197388646246ec6d819c6877f846fd732a3f0df79673c23e7d5883057d78
4
- data.tar.gz: 72a2af511d588e32622444068d1e26cc57114debd08cade8b88399cf3ad297e8
3
+ metadata.gz: 1b6c2d51498f61533b935cb0d210cbed4c6159eeee4ae9d142e08564c43a7362
4
+ data.tar.gz: f12ce116296edaf0100e39e927b3a264fac24cc8c66f778a49a7b5ebe2b008fe
5
5
  SHA512:
6
- metadata.gz: c3da7a34231c3161e4f65291aa78b304d94213d06cdefa7f0e5cfa0318772db56906ee27391610be9bcd18e640db4481c00eee40b9341f183b5877063c3d1120
7
- data.tar.gz: b6d2e214d3dcaef57c7f774a934a814dca2c4d8a355d79721a0cfcc3d8f377bec36f7f1dd289d36a06fbcc6a695a09c6f61027fa6177d0e39419abda0c688492
6
+ metadata.gz: 5b0583688cda8d0a641e3ff22624d6ae11976bd664a35ff393bd6fa5b1afe4206acda7bb1f9e6cd66b6c0cd6bde77d5ab57920c5ce07be40425f652571ea9fc1
7
+ data.tar.gz: 252a0cea22365fdb05527ce7fbe9dd59c63e8560cb6d655d07b81e26f4b95af25b424e8d0f28fe5ae9611731a30c980d44c11145450f8501479b96a82ae3c225
@@ -71,11 +71,11 @@ module ActiveOutbox
71
71
  def namespace_outbox_mapping
72
72
  namespace = self.class.name.split('/').first
73
73
 
74
- ActiveOutbox.configuration.outbox_mapping[namespace&.underscore]
74
+ ActiveOutbox.config.outbox_mapping[namespace&.underscore]
75
75
  end
76
76
 
77
77
  def default_outbox_mapping
78
- ActiveOutbox.configuration.outbox_mapping['default']
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,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_outbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
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-20 00:00:00.000000000 Z
11
+ date: 2023-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: dry-configurable
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rails
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -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