From 7d6f78377a1cc7208edf16af15fd3671dc9d3c33 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 22 Jul 2005 06:18:25 +0000 Subject: Added an empty robots.txt to public/, so that web servers asking for it won't trigger a dynamic call, like favicon.ico #1738 [michael@schubert] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1876 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 ++ railties/Rakefile | 2 +- railties/html/robots.txt | 1 + .../lib/rails_generator/generators/applications/app/app_generator.rb | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 railties/html/robots.txt (limited to 'railties') diff --git a/railties/CHANGELOG b/railties/CHANGELOG index fcef50e3d9..a343069635 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Added an empty robots.txt to public/, so that web servers asking for it won't trigger a dynamic call, like favicon.ico #1738 [michael@schubert] + * Dropped the 'immediate close-down' of FCGI processes since it didn't work consistently and produced bad responses when it didn't. So now a TERM ensures exit after the next request (just as if the process is handling a request when it receives the signal). This means that you'll have to 'nudge' all FCGI processes with a request in order to ensure that they have all reloaded. This can be done by something like ./script/process/repear --nudge 'http://www.myapp.com' --instances 10, which will load the myapp site 10 times (and thus hit all of the 10 FCGI processes once, enough to shut down). diff --git a/railties/Rakefile b/railties/Rakefile index f93e677638..1cb1150bf8 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -32,7 +32,7 @@ PUBLIC_DIRS = %w( images javascripts stylesheets ) TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/test ) LOG_FILES = %w( server.log development.log test.log production.log ) -HTML_FILES = %w( 404.html 500.html index.html favicon.ico javascripts/prototype.js javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js ) +HTML_FILES = %w( 404.html 500.html index.html robots.txt favicon.ico javascripts/prototype.js javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js ) BIN_FILES = %w( generate destroy breakpointer console server update runner profiler benchmarker ) # listener tracker VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport actionwebservice railties ) diff --git a/railties/html/robots.txt b/railties/html/robots.txt new file mode 100644 index 0000000000..4ab9e89fe1 --- /dev/null +++ b/railties/html/robots.txt @@ -0,0 +1 @@ +# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file \ No newline at end of file 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 3ad3c30784..f83b518875 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -64,6 +64,7 @@ class AppGenerator < Rails::Generator::Base end m.template "html/favicon.ico", "public/favicon.ico" + m.template "html/robots.txt", "public/robots.txt" # Javascripts m.file "html/javascripts/prototype.js", "public/javascripts/prototype.js" -- cgit v1.2.3