blackstack-db 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blackstack-db/crdb.rb +3 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d09e6d2f5af17a813d5c536f864de997551a9194448902d6c461f4c534b89cea
|
4
|
+
data.tar.gz: 5516cc43d2b141c373f80fcd1140fd32771edb7ddc2592698ed70719bede0ff1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2834217481c0801578b04fe9d0b85517cbb4e38f1a8a148ab7e91650700a0b9d6fb4de9ce4b4de73c308b6c0288fe03903b1b7011c174d38152f8f05283d59af
|
7
|
+
data.tar.gz: b55847daa76635ac4df18db153343a286b4dd8ad9858986c70479a01442beeff46cb4f4ba829ea1300fa189a93c0c87b2daaee007538fcff629283d14e48663a
|
data/lib/blackstack-db/crdb.rb
CHANGED
@@ -140,14 +140,13 @@ module BlackStack
|
|
140
140
|
# This validation checks the connection to the correct database.
|
141
141
|
begin
|
142
142
|
l.logs "Verify database name... "
|
143
|
-
s = @db["SHOW DATABASES"].
|
144
|
-
raise 'Wrong database name' if s !~
|
143
|
+
s = @db["SHOW DATABASES"].all.map { |x| x[:database_name] }.join("\n")
|
144
|
+
raise 'Wrong database name'.red if s !~ /#{Regexp.escape(BlackStack::CRDB::db_name)}/i
|
145
145
|
l.logf "success".green
|
146
146
|
rescue => e
|
147
147
|
l.logf "failed".red
|
148
148
|
l.log e.message
|
149
149
|
end
|
150
|
-
end
|
151
|
-
|
150
|
+
end # test
|
152
151
|
end # module CRDB
|
153
152
|
end # module BlackStack
|