From 1cc0edd38a7cc597ebd5fddcc99957c1b5c46f34 Mon Sep 17 00:00:00 2001 From: Chris Griego Date: Sat, 19 Jun 2010 01:10:57 -0500 Subject: [PATCH] Strip trailing whitespace from generated applications --- .../rails/generators/rails/app/templates/README | 8 ++++---- .../rails/app/templates/config/databases/mysql.yml | 2 +- .../app/templates/config/databases/oracle.yml | 2 +- .../templates/config/initializers/inflections.rb | 2 +- .../config/initializers/secret_token.rb.tt | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/railties/lib/rails/generators/rails/app/templates/README b/railties/lib/rails/generators/rails/app/templates/README index 9ec6db6..e2764de 100644 --- a/railties/lib/rails/generators/rails/app/templates/README +++ b/railties/lib/rails/generators/rails/app/templates/README @@ -37,7 +37,7 @@ link:files/vendor/rails/actionpack/README.html. 3. Go to http://localhost:3000/ and you'll see: "Welcome aboard: You're riding the Rails!" -4. Follow the guidelines to start developing your application. You can find +4. Follow the guidelines to start developing your application. You can find the following resources handy: * The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html @@ -71,13 +71,13 @@ The result will be a message in your log file along the lines of: More information on how to use the logger is at http://www.ruby-doc.org/core/ -Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are +Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are several books available online as well: * Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe) * Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) -These two books will bring you up to speed on the Ruby language and also on +These two books will bring you up to speed on the Ruby language and also on programming in general. @@ -199,7 +199,7 @@ app/controllers ApplicationController which itself descends from ActionController::Base. app/models - Holds models that should be named like post.rb. Models descend from + Holds models that should be named like post.rb. Models descend from ActiveRecord::Base by default. app/views diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml index 6bf2f7b..ffc8a0a 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml +++ b/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml @@ -52,7 +52,7 @@ production: database: <%= app_name %>_production pool: 5 username: root - password: + password: <% if mysql_socket -%> socket: <%= mysql_socket %> <% else -%> diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml index a1883f6..f99ee93 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml +++ b/railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml @@ -36,4 +36,4 @@ production: adapter: oracle database: <%= app_name %>_production username: <%= app_name %> - password: + password: diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb b/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb index d531b8b..9e8b013 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb @@ -1,6 +1,6 @@ # Be sure to restart your server when you modify this file. -# Add new inflection rules using the following format +# Add new inflection rules using the following format # (all these examples are active by default): # ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/secret_token.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/initializers/secret_token.rb.tt index c2fa31a..22aa576 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/initializers/secret_token.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/secret_token.rb.tt @@ -2,6 +2,6 @@ # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, +# Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. Rails.application.config.secret_token = '<%= app_secret %>' -- 1.6.5