sequel-activerecord_connection 0.2.1 → 0.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3007b81d8906ff8ddbac1e5e5adadbc555eddacf6dbd7ef92d9062a72d3a751
|
4
|
+
data.tar.gz: 9e1ee7db2f4ee482abe17ee893d9f222325ec95f24e6a3ada63b1f5c10f94634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d73aba0aa9bd41b9a66fab9d3da6db349bf0b2ae39fb3354243146485b5b647f00c55d89887d026752dc5b007fc2504f2d69a01e86f1f712d0494277cb8b4af1
|
7
|
+
data.tar.gz: cfbb41ff961d3c5b83d0ab21cb90706ff5a472e666dc469fbf1f9be4dd4b6d8407b5e93f89cdc6d2778e1fc3a6c0fd99a205e51a49851af129f0455efdb0a1fa
|
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# Sequel::ActiveRecordConnection
|
2
2
|
|
3
3
|
This is an extension for [Sequel] that allows it to reuse an existing
|
4
|
-
ActiveRecord connection for database interaction. It
|
5
|
-
`mysql2` and `sqlite3`
|
4
|
+
ActiveRecord connection for database interaction. It works on ActiveRecord 4.2
|
5
|
+
or higher, and supports the built-in `postgresql`, `mysql2` and `sqlite3`
|
6
|
+
adapters.
|
6
7
|
|
7
8
|
This can be useful if you're using a library that uses Sequel for database
|
8
9
|
interaction (e.g. [Rodauth]), but you want to avoid creating a separate
|
@@ -75,6 +75,14 @@ module Sequel
|
|
75
75
|
def activerecord_connection
|
76
76
|
activerecord_model.connection
|
77
77
|
end
|
78
|
+
|
79
|
+
def activesupport_interlock(&block)
|
80
|
+
if ActiveSupport::Dependencies.respond_to?(:interlock)
|
81
|
+
ActiveSupport::Dependencies.interlock.permit_concurrent_loads(&block)
|
82
|
+
else
|
83
|
+
yield
|
84
|
+
end
|
85
|
+
end
|
78
86
|
end
|
79
87
|
|
80
88
|
Database.register_extension(:activerecord_connection, ActiveRecordConnection)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "sequel-activerecord_connection"
|
3
|
-
spec.version = "0.2.
|
3
|
+
spec.version = "0.2.2"
|
4
4
|
spec.authors = ["Janko Marohnić"]
|
5
5
|
spec.email = ["janko.marohnic@gmail.com"]
|
6
6
|
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.2.0")
|
13
13
|
|
14
14
|
spec.add_dependency "sequel", ">= 4.0", "< 6"
|
15
|
-
spec.add_dependency "activerecord", ">=
|
15
|
+
spec.add_dependency "activerecord", ">= 4.2", "< 7"
|
16
16
|
|
17
17
|
spec.add_development_dependency "pg", "~> 1.0"
|
18
18
|
spec.add_development_dependency "mysql2", "~> 0.5"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-activerecord_connection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '4.2'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '7'
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
49
|
+
version: '4.2'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '7'
|