Class: Serverspec::Type::MysqlConfig

Inherits:
Base
  • Object
show all
Defined in:
lib/serverspec/type/mysql_config.rb

Instance Attribute Summary

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#initialize, #inspect, #to_ary, #to_s

Constructor Details

This class inherits a constructor from Serverspec::Type::Base

Instance Method Details

#valueObject



3
4
5
6
7
8
# File 'lib/serverspec/type/mysql_config.rb', line 3

def value
  ret = @runner.run_command("mysqld --verbose --help 2> /dev/null | grep '^#{@name}'")
  val = ret.stdout.match(/#{@name}\s+(.+)$/)[1]
  val = val.to_i if val.match(/^\d+$/)
  val
end