sequel-search-path 0.3.0 → 0.3.1
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 974ce1e8ff45a17c3d4475f34bd2dbe71c1adcc264a9d7e52d2a65ef773bff5a
|
4
|
+
data.tar.gz: e97263155da8128836f9ea1afeb645828c689d8e859692179afd76aabdc1367a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1316a214b9b40187bb510bbb5cd0cee74ca5d2c7f820b036a2545005eb9749d16975c52843b4426c2022faf218a2c48236e5c4adeeab194acdd4bdd0a37ebfc6
|
7
|
+
data.tar.gz: e5b21265755ed63d329c9ea48784f36a7102e4c1431884846b2863662a7b7077db0f9ac9d70ead50dce5c679e0302bf420287bd8af161db44e6886623731cf4f
|
@@ -22,7 +22,7 @@ module Sequel
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def schemas
|
25
|
-
Thread.current[schemas_key] ||=
|
25
|
+
Thread.current[schemas_key] ||= parse_search_path
|
26
26
|
end
|
27
27
|
|
28
28
|
def schemas=(new_schemas)
|
@@ -57,6 +57,14 @@ module Sequel
|
|
57
57
|
|
58
58
|
private
|
59
59
|
|
60
|
+
def parse_search_path
|
61
|
+
search_path.
|
62
|
+
split(/[\s,]+/).
|
63
|
+
map{|s| s.gsub(/\A"|"\z/, '')}.
|
64
|
+
reject{|s| s == '$user'}.
|
65
|
+
map(&:to_sym)
|
66
|
+
end
|
67
|
+
|
60
68
|
def set_search_path(schemas)
|
61
69
|
placeholders = schemas.map{'?'}.join(', ')
|
62
70
|
placeholders = "''" if placeholders.empty?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-search-path
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Hanks
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
136
|
rubyforge_project:
|
137
|
-
rubygems_version: 2.
|
137
|
+
rubygems_version: 2.7.3
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: Easy scoping of Postgres' search_path for Sequel
|