simple-sql 0.4.25 → 0.4.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple/sql/version.rb +1 -1
- data/lib/simple/sql.rb +7 -0
- 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: be78e29ecfb20313a18803c0db7ba672e4885ae55aea0b95d4fe7ddf3e2756dc
|
4
|
+
data.tar.gz: 6f3d9166d534128a7dedf5cec597a1c4a56bc8d716d8ae143020068085211e4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3152b319707373f12c484c003ba34048fd8a6e06d89f9ffebfa51b6d5fb1afbf5ca343aaf7341c3db162b91a604006f42da6cb92128c111b0d4d8e2b342c1985
|
7
|
+
data.tar.gz: 737c04854b9c74ba418555638bfcdacbceb516f168eb773b2f75906ed4e63652b12058203992522598934234c5604ffc69c3b5f8e0cd8935311210981b26bcb1
|
data/lib/simple/sql/version.rb
CHANGED
data/lib/simple/sql.rb
CHANGED
@@ -82,8 +82,15 @@ module Simple
|
|
82
82
|
def connect!(database_url = :auto)
|
83
83
|
database_url = Config.determine_url if database_url == :auto
|
84
84
|
|
85
|
+
if Thread.current[:"Simple::SQL.database_url"] == database_url
|
86
|
+
logger.debug "thread #{Thread.current.object_id}: already connected to #{database_url}"
|
87
|
+
return
|
88
|
+
end
|
89
|
+
|
85
90
|
connection = Connection.pg_connection(database_url)
|
86
91
|
self.connector = lambda { connection }
|
92
|
+
|
93
|
+
Thread.current[:"Simple::SQL.database_url"] = database_url
|
87
94
|
end
|
88
95
|
|
89
96
|
# disconnects the current connection.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- radiospiel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-12-
|
12
|
+
date: 2018-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pg_array_parser
|