messaging 4.0.5 → 4.0.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d97703c43540975f23e063202772870e7439b03fb6c235a62542db64a59c903
|
4
|
+
data.tar.gz: 4e8a8fc4b255ef40d46faf78e2b632a16b8b2005ff6ee3738f338337fcf2dae5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fca2269ac7b7fa8bb3ab12231dd54c1bfb860d0fa24b9a9eaf616e5a5e58f36c256d838653f26d0019070d27e8082c9a0a638d0012976a4d1c4f014ca210fcf8
|
7
|
+
data.tar.gz: db69ec7bdf8757fc37bae8f450bfa4652dfe3456d18568e33495d4e6e6a1dfe381ef562ec041c4de6bc41df9e32acaf890b5c408da3c5c61216298b234abaf8e
|
data/Gemfile.lock
CHANGED
@@ -30,7 +30,10 @@ module Messaging
|
|
30
30
|
# Rails version < 6
|
31
31
|
def self.instantiate(attributes, *_args)
|
32
32
|
attributes['message_type'].constantize.new(
|
33
|
-
JSON.parse(attributes['data']).merge(
|
33
|
+
JSON.parse(attributes['data']).merge(
|
34
|
+
stream_position: attributes['stream_position'],
|
35
|
+
transaction_id: attributes['transaction_id'],
|
36
|
+
global_position: attributes['id'])
|
34
37
|
)
|
35
38
|
end
|
36
39
|
|
@@ -90,7 +93,7 @@ module Messaging
|
|
90
93
|
end
|
91
94
|
|
92
95
|
def set_transaction_id
|
93
|
-
self.transaction_id = connection.select_value('SELECT pg_current_xact_id()')
|
96
|
+
self.transaction_id = self.class.connection.select_value('SELECT pg_current_xact_id()')
|
94
97
|
end
|
95
98
|
|
96
99
|
def validate_expected_version!
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'rails/railtie'
|
2
2
|
require 'messaging/middleware/after_active_record_transaction'
|
3
3
|
require 'messaging/middleware/rails_wrapper'
|
4
|
+
require 'messaging/rails/postgres_xid8_type'
|
4
5
|
|
5
6
|
module Messaging
|
6
7
|
module Rails
|
@@ -32,6 +33,10 @@ module Messaging
|
|
32
33
|
end
|
33
34
|
end
|
34
35
|
|
36
|
+
initializer 'messaging.add_xid_type' do |_|
|
37
|
+
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend(Messaging::Rails::PostgresXid8Type)
|
38
|
+
end
|
39
|
+
|
35
40
|
config.to_prepare do
|
36
41
|
Messaging.routes.finalize_routes
|
37
42
|
end
|
data/lib/messaging/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: messaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bukowskis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -315,6 +315,7 @@ files:
|
|
315
315
|
- lib/messaging/middleware/after_active_record_transaction.rb
|
316
316
|
- lib/messaging/middleware/rails_wrapper.rb
|
317
317
|
- lib/messaging/publish.rb
|
318
|
+
- lib/messaging/rails/postgres_xid8_type.rb
|
318
319
|
- lib/messaging/rails/railtie.rb
|
319
320
|
- lib/messaging/resque_worker.rb
|
320
321
|
- lib/messaging/routes.rb
|