specinfra 1.18.4 → 1.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8317b4e00efd9907dddad5e4d1340efac89d245
4
- data.tar.gz: 0b54192a51afecf9c70db4dafb49a82a43cf924f
3
+ metadata.gz: 4125a9c7444240a534f2693abca5513426944f76
4
+ data.tar.gz: 426a8a155b8e1bad3f8c926e4271a990e04a41d7
5
5
  SHA512:
6
- metadata.gz: cdf9c71716d2d99b75c8c4933cac891e7a44a1dea10df3eb65f243d153ba4d9b4b75482d1a4e710dff06b687c72b3dc39cc4ecd58e72773ed730734fd0d7bab8
7
- data.tar.gz: ab98c78e4600c2c099c9cc2dc0fdf910d44f7a54d83a0589cb6636f58c1ec2562972838058424080aa6a9649324170fd8f200a85052a00db99b739f7d54d5024
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
@@ -1,3 +1,3 @@
1
1
  module SpecInfra
2
- VERSION = "1.18.4"
2
+ VERSION = "1.19.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.4
4
+ version: 1.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita