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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/blackstack-db/crdb.rb +3 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf0c5cdf7acfb91f583f4b1c2acd296e8575a65fa26baafc5c91845ac1b84341
4
- data.tar.gz: 26407def1ad08b2c2ac84cf6d50d71e44f4db60acb48a56ef935cdb967055960
3
+ metadata.gz: d09e6d2f5af17a813d5c536f864de997551a9194448902d6c461f4c534b89cea
4
+ data.tar.gz: 5516cc43d2b141c373f80fcd1140fd32771edb7ddc2592698ed70719bede0ff1
5
5
  SHA512:
6
- metadata.gz: 4665dfbbe3ebde9c392ce305ab052e3ab60fc4024fd095782fed2c8bc059b99d6a1022df48de52cf092cc18caed475d0d0a486dbd4471d8a4de5fc2ea383a3ed
7
- data.tar.gz: da754c75b967522e65839c06376ec56da75eae72b6f7afcef694b456dbf0c466fda401b4d41be549e308bf81c99dd339cdc08182e1b765f6c55cd89b052a23cc
6
+ metadata.gz: 2834217481c0801578b04fe9d0b85517cbb4e38f1a8a148ab7e91650700a0b9d6fb4de9ce4b4de73c308b6c0288fe03903b1b7011c174d38152f8f05283d59af
7
+ data.tar.gz: b55847daa76635ac4df18db153343a286b4dd8ad9858986c70479a01442beeff46cb4f4ba829ea1300fa189a93c0c87b2daaee007538fcff629283d14e48663a
@@ -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"].first.to_s
144
- raise 'Wrong database name' if s !~ /:database_name=>\"#{Regexp.escape(BlackStack::CRDB::db_name)}\"/i
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blackstack-db
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi