isolator 1.1.1 → 1.1.2
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: a37693d4626a6bb72e14c00562274a1002c557aca0122182f2422be08e225ad8
|
4
|
+
data.tar.gz: ed49eb36314577217281389ea07d3dcb8c72c30373fd03f6b6609e2d43ea4d99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3c11b5f2da9fa95dc4f167b757e5a0dee3466ead28cb458839b1651b8e6db0631f72b9d1bcc0de239f41adb27b3dbd99aab46cf2d3872bcd462c75aa61aa471
|
7
|
+
data.tar.gz: c9ea41ae4b214da35c3e5c8c53c75c5f8f3b74b620ff5e2f3d1dbfcbb52312f3620ba811829c7a46b82de87cb00420d74b55d1efc7b5a1cd47295ac4eca60afe
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 1.1.2 (2025-10-16)
|
6
|
+
|
7
|
+
- Fix `database_cleaner` support: require `base.rb` explicitly. ([@viralpraxis][])
|
8
|
+
|
9
|
+
- Fix checking for Rails versions between 8.0 and 8.1. ([@sunny][])
|
10
|
+
|
5
11
|
## 1.1.1 (2025-03-12)
|
6
12
|
|
7
13
|
- Fix handling Rails 8 `enqueue_after_transaction_commit` logic. ([@palkan][])
|
data/README.md
CHANGED
@@ -108,7 +108,7 @@ Isolator.configure do |config|
|
|
108
108
|
config.ignorer = Isolator::Ignorer
|
109
109
|
|
110
110
|
# Turn on/off raising exceptions for simultaneous transactions to different databases
|
111
|
-
config.
|
111
|
+
config.disallow_per_thread_concurrent_transactions = false
|
112
112
|
end
|
113
113
|
```
|
114
114
|
|
@@ -132,13 +132,13 @@ Isolator.after_isolate do
|
|
132
132
|
end
|
133
133
|
|
134
134
|
# This callback is called every time a new transaction is open (root or nested)
|
135
|
-
Isolator.
|
135
|
+
Isolator.on_transaction_begin do |event|
|
136
136
|
puts "New transaction from #{event[:connection_id]}. " \
|
137
137
|
"Current depth: #{event[:depth]}"
|
138
138
|
end
|
139
139
|
|
140
140
|
# This callback is called every time a transaction is completed
|
141
|
-
Isolator.
|
141
|
+
Isolator.on_transaction_end do |event|
|
142
142
|
puts "Transaction completed from #{event[:connection_id]}. " \
|
143
143
|
"Current depth: #{event[:depth]}"
|
144
144
|
end
|
@@ -6,7 +6,7 @@ Isolator.isolate :active_job,
|
|
6
6
|
exception_class: Isolator::BackgroundJobError,
|
7
7
|
details_message: ->(obj) {
|
8
8
|
"#{obj.class.name}" \
|
9
|
-
"#{
|
9
|
+
"#{" (#{obj.arguments.join(", ")})" if obj.arguments.any?}"
|
10
10
|
},
|
11
11
|
ignore_on: ->(job) {
|
12
12
|
config = job.class.try(:enqueue_after_transaction_commit)
|
@@ -3,7 +3,8 @@
|
|
3
3
|
require_relative "active_support_subscriber"
|
4
4
|
|
5
5
|
# We rely on this feature introduced in 7.1.0.beta1: https://github.com/rails/rails/pull/49192
|
6
|
-
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
6
|
+
if (ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1) ||
|
7
|
+
ActiveRecord.version >= Gem::Version.new("7.1")
|
7
8
|
require_relative "active_support_transaction_subscriber"
|
8
9
|
Isolator::ActiveSupportTransactionSubscriber.subscribe!
|
9
10
|
else
|
data/lib/isolator/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isolator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sniffer
|