diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-29 07:31:00 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-29 07:31:00 +0000 |
commit | 24e3dbb8062e3435fd74dea590229ea841bf45a9 (patch) | |
tree | 2dada723f468369f99bf8378c3ba14c62cef8106 /railties | |
parent | 41943847046e188261ebf2336f83f65fc4b80fbd (diff) | |
download | rails-24e3dbb8062e3435fd74dea590229ea841bf45a9.tar.gz rails-24e3dbb8062e3435fd74dea590229ea841bf45a9.tar.bz2 rails-24e3dbb8062e3435fd74dea590229ea841bf45a9.zip |
Add default Mac + DarwinPorts MySQL socket locations to the app generator.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2800 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 16 |
2 files changed, 13 insertions, 5 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 14b478e3db..cdf56c7dcc 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Add default Mac + DarwinPorts MySQL socket locations to the app generator. [Jeremy Kemper] + * Migrations may be destroyed: script/destroy migration foo. #2635 [Charles M. Gerungan <charles.gerungan@gmail.com>, Jamis Buck, Jeremy Kemper] * Added that plugins can carry generators and that generator stub files can be created along with new plugins using script/generate plugin <name> --with-generator [DHH] diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index e43a0433ae..3d7f9e1652 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -11,7 +11,7 @@ class AppGenerator < Rails::Generator::Base super usage if args.empty? @destination_root = args.shift - @socket = MYSQL_SOCKET_LOCATIONS.find {|f| File.exists?(f) } + @socket = MYSQL_SOCKET_LOCATIONS.find { |f| File.exists?(f) } @socket = '/path/to/your/mysql.sock' if @socket.blank? end @@ -128,8 +128,14 @@ class AppGenerator < Rails::Generator::Base vendor/plugins ) - MYSQL_SOCKET_LOCATIONS = [ "/tmp/mysql.sock", #default - "/var/run/mysqld/mysqld.sock", #debian/gentoo - "/var/tmp/mysql.sock", # freebsd - "/var/lib/mysql/mysql.sock" ] #fedora + MYSQL_SOCKET_LOCATIONS = [ + "/tmp/mysql.sock", # default + "/var/run/mysqld/mysqld.sock", # debian/gentoo + "/var/tmp/mysql.sock", # freebsd + "/var/lib/mysql/mysql.sock", # fedora + "/opt/local/lib/mysql/mysql.sock", # fedora + "/opt/local/var/run/mysqld/mysqld.sock", # mac + darwinports + mysql + "/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4 + "/opt/local/var/run/mysql5/mysqld.sock" # mac + darwinports + mysql5 + ] end |