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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f366197388646246ec6d819c6877f846fd732a3f0df79673c23e7d5883057d78
4
- data.tar.gz: 72a2af511d588e32622444068d1e26cc57114debd08cade8b88399cf3ad297e8
3
+ metadata.gz: 88b2644a74013b8c15f3ce2f4bb270cdb6603c19eba19221fe4cefa1bb0ac859
4
+ data.tar.gz: 6ea80cb79adbe607ca93ca5710fce0a5b0fef1a22f24209811082b8ab7993261
5
5
  SHA512:
6
- metadata.gz: c3da7a34231c3161e4f65291aa78b304d94213d06cdefa7f0e5cfa0318772db56906ee27391610be9bcd18e640db4481c00eee40b9341f183b5877063c3d1120
7
- data.tar.gz: b6d2e214d3dcaef57c7f774a934a814dca2c4d8a355d79721a0cfcc3d8f377bec36f7f1dd289d36a06fbcc6a695a09c6f61027fa6177d0e39419abda0c688492
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.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,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.3
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-20 00:00:00.000000000 Z
11
+ date: 2023-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: dry-configurable
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.1'
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