From 614e14d815a6134c3dd8898e483a6cae5dcd9a2f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 24 Feb 2005 12:26:30 +0000 Subject: Drop the _doc nonsense and use the index.html straight on git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@791 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/Rakefile | 6 +- railties/doc/apache_protection | 3 - railties/doc/index.html | 70 --------------------- railties/html/index.html | 71 +++++++++++++++++++++- .../generators/applications/app/app_generator.rb | 2 - railties/lib/webrick_server.rb | 4 +- 6 files changed, 73 insertions(+), 83 deletions(-) delete mode 100644 railties/doc/apache_protection delete mode 100644 railties/doc/index.html 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 @@ - - - Rails: Welcome on board - - - - -

Congratulations, you've put Ruby on Rails!

- -

Before you move on, verify that the following conditions have been met:

- -
    -
  1. The log directory and the empty log files must be writable to the web server (chmod -R 666 log/*). -
  2. - The shebang line in the public/dispatch* files must reference your Ruby installation.
    - You might need to change it to #!/usr/bin/env ruby or point directly at the installation. -
  3. -
  4. - Rails on Apache needs to have the cgi handler and mod_rewrite enabled.
    - Somewhere in your httpd.conf, you should have:
    - AddHandler cgi-script .cgi
    - LoadModule rewrite_module libexec/httpd/mod_rewrite.so
    - AddModule mod_rewrite.c -
  5. -
- -

Take the following steps to get started:

- -
    -
  1. Create empty development and test databases for your application.
    - Recommendation: Use *_development and *_test names, such as basecamp_development and basecamp_test
    - Warning: Don't point your test database at your development database, it'll destroy the latter on test runs! -
  2. Edit config/database.yml with your database settings. -
  3. Create controllers and models using the generator in script/generate
    - Help: Run the generator with no arguments for documentation -
  4. See all the tests run by running rake. -
  5. Develop your Rails application! -
  6. Setup Apache with FastCGI (and Ruby bindings), if you need better performance -
- -

- Having problems getting up and running? First try debugging it yourself by looking at the log files.
- Then try the friendly Rails community on the web or on IRC - (FreeNode#rubyonrails). -

- - - 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 @@ - \ No newline at end of file + + + Rails: Welcome on board + + + + +

Congratulations, you've put Ruby on Rails!

+ +

Before you move on, verify that the following conditions have been met:

+ +
    +
  1. The log directory and the empty log files must be writable to the web server (chmod -R 666 log/*). +
  2. + The shebang line in the public/dispatch* files must reference your Ruby installation.
    + You might need to change it to #!/usr/bin/env ruby or point directly at the installation. +
  3. +
  4. + Rails on Apache needs to have the cgi handler and mod_rewrite enabled.
    + Somewhere in your httpd.conf, you should have:
    + AddHandler cgi-script .cgi
    + LoadModule rewrite_module libexec/httpd/mod_rewrite.so
    + AddModule mod_rewrite.c +
  5. +
+ +

Take the following steps to get started:

+ +
    +
  1. Create empty development and test databases for your application.
    + Recommendation: Use *_development and *_test names, such as basecamp_development and basecamp_test
    + Warning: Don't point your test database at your development database, it'll destroy the latter on test runs! +
  2. Edit config/database.yml with your database settings. +
  3. Create controllers and models using the generator in script/generate
    + Help: Run the generator with no arguments for documentation +
  4. See all the tests run by running rake. +
  5. Develop your Rails application! +
  6. Setup Apache with FastCGI (and Ruby bindings), if you need better performance +
+ +

+ Having problems getting up and running? First try debugging it yourself by looking at the log files.
+ Then try the friendly Rails community on the web or on IRC + (FreeNode#rubyonrails). +

+ + + 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) -- cgit v1.2.3