specinfra 1.18.4 → 1.19.0
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 +4 -4
- data/lib/specinfra/command/base.rb +8 -0
- data/lib/specinfra/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: 4125a9c7444240a534f2693abca5513426944f76
|
4
|
+
data.tar.gz: 426a8a155b8e1bad3f8c926e4271a990e04a41d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b84154fff712d7b3fe378a1f1cd278571e34c2b0ad1f3eab55bc835500358b98ac5e51042e715dbb192e196b8ac9224cf7cf9b27da30eb0140c7084c5df77d08
|
7
|
+
data.tar.gz: 24f2e2d5de398662e78883aec586c681a7a3feb134a4f623b6a0c05a7a560d384c9a0c332b276b67a1b4dbdcd7df6d9749f5a5dfa2154e201e848f3cb5e9ac0c
|
@@ -348,6 +348,14 @@ module SpecInfra
|
|
348
348
|
def get_ipaddress_of_host(name)
|
349
349
|
"getent hosts #{escape(name)} | awk '{print $1}'"
|
350
350
|
end
|
351
|
+
|
352
|
+
def check_mysql(host, user, password, database)
|
353
|
+
cmd = "mysql -e 'SHOW DATABASES;' -h #{escape(host)}"
|
354
|
+
cmd = "#{cmd} -u #{escape(user)}" if user
|
355
|
+
cmd = "#{cmd} --password=#{escape(password)}" if password
|
356
|
+
cmd = "#{cmd} #{escape(database)}" if database
|
357
|
+
cmd
|
358
|
+
end
|
351
359
|
end
|
352
360
|
end
|
353
361
|
end
|
data/lib/specinfra/version.rb
CHANGED