Skip to content

Commit

Permalink
fixed bug w/ encoding default value when creating the database.php co…
Browse files Browse the repository at this point in the history
…nfiguration and fixed bug where after("deploy:symlink", "cake:database:symlink") was not being defined when no database file existed yet on runtime
  • Loading branch information
jadb committed Jan 17, 2010
1 parent 82b190a commit a85a82d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/capcake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,13 @@ def remote_file_exists?(full_path)
_cset :db_name, defaults(Capistrano::CLI.ui.ask("db name [#{application}]:"), application)
_cset :db_prefix, Capistrano::CLI.ui.ask("prefix:")
_cset :db_persistent, defaults(Capistrano::CLI.ui.ask("persistent [false]:"), 'false')
_cset :db_encoding, defaults(Capistrano::CLI.ui.ask("encoding [utf-8]:"), 'utf-8')
_cset :db_encoding, defaults(Capistrano::CLI.ui.ask("encoding [utf8]:"), 'utf8')

template = File.read(File.join(File.dirname(__FILE__), "templates", "database.rphp"))
result = ERB.new(template).result(binding)

put(result, "#{database_path}", :mode => 0644, :via => :scp)
after("deploy:symlink", "cake:database:symlink")
end
desc <<-DESC
Creates MySQL database, database user and grants permissions on DB servers
Expand Down

0 comments on commit a85a82d

Please sign in to comment.