poise / application_ruby

Development repository for Opscode Cookbook application_ruby
Apache License 2.0
124 stars 153 forks source link

database.yml template does not support the socket option #62

Closed nogweii closed 9 years ago

nogweii commented 10 years ago

The mysql2 adapter connects to the UNIX socket specified if both the host and port is not specified, useful when mysql isn't connected to any TCP sockets, and is only listening on the UNIX socket.

So, I imagine that passing the path to the socket as so:

application "my_rails_mysql_app" do
  # ...
  database do
    socket '/var/run/mysqld.sock'
    user 'my_rails_app'
    password 'god_mode'
  end
  # ...
end

would work.

coderanger commented 9 years ago

In 4.0.pre it passes all options directly to the resultant Yaml so you can set anything.