Top Level Namespace
Defined Under Namespace
Modules: DataObjects Classes: MysqlError
Instance Method Summary collapse
-
#default_mysql_config_path ⇒ Object
The first mysql_config binary on PATH …
- #default_prefix ⇒ Object
-
#mysql_config_paths ⇒ Object
All instances of mysql_config on PATH …
Instance Method Details
#default_mysql_config_path ⇒ Object
The first mysql_config binary on PATH …
19 20 21 |
# File 'ext/do_mysql_ext/extconf.rb', line 19 def default_mysql_config_path mysql_config_paths.compact.first end |
#default_prefix ⇒ Object
23 24 25 26 27 28 29 |
# File 'ext/do_mysql_ext/extconf.rb', line 23 def default_prefix if mc = default_mysql_config_path File.dirname(File.dirname(mc)) else "/usr/local" end end |
#mysql_config_paths ⇒ Object
All instances of mysql_config on PATH …
11 12 13 14 15 16 |
# File 'ext/do_mysql_ext/extconf.rb', line 11 def mysql_config_paths ENV['PATH'].split(File::PATH_SEPARATOR).collect do |path| [ "#{path}/mysql_config", "#{path}/mysql_config5" ]. detect { |bin| File.exist?(bin) } end end |