praxis-mapper 4.1.1 → 4.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a54434e8e0f9299b8ae645f800e93ebbc1b0fae
|
4
|
+
data.tar.gz: 78806cff2fdeda7b7375f8ccc1a68f26addddbfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 668be9af356c5099402fdcfb46533004c5a3cc629085235417e73bdd8688ca061c1c440686aabd515fbe05f82a7acb879770f43037fb6ee9955caf7620d8ed11
|
7
|
+
data.tar.gz: 96effa292125c2d3f3ce5d20eba3f338cf7ef0c4d8c7486c62054626e4840162080a9975942d8fef5989fd19065c4a060c97397b7bcaaf404c606a3f50f65601
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -39,7 +39,7 @@ module Praxis::Mapper
|
|
39
39
|
|
40
40
|
def release(connection_manager, connection)
|
41
41
|
# ensure we only release connections we own, in case
|
42
|
-
# we've acquired a connection from Sequel that
|
42
|
+
# we've acquired a connection from Sequel that
|
43
43
|
# is likely still in use.
|
44
44
|
if (@owned_connections.delete(connection_manager.thread))
|
45
45
|
@connection.pool.send(:sync) do
|
@@ -50,9 +50,9 @@ module Praxis::Mapper
|
|
50
50
|
|
51
51
|
def acquire(thread)
|
52
52
|
# check connection's pool to see if it already has a connection
|
53
|
-
# if so, re-use it. otherwise, acquire a new one and mark that we
|
53
|
+
# if so, re-use it. otherwise, acquire a new one and mark that we
|
54
54
|
# "own" it for future releasing.
|
55
|
-
if
|
55
|
+
if @connection.pool.send(:owned_connection, thread)
|
56
56
|
return true
|
57
57
|
else
|
58
58
|
conn = @connection.pool.send(:acquire, thread)
|
@@ -17,7 +17,7 @@ module Praxis::Mapper
|
|
17
17
|
|
18
18
|
query = data[:query] || Praxis::Mapper::Query::Sql
|
19
19
|
factory_class = data[:factory] || ConnectionFactories::Simple
|
20
|
-
|
20
|
+
|
21
21
|
opts = data[:opts] || {}
|
22
22
|
if query.kind_of? String
|
23
23
|
query = query.constantize
|
@@ -26,14 +26,14 @@ module Praxis::Mapper
|
|
26
26
|
if factory_class.kind_of? String
|
27
27
|
factory_class = factory_class.constantize
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
repositories[repository_name] = {
|
31
31
|
query: query,
|
32
32
|
factory: factory_class.new(**opts, &block)
|
33
33
|
}
|
34
34
|
end
|
35
35
|
|
36
|
-
|
36
|
+
|
37
37
|
def repositories
|
38
38
|
self.class.repositories
|
39
39
|
end
|
@@ -73,7 +73,7 @@ module Praxis::Mapper
|
|
73
73
|
release_one(name)
|
74
74
|
else
|
75
75
|
names = @connections.keys
|
76
|
-
names.each { |
|
76
|
+
names.each { |n| release_one(n) }
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: praxis-mapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep M. Blanquer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-09-
|
12
|
+
date: 2015-09-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: randexp
|