ruby_event_store-outbox 0.0.19 → 0.0.22

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: b78f20ac9a815274e65c78322746557d961af6b05982d2ebd828f65186002982
4
- data.tar.gz: 4a88357afd1a360398d8c1b3fe1fe6081f6e5c05169ba892d16cd701dfd38b53
3
+ metadata.gz: cf41fff7a72941537c0247985765f8ca110bc17f14f1e886fca032f172ec918b
4
+ data.tar.gz: cef6f36936589755f6f636f07ef4edbc823b47ddb2a616700ec63558c75361b8
5
5
  SHA512:
6
- metadata.gz: 3d82d744889b4f595ecfb9c16a6ab57817fd3d652e3c30cbe4f4367bf794de41245b82c35ae02e01e73907ae745f829b1fe3486378a8b0685eaed47d25a359fd
7
- data.tar.gz: '058fec9678d6d6db03bc58c1e982ebce51547714dccf657ab5dd2161f2de55af0d07cd44b15e286e9186626c3cb4ad087fd100b118f235fdd7650163ca2a9f68'
6
+ metadata.gz: 30f86dcda05b796a4adce6cfa7643a2c2aa7b492ce6efe72bed540aa14d5477cc8f81dbd6bbf918500c007490f3857bad8cd268351b05b39d16dfa46ba6213e9
7
+ data.tar.gz: 25ecce3dc414e61b775cc618ada4c2449f7be1217ed90637a485b5e372f1a1fd9fab3a8dd681ded98409ddb3537c3d2c156e65dae9527940d847fc52b893a998
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'sidekiq'
4
+ require_relative 'sidekiq5_format'
4
5
  require_relative "repository"
5
6
 
6
7
  module RubyEventStore
@@ -9,11 +10,11 @@ module RubyEventStore
9
10
  def call(klass, args)
10
11
  sidekiq_client = Sidekiq::Client.new(Sidekiq.redis_pool)
11
12
  item = {
13
+ 'args' => args.map(&:to_h).map {|h| h.transform_keys(&:to_s)},
12
14
  'class' => klass,
13
- 'args' => args.map(&:to_h),
14
15
  }
15
16
  normalized_item = sidekiq_client.__send__(:normalize_item, item)
16
- payload = sidekiq_client.__send__(:process_single, normalized_item.fetch('class'), normalized_item)
17
+ payload = sidekiq_client.middleware.invoke(normalized_item['class'], normalized_item, normalized_item['queue'], Sidekiq.redis_pool) { normalized_item }
17
18
  if payload
18
19
  Repository::Record.create!(
19
20
  format: SIDEKIQ5_FORMAT,
@@ -5,7 +5,7 @@ require_relative "sidekiq_producer"
5
5
  module RubyEventStore
6
6
  module Outbox
7
7
  class SidekiqScheduler
8
- def initialize(serializer: YAML)
8
+ def initialize(serializer: RubyEventStore::Serializers::YAML)
9
9
  @serializer = serializer
10
10
  @sidekiq_producer = SidekiqProducer.new
11
11
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RubyEventStore
4
4
  module Outbox
5
- VERSION = "0.0.19"
5
+ VERSION = "0.0.22"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_event_store-outbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-30 00:00:00.000000000 Z
11
+ date: 2022-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby_event_store
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.2'
41
- description:
41
+ description:
42
42
  email: dev@arkency.com
43
43
  executables:
44
44
  - res_outbox
@@ -75,7 +75,7 @@ metadata:
75
75
  source_code_uri: https://github.com/RailsEventStore/rails_event_store
76
76
  bug_tracker_uri: https://github.com/RailsEventStore/rails_event_store/issues
77
77
  rubygems_mfa_required: 'true'
78
- post_install_message:
78
+ post_install_message:
79
79
  rdoc_options: []
80
80
  require_paths:
81
81
  - lib
@@ -90,8 +90,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
- rubygems_version: 3.2.22
94
- signing_key:
93
+ rubygems_version: 3.3.9
94
+ signing_key:
95
95
  specification_version: 4
96
96
  summary: Active Record based outbox for Ruby Event Store
97
97
  test_files: []