gadget 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gadget.rb +3 -3
- data/lib/gadget/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81afaef3c2ab2c77023e0e8b89ecbf4b2f38795b
|
4
|
+
data.tar.gz: 5e36fbf9faeaf870d7d9d9c4039d4fffe881d19c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a81e148597a096d48f7557ce50a51460faee9fea0bdf9ce43d98cc954417735b8cfbf7e2c697a49d7aeabaa7751584f591d6f5cbd9a7fc09e2f297ae6e368a10
|
7
|
+
data.tar.gz: 70e7140504c889acd899be663c4e02a3ada4356d5843e8a2e74f745f098bb1b7d092f87a81d27dd3688d5405421e6166119f2bdb08cf7490d6b9e52e863ebb19
|
data/lib/gadget.rb
CHANGED
@@ -97,8 +97,8 @@ WHERE t.schemaname = 'public'
|
|
97
97
|
end
|
98
98
|
tuples = rs.reduce({}) do | h, row |
|
99
99
|
name = row['tablename']
|
100
|
-
h[name] ||= { :
|
101
|
-
|
100
|
+
h[name] ||= { :constraints => [] }
|
101
|
+
new_constraint = {
|
102
102
|
:name => row['name'],
|
103
103
|
:kind => case row['constrainttype']
|
104
104
|
when 'c'
|
@@ -117,7 +117,7 @@ WHERE t.schemaname = 'public'
|
|
117
117
|
"*** unknown: '#{row['constrainttype']}'"
|
118
118
|
end,
|
119
119
|
}
|
120
|
-
h[name][:
|
120
|
+
h[name][:constraints] << new_constraint
|
121
121
|
h
|
122
122
|
end
|
123
123
|
rs.clear
|
data/lib/gadget/version.rb
CHANGED