diff options
-rw-r--r-- | railties/Rakefile | 6 | ||||
-rw-r--r-- | railties/doc/apache_protection | 3 | ||||
-rw-r--r-- | railties/doc/index.html | 70 | ||||
-rw-r--r-- | railties/html/index.html | 71 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/webrick_server.rb | 4 |
6 files changed, 73 insertions, 83 deletions
diff --git a/railties/Rakefile b/railties/Rakefile index cbe4a7e82a..351adbe6d8 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -16,7 +16,7 @@ PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}" BASE_DIRS = %w( app config/environments components db doc log lib public script test vendor ) APP_DIRS = %w( apis models controllers helpers views views/layouts ) -PUBLIC_DIRS = %w( images javascripts stylesheets _doc ) +PUBLIC_DIRS = %w( images javascripts stylesheets ) TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/testing ) LOG_FILES = %w( server.log development.log test.log production.log ) @@ -163,10 +163,6 @@ task :copy_test_helpers do cp "helpers/test_helper.rb", "#{PKG_DESTINATION}/test/test_helper.rb" end -task :copy_docs_in_public do - cp "doc/index.html", "#{PKG_DESTINATION}/public/_doc/index.html" -end - task :copy_app_doc_readme do cp "doc/README_FOR_APP", "#{PKG_DESTINATION}/doc/README_FOR_APP" end diff --git a/railties/doc/apache_protection b/railties/doc/apache_protection deleted file mode 100644 index 37676c2c63..0000000000 --- a/railties/doc/apache_protection +++ /dev/null @@ -1,3 +0,0 @@ -Order Deny,Allow -Deny from all -Allow from 127.0.0.1
\ No newline at end of file diff --git a/railties/doc/index.html b/railties/doc/index.html deleted file mode 100644 index 0cc0ecf9d4..0000000000 --- a/railties/doc/index.html +++ /dev/null @@ -1,70 +0,0 @@ -<html> -<head> - <title>Rails: Welcome on board</title> - <style> - body { background-color: #fff; color: #333; } - - body, p, ol, ul, td { - font-family: verdana, arial, helvetica, sans-serif; - font-size: 12px; - line-height: 18px; - } - - li { - margin-bottom: 7px; - } - - pre { - background-color: #eee; - padding: 10px; - font-size: 11px; - } - - a { color: #000; } - a:visited { color: #666; } - a:hover { color: #fff; background-color:#000; } - </style> -</head> -<body> - -<h1>Congratulations, you've put Ruby on Rails!</h1> - -<p><b>Before you move on</b>, verify that the following conditions have been met:</p> - -<ol> - <li>The log directory and the empty log files must be writable to the web server (<code>chmod -R 666 log/*</code>). - <li> - The shebang line in the public/dispatch* files must reference your Ruby installation. <br/> - You might need to change it to <code>#!/usr/bin/env ruby</code> or point directly at the installation. - </li> - <li> - Rails on Apache needs to have the cgi handler and mod_rewrite enabled. <br/> - Somewhere in your httpd.conf, you should have:<br/> - <code>AddHandler cgi-script .cgi</code><br/> - <code>LoadModule rewrite_module libexec/httpd/mod_rewrite.so</code><br/> - <code>AddModule mod_rewrite.c</code> - </li> -</ol> - -<p>Take the following steps to get started:</p> - -<ol> - <li>Create empty development and test databases for your application.<br/> - <small>Recommendation: Use *_development and *_test names, such as basecamp_development and basecamp_test</small><br/> - <small>Warning: Don't point your test database at your development database, it'll destroy the latter on test runs!</small> - <li>Edit config/database.yml with your database settings. - <li>Create controllers and models using the generator in <code>script/generate</code> <br/> - <small>Help: Run the generator with no arguments for documentation</small> - <li>See all the tests run by running <code>rake</code>. - <li>Develop your Rails application! - <li>Setup Apache with <a href="http://www.fastcgi.com">FastCGI</a> (and <a href="http://raa.ruby-lang.org/list.rhtml?name=fcgi">Ruby bindings</a>), if you need better performance -</ol> - -<p> - Having problems getting up and running? First try debugging it yourself by looking at the log files. <br/> - Then try the friendly Rails community <a href="http://www.rubyonrails.org">on the web</a> or <a href="http://www.rubyonrails.org/show/IRC">on IRC</a> - (<a href="irc://irc.freenode.net/#rubyonrails">FreeNode#rubyonrails</a>). -</p> - -</body> -</html> diff --git a/railties/html/index.html b/railties/html/index.html index 4949c64a5a..0cc0ecf9d4 100644 --- a/railties/html/index.html +++ b/railties/html/index.html @@ -1 +1,70 @@ -<html><head><META HTTP-EQUIV="Refresh" CONTENT="0;URL=_doc/index.html"></head></html>
\ No newline at end of file +<html> +<head> + <title>Rails: Welcome on board</title> + <style> + body { background-color: #fff; color: #333; } + + body, p, ol, ul, td { + font-family: verdana, arial, helvetica, sans-serif; + font-size: 12px; + line-height: 18px; + } + + li { + margin-bottom: 7px; + } + + pre { + background-color: #eee; + padding: 10px; + font-size: 11px; + } + + a { color: #000; } + a:visited { color: #666; } + a:hover { color: #fff; background-color:#000; } + </style> +</head> +<body> + +<h1>Congratulations, you've put Ruby on Rails!</h1> + +<p><b>Before you move on</b>, verify that the following conditions have been met:</p> + +<ol> + <li>The log directory and the empty log files must be writable to the web server (<code>chmod -R 666 log/*</code>). + <li> + The shebang line in the public/dispatch* files must reference your Ruby installation. <br/> + You might need to change it to <code>#!/usr/bin/env ruby</code> or point directly at the installation. + </li> + <li> + Rails on Apache needs to have the cgi handler and mod_rewrite enabled. <br/> + Somewhere in your httpd.conf, you should have:<br/> + <code>AddHandler cgi-script .cgi</code><br/> + <code>LoadModule rewrite_module libexec/httpd/mod_rewrite.so</code><br/> + <code>AddModule mod_rewrite.c</code> + </li> +</ol> + +<p>Take the following steps to get started:</p> + +<ol> + <li>Create empty development and test databases for your application.<br/> + <small>Recommendation: Use *_development and *_test names, such as basecamp_development and basecamp_test</small><br/> + <small>Warning: Don't point your test database at your development database, it'll destroy the latter on test runs!</small> + <li>Edit config/database.yml with your database settings. + <li>Create controllers and models using the generator in <code>script/generate</code> <br/> + <small>Help: Run the generator with no arguments for documentation</small> + <li>See all the tests run by running <code>rake</code>. + <li>Develop your Rails application! + <li>Setup Apache with <a href="http://www.fastcgi.com">FastCGI</a> (and <a href="http://raa.ruby-lang.org/list.rhtml?name=fcgi">Ruby bindings</a>), if you need better performance +</ol> + +<p> + Having problems getting up and running? First try debugging it yourself by looking at the log files. <br/> + Then try the friendly Rails community <a href="http://www.rubyonrails.org">on the web</a> or <a href="http://www.rubyonrails.org/show/IRC">on IRC</a> + (<a href="irc://irc.freenode.net/#rubyonrails">FreeNode#rubyonrails</a>). +</p> + +</body> +</html> 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 26fd582c88..347140358b 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -67,7 +67,6 @@ class AppGenerator < Rails::Generator::Base end # Docs - m.template "doc/index.html", "public/_doc/index.html" m.file "doc/README_FOR_APP", "doc/README_FOR_APP" # Logs @@ -107,7 +106,6 @@ class AppGenerator < Rails::Generator::Base doc lib log - public/_doc public/images public/javascripts public/stylesheets diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb index 9357c75e71..26445e403b 100644 --- a/railties/lib/webrick_server.rb +++ b/railties/lib/webrick_server.rb @@ -59,11 +59,11 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet end def add_dot_html(req) - if /^([^.]+)$/ =~ req.path then req.instance_variable_set(:@path_info, "#{$1}.html") end + if /^([^.]+)$/ =~ req.path && req.path != "/" then req.instance_variable_set(:@path_info, "#{$1}.html") end end def remove_dot_html(req) - if /^([^.]+).html$/ =~ req.path then req.instance_variable_set(:@path_info, $1) end + if /^([^.]+).html$/ =~ req.path && req.path != "/" then req.instance_variable_set(:@path_info, $1) end end def handle_dispatch(req, res, origin = nil) |