sequel-activerecord_connection 1.2.5 → 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/sequel/extensions/activerecord_connection.rb +11 -7
- data/sequel-activerecord_connection.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa32893e39b55c6e2b8186c216645a4cccfa7e865795e390656ebac83d5ecd1d
|
4
|
+
data.tar.gz: c8d6ba5b2958de6e8e3d687c75f4a51a60c863a1728de525ef222650cd34b490
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fba2ec585154bfd9477b2ace86b7c6b6b36cc5b4ba11f21a62bde593b1c8069858fb33d4984dced898b02a831f75fd2219c43adb26d67b93d17ce0313965c30a
|
7
|
+
data.tar.gz: 685f0dd698849465d1902ee7cd4432d2de6ea25f7791707a6defae8f32ff0e66713a4f391573924e79dfe3f91723fa564083b1dbefbf2c2986047205fe024aec
|
data/CHANGELOG.md
CHANGED
@@ -133,14 +133,18 @@ module Sequel
|
|
133
133
|
# Active Record doesn't guarantee that a single connection can only be used
|
134
134
|
# by one thread at a time, so we need to use locking, which is what Active
|
135
135
|
# Record does internally as well.
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
136
|
+
if ActiveRecord.version >= Gem::Version.new("5.1.0")
|
137
|
+
def activerecord_lock
|
138
|
+
activerecord_connection.lock.synchronize do
|
139
|
+
ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
|
140
|
+
yield
|
141
|
+
end
|
142
142
|
end
|
143
143
|
end
|
144
|
+
else
|
145
|
+
def activerecord_lock
|
146
|
+
yield
|
147
|
+
end
|
144
148
|
end
|
145
149
|
|
146
150
|
def activerecord_connection
|
@@ -157,7 +161,7 @@ module Sequel
|
|
157
161
|
)
|
158
162
|
end
|
159
163
|
|
160
|
-
if ActiveRecord
|
164
|
+
if ActiveRecord.version >= Gem::Version.new("7.0")
|
161
165
|
def activerecord_timezone
|
162
166
|
ActiveRecord.default_timezone
|
163
167
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-activerecord_connection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|