spectacles 0.5.2 → 0.5.3
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: 82b4f3a1f6c49ed3344c2785aa3df557cb0a6da2
|
|
4
|
+
data.tar.gz: 28c778a66c9db7be1675b40710b5050e2140689f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
|
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
|
data/lib/spectacles/version.rb
CHANGED
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.
|
|
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:
|
|
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.
|
|
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
|