spectacles 0.5.2 → 0.5.3

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
  SHA1:
3
- metadata.gz: 6bff68ef734659627597aa1deae49e6357b55a1a
4
- data.tar.gz: 9562fb0f911b796007471e34520a8c29a960e943
3
+ metadata.gz: 82b4f3a1f6c49ed3344c2785aa3df557cb0a6da2
4
+ data.tar.gz: 28c778a66c9db7be1675b40710b5050e2140689f
5
5
  SHA512:
6
- metadata.gz: 4195cc3601e942d02ef38564c16b7ac0bacfff12ea6559165b4b673b90cfb230679a9a88bc9db941260d4f8c28d422912ece536a97b71c760783d0f0f977cfc2
7
- data.tar.gz: 51e088f02be3e2a436956339d340376fefb379e4a3164a7c07b24f94a484c39a1d89d9b09016e6ede1a853619bd7d8362d7388243bb49a4a6d0a1862a75c0589
6
+ metadata.gz: 99068ef2f0a6ccaafe0a4893df24bed9746bd34c6e8c5578fabacd1a5697cd536c29ed621937f75ddbb017800c17f2561ee15eada168aee80a116fc0131b8110
7
+ data.tar.gz: 4bceebf90b0546a333c2317b5c786fcdb2bf72b0ca16c8af0e87334f4612db130eef94a3876840df96509b3d7cddebf45e1efe0997908988d9a60c564262757e
@@ -9,7 +9,7 @@ module Spectacles
9
9
  q = <<-SQL
10
10
  SELECT table_name, table_type
11
11
  FROM information_schema.tables
12
- WHERE table_schema IN (#{schemas})
12
+ WHERE table_schema = ANY(current_schemas(false))
13
13
  AND table_type = 'VIEW'
14
14
  SQL
15
15
 
@@ -21,18 +21,13 @@ module Spectacles
21
21
  SELECT view_definition
22
22
  FROM information_schema.views
23
23
  WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name)
24
- AND table_schema IN (#{schemas})
24
+ AND table_schema = ANY(current_schemas(false))
25
25
  AND table_name = '#{view}'
26
26
  SQL
27
27
 
28
28
  view_sql = select_value(q, name) or raise "No view called #{view} found"
29
29
  view_sql.gsub("\"", "\\\"")
30
30
  end
31
-
32
- private
33
- def schemas
34
- schema_search_path.split(/,/).map { |p| quote(p) }.join(',')
35
- end
36
31
  end
37
32
  end
38
33
  end
@@ -1,3 +1,3 @@
1
1
  module Spectacles
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spectacles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Hutchison, Brandon Dewitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-05 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  requirements: []
129
129
  rubyforge_project:
130
- rubygems_version: 2.4.3
130
+ rubygems_version: 2.4.5
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: Spectacles (derived from RailsSQLViews) adds database view functionality