messaging 4.0.5 → 4.0.6

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: c87e653e527433818875b3b98f39b57e96e0ad4d6d6768af9c447c889bc6a023
4
- data.tar.gz: 1d9022a5ad433b724394abee582ae61c136ca4f2b800251d9a475570189b6e4a
3
+ metadata.gz: 453b65c49cebcc69c61734174427b71bfcb5f8a7a2a3e95accede52187c20d7e
4
+ data.tar.gz: 8fc1ca7183766a39ed816a5cdd20951158d1b374f50f1be37048894d4a208869
5
5
  SHA512:
6
- metadata.gz: 231eb2da912229c56f3fefd8b57b7d2a314ef86d554430a17228b3d94da64100fd8580f1b7f30541e51cd8d787d09b48f0c891a71e7ecee545cbaadbc9957c38
7
- data.tar.gz: c8f73a2c7495625c0e2e37c419358b72cf49495cf4ecaa3442c9c550905534d0d16554bfe9480e15128b135d99012bd727a9917ab3fc0e26b0982a61c9faaaff
6
+ metadata.gz: ae7f4188feebdfbcd9751389f4935cff0642211733c7413647d978aa8bf68fbc2efaa6024ae68a6988214e394de00e16c22f09784fd0b4026e21a2ffdc4f1915
7
+ data.tar.gz: 838050ea4683a816eb080cca3f6595159d4da2a345a9e9fea8b5ac58b69d4e9010eef71f7a74b2cd863ccdcab01a51dd6e3238ea812f9d80548effb28e3fba29
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- messaging (4.0.5)
4
+ messaging (4.0.6)
5
5
  activerecord
6
6
  activesupport
7
7
  after_transaction
@@ -90,7 +90,7 @@ module Messaging
90
90
  end
91
91
 
92
92
  def set_transaction_id
93
- self.transaction_id = connection.select_value('SELECT pg_current_xact_id()')
93
+ self.transaction_id = self.class.connection.select_value('SELECT pg_current_xact_id()')
94
94
  end
95
95
 
96
96
  def validate_expected_version!
@@ -0,0 +1,11 @@
1
+ module Messaging
2
+ module Rails
3
+ module PostgresXid8Type
4
+ def initialize_type_map(m = type_map)
5
+ m.register_type('xid8', ActiveRecord::Type::String.new)
6
+
7
+ super
8
+ end
9
+ end
10
+ end
11
+ end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Messaging
2
- VERSION = '4.0.5'.freeze
2
+ VERSION = '4.0.6'.freeze
3
3
  end
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.5
4
+ version: 4.0.6
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-04 00:00:00.000000000 Z
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