From d9b92ee11b33fed5c7a94a91415fa846705f7dd3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 18 Nov 2008 14:23:13 +0100 Subject: Added config.i18n settings gatherer to config/environment, auto-loading of all locales in config/locales/*.rb,yml, and config/locales/en.yml as a sample locale [DHH] --- railties/configs/locales/en.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 railties/configs/locales/en.yml (limited to 'railties/configs') diff --git a/railties/configs/locales/en.yml b/railties/configs/locales/en.yml new file mode 100644 index 0000000000..f265c068d8 --- /dev/null +++ b/railties/configs/locales/en.yml @@ -0,0 +1,5 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en: + hello: "Hello world" \ No newline at end of file -- cgit v1.2.3 From f42c77f927eb49b00e84d355e07de48723d03fcb Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 22 Nov 2008 18:06:08 +0100 Subject: Added ActiveSupport::BacktraceCleaner and Rails::BacktraceCleaner for cutting down on backtrace noise (inspired by the Thoughtbot Quiet Backtrace plugin) [DHH] --- railties/configs/initializers/backtrace_silencers.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 railties/configs/initializers/backtrace_silencers.rb (limited to 'railties/configs') diff --git a/railties/configs/initializers/backtrace_silencers.rb b/railties/configs/initializers/backtrace_silencers.rb new file mode 100644 index 0000000000..c2169ed01c --- /dev/null +++ b/railties/configs/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code. +# Rails.backtrace_cleaner.remove_silencers! \ No newline at end of file -- cgit v1.2.3 From 4b36f76e7a997fb03a6cccb08b8272ddccde5a3e Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 22 Nov 2008 14:13:23 -0600 Subject: missed lighttpd config --- railties/configs/lighttpd.conf | 54 ------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 railties/configs/lighttpd.conf (limited to 'railties/configs') diff --git a/railties/configs/lighttpd.conf b/railties/configs/lighttpd.conf deleted file mode 100644 index ed68d714bb..0000000000 --- a/railties/configs/lighttpd.conf +++ /dev/null @@ -1,54 +0,0 @@ -# Default configuration file for the lighttpd web server -# Start using ./script/server lighttpd - -server.bind = "0.0.0.0" -server.port = 3000 - -server.modules = ( "mod_rewrite", "mod_accesslog", "mod_fastcgi", "mod_compress", "mod_expire" ) - -server.error-handler-404 = "/dispatch.fcgi" -server.pid-file = CWD + "/tmp/pids/lighttpd.pid" -server.document-root = CWD + "/public/" - -server.errorlog = CWD + "/log/lighttpd.error.log" -accesslog.filename = CWD + "/log/lighttpd.access.log" - -url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" ) - -compress.filetype = ( "text/plain", "text/html", "text/css", "text/javascript" ) -compress.cache-dir = CWD + "/tmp/cache" - -expire.url = ( "/favicon.ico" => "access 3 days", - "/images/" => "access 3 days", - "/stylesheets/" => "access 3 days", - "/javascripts/" => "access 3 days" ) - - -# Change *-procs to 2 if you need to use Upload Progress or other tasks that -# *need* to execute a second request while the first is still pending. -fastcgi.server = ( ".fcgi" => ( "localhost" => ( - "min-procs" => 1, - "max-procs" => 1, - "socket" => CWD + "/tmp/sockets/fcgi.socket", - "bin-path" => CWD + "/public/dispatch.fcgi", - "bin-environment" => ( "RAILS_ENV" => "development" ) -) ) ) - -mimetype.assign = ( - ".css" => "text/css", - ".gif" => "image/gif", - ".htm" => "text/html", - ".html" => "text/html", - ".jpeg" => "image/jpeg", - ".jpg" => "image/jpeg", - ".js" => "text/javascript", - ".png" => "image/png", - ".swf" => "application/x-shockwave-flash", - ".txt" => "text/plain" -) - -# Making sure file uploads above 64k always work when using IE or Safari -# For more information, see http://trac.lighttpd.net/trac/ticket/360 -$HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" { - server.max-keep-alive-requests = 0 -} -- cgit v1.2.3 From eea5dc3a34328267407f2cb861e14d9d1f5d7c02 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 24 Nov 2008 11:09:06 +0100 Subject: Removed the old .htaccess as it is no longer used --- railties/configs/apache.conf | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 railties/configs/apache.conf (limited to 'railties/configs') diff --git a/railties/configs/apache.conf b/railties/configs/apache.conf deleted file mode 100644 index d9d211c058..0000000000 --- a/railties/configs/apache.conf +++ /dev/null @@ -1,40 +0,0 @@ -# General Apache options -AddHandler fastcgi-script .fcgi -AddHandler cgi-script .cgi -Options +FollowSymLinks +ExecCGI - -# If you don't want Rails to look in certain directories, -# use the following rewrite rules so that Apache won't rewrite certain requests -# -# Example: -# RewriteCond %{REQUEST_URI} ^/notrails.* -# RewriteRule .* - [L] - -# Redirect all requests not available on the filesystem to Rails -# By default the cgi dispatcher is used which is very slow -# -# For better performance replace the dispatcher with the fastcgi one -# -# Example: -# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] -RewriteEngine On - -# If your Rails application is accessed via an Alias directive, -# then you MUST also set the RewriteBase in this htaccess file. -# -# Example: -# Alias /myrailsapp /path/to/myrailsapp/public -# RewriteBase /myrailsapp - -RewriteRule ^$ index.html [QSA] -RewriteRule ^([^.]+)$ $1.html [QSA] -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^(.*)$ dispatch.cgi [QSA,L] - -# In case Rails experiences terminal errors -# Instead of displaying this message you can supply a file here which will be rendered instead -# -# Example: -# ErrorDocument 500 /500.html - -ErrorDocument 500 "

Application error

Rails application failed to start properly" -- cgit v1.2.3 From 6e66e7d6460b99bb0877a891aa3fbb789b563123 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 30 Nov 2008 15:53:21 -0600 Subject: Even more polish of the default configration files and split off the session store configuration into its own file --- railties/configs/initializers/session_store.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 railties/configs/initializers/session_store.rb (limited to 'railties/configs') diff --git a/railties/configs/initializers/session_store.rb b/railties/configs/initializers/session_store.rb new file mode 100644 index 0000000000..29bfbe68a8 --- /dev/null +++ b/railties/configs/initializers/session_store.rb @@ -0,0 +1,13 @@ +# Your secret key for verifying cookie session data integrity. +# If you change this key, all old sessions will become invalid! +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +ActionController::Base.session = { + :session_key => '_<%= app_name %>_session', + :secret => '<%= app_secret %>' +} + +# Use the database for sessions instead of the cookie-based default, +# which shouldn't be used to store highly confidential information +# (create the session table with "rake db:sessions:create") +# ActionController::Base.session_store = :active_record_store -- cgit v1.2.3 From 668872efd85291895d3e68f3a5af312973a1be74 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 30 Nov 2008 15:54:44 -0600 Subject: Add restart notice where missing --- railties/configs/initializers/new_rails_defaults.rb | 2 ++ railties/configs/initializers/session_store.rb | 2 ++ 2 files changed, 4 insertions(+) (limited to 'railties/configs') diff --git a/railties/configs/initializers/new_rails_defaults.rb b/railties/configs/initializers/new_rails_defaults.rb index 78e0117cc4..8ec3186c84 100644 --- a/railties/configs/initializers/new_rails_defaults.rb +++ b/railties/configs/initializers/new_rails_defaults.rb @@ -1,3 +1,5 @@ +# Be sure to restart your server when you modify this file. + # These settings change the behavior of Rails 2 apps and will be defaults # for Rails 3. You can remove this initializer when Rails 3 is released. diff --git a/railties/configs/initializers/session_store.rb b/railties/configs/initializers/session_store.rb index 29bfbe68a8..40179e0aa3 100644 --- a/railties/configs/initializers/session_store.rb +++ b/railties/configs/initializers/session_store.rb @@ -1,3 +1,5 @@ +# Be sure to restart your server when you modify this file. + # Your secret key for verifying cookie session data integrity. # If you change this key, all old sessions will become invalid! # Make sure the secret is at least 30 characters and all random, -- cgit v1.2.3