<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,7 @@
 # This module is included in your application controller which makes
 # several methods available to all controllers and views. Here's a
 # common example you might add to your application layout file.
-# 
+#
 #   &lt;%% if logged_in? %&gt;
 #     Welcome &lt;%%=h current_&lt;%= user_singular_name %&gt;.username %&gt;! Not you?
 #     &lt;%%= link_to &quot;Log out&quot;, logout_path %&gt;
@@ -9,17 +9,17 @@
 #     &lt;%%= link_to &quot;Sign up&quot;, signup_path %&gt; or
 #     &lt;%%= link_to &quot;log in&quot;, login_path %&gt;.
 #   &lt;%% end %&gt;
-# 
+#
 # You can also restrict unregistered users from accessing a controller using
 # a before filter. For example.
-# 
+#
 #   before_filter :login_required, :except =&gt; [:index, :show]
 module Authentication
   def self.included(controller)
     controller.send :helper_method, :current_&lt;%= user_singular_name %&gt;, :logged_in?, :redirect_to_target_or_default
     controller.filter_parameter_logging :password
   end
-  
+
 &lt;%- if options[:authlogic] -%&gt;
   def current_&lt;%= session_singular_name %&gt;
     return @current_&lt;%= session_singular_name %&gt; if defined?(@current_&lt;%= session_singular_name %&gt;)
@@ -35,11 +35,11 @@ module Authentication
     @current_&lt;%= user_singular_name %&gt; ||= &lt;%= user_class_name %&gt;.find(session[:&lt;%= user_singular_name %&gt;_id]) if session[:&lt;%= user_singular_name %&gt;_id]
   end
 &lt;%- end -%&gt;
-  
+
   def logged_in?
     current_&lt;%= user_singular_name %&gt;
   end
-  
+
   def login_required
     unless logged_in?
       flash[:error] = &quot;You must first log in or sign up before accessing this page.&quot;
@@ -47,14 +47,14 @@ module Authentication
       redirect_to login_url
     end
   end
-  
+
   def redirect_to_target_or_default(default)
     redirect_to(session[:return_to] || default)
     session[:return_to] = nil
   end
-  
+
   private
-  
+
   def store_target_location
     session[:return_to] = request.request_uri
   end</diff>
      <filename>rails_generators/nifty_authentication/templates/authentication.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ class Create&lt;%= user_plural_class_name %&gt; &lt; ActiveRecord::Migration
       t.timestamps
     end
   end
-  
+
   def self.down
     drop_table :&lt;%= user_plural_name %&gt;
   end</diff>
      <filename>rails_generators/nifty_authentication/templates/migration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ class &lt;%= session_plural_class_name %&gt;Controller &lt; ApplicationController
   def new
     @&lt;%= session_singular_name %&gt; = &lt;%= session_class_name %&gt;.new
   end
-  
+
   def create
     @&lt;%= session_singular_name %&gt; = &lt;%= session_class_name %&gt;.new(params[:&lt;%= session_singular_name %&gt;])
     if @&lt;%= session_singular_name %&gt;.save
@@ -13,7 +13,7 @@ class &lt;%= session_plural_class_name %&gt;Controller &lt; ApplicationController
       render :action =&gt; 'new'
     end
   end
-  
+
   def destroy
     @&lt;%= session_singular_name %&gt; = &lt;%= session_class_name %&gt;.find
     @&lt;%= session_singular_name %&gt;.destroy
@@ -23,7 +23,7 @@ class &lt;%= session_plural_class_name %&gt;Controller &lt; ApplicationController
 &lt;%- else -%&gt;
   def new
   end
-  
+
   def create
     &lt;%= user_singular_name %&gt; = &lt;%= user_class_name %&gt;.authenticate(params[:login], params[:password])
     if &lt;%= user_singular_name %&gt;
@@ -35,7 +35,7 @@ class &lt;%= session_plural_class_name %&gt;Controller &lt; ApplicationController
       render :action =&gt; 'new'
     end
   end
-  
+
   def destroy
     session[:&lt;%= user_singular_name %&gt;_id] = nil
     flash[:notice] = &quot;You have been logged out.&quot;</diff>
      <filename>rails_generators/nifty_authentication/templates/sessions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,21 +1,21 @@
 require File.dirname(__FILE__) + '/../spec_helper'
- 
+
 describe &lt;%= session_plural_class_name %&gt;Controller do
   fixtures :all
   integrate_views
-  
+
   it &quot;new action should render new template&quot; do
     get :new
     response.should render_template(:new)
   end
-  
+
 &lt;%- if options[:authlogic] -%&gt;
   it &quot;create action should render new template when authentication is invalid&quot; do
     post :create, :&lt;%= session_singular_name %&gt; =&gt; { :username =&gt; &quot;foo&quot;, :password =&gt; &quot;badpassword&quot; }
     response.should render_template(:new)
     &lt;%= session_class_name %&gt;.find.should be_nil
   end
-  
+
   it &quot;create action should redirect when authentication is valid&quot; do
     post :create, :&lt;%= session_singular_name %&gt; =&gt; { :username =&gt; &quot;foo&quot;, :password =&gt; &quot;secret&quot; }
     response.should redirect_to(root_url)
@@ -28,7 +28,7 @@ describe &lt;%= session_plural_class_name %&gt;Controller do
     response.should render_template(:new)
     session['&lt;%= user_singular_name %&gt;_id'].should be_nil
   end
-  
+
   it &quot;create action should redirect when authentication is valid&quot; do
     &lt;%= user_class_name %&gt;.stubs(:authenticate).returns(&lt;%= user_class_name %&gt;.first)
     post :create</diff>
      <filename>rails_generators/nifty_authentication/templates/tests/rspec/sessions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,72 +9,72 @@ describe &lt;%= user_class_name %&gt; do
     attributes[:password_confirmation] ||= attributes[:password]
     &lt;%= user_class_name %&gt;.new(attributes)
   end
-  
+
   before(:each) do
     &lt;%= user_class_name %&gt;.delete_all
   end
-  
+
   it &quot;should be valid&quot; do
     new_&lt;%= user_singular_name %&gt;.should be_valid
   end
-  
+
   it &quot;should require username&quot; do
     new_&lt;%= user_singular_name %&gt;(:username =&gt; '').should have(1).error_on(:username)
   end
-  
+
   it &quot;should require password&quot; do
     new_&lt;%= user_singular_name %&gt;(:password =&gt; '').should have(1).error_on(:password)
   end
-  
+
   it &quot;should require well formed email&quot; do
     new_&lt;%= user_singular_name %&gt;(:email =&gt; 'foo@bar@example.com').should have(1).error_on(:email)
   end
-  
+
   it &quot;should validate uniqueness of email&quot; do
     new_&lt;%= user_singular_name %&gt;(:email =&gt; 'bar@example.com').save!
     new_&lt;%= user_singular_name %&gt;(:email =&gt; 'bar@example.com').should have(1).error_on(:email)
   end
-  
+
   it &quot;should validate uniqueness of username&quot; do
     new_&lt;%= user_singular_name %&gt;(:username =&gt; 'uniquename').save!
     new_&lt;%= user_singular_name %&gt;(:username =&gt; 'uniquename').should have(1).error_on(:username)
   end
-  
+
   it &quot;should not allow odd characters in username&quot; do
     new_&lt;%= user_singular_name %&gt;(:username =&gt; 'odd ^&amp;(@)').should have(1).error_on(:username)
   end
-  
+
   it &quot;should validate password is longer than 3 characters&quot; do
     new_&lt;%= user_singular_name %&gt;(:password =&gt; 'bad').should have(1).error_on(:password)
   end
-  
+
   it &quot;should require matching password confirmation&quot; do
     new_&lt;%= user_singular_name %&gt;(:password_confirmation =&gt; 'nonmatching').should have(1).error_on(:password)
   end
-  
+
   it &quot;should generate password hash and salt on create&quot; do
     &lt;%= user_singular_name %&gt; = new_&lt;%= user_singular_name %&gt;
     &lt;%= user_singular_name %&gt;.save!
     &lt;%= user_singular_name %&gt;.password_hash.should_not be_nil
     &lt;%= user_singular_name %&gt;.password_salt.should_not be_nil
   end
-  
+
   it &quot;should authenticate by username&quot; do
     &lt;%= user_singular_name %&gt; = new_&lt;%= user_singular_name %&gt;(:username =&gt; 'foobar', :password =&gt; 'secret')
     &lt;%= user_singular_name %&gt;.save!
     &lt;%= user_class_name %&gt;.authenticate('foobar', 'secret').should == &lt;%= user_singular_name %&gt;
   end
-  
+
   it &quot;should authenticate by email&quot; do
     &lt;%= user_singular_name %&gt; = new_&lt;%= user_singular_name %&gt;(:email =&gt; 'foo@bar.com', :password =&gt; 'secret')
     &lt;%= user_singular_name %&gt;.save!
     &lt;%= user_class_name %&gt;.authenticate('foo@bar.com', 'secret').should == &lt;%= user_singular_name %&gt;
   end
-  
+
   it &quot;should not authenticate bad username&quot; do
     &lt;%= user_class_name %&gt;.authenticate('nonexisting', 'secret').should be_nil
   end
-  
+
   it &quot;should not authenticate bad password&quot; do
     new_&lt;%= user_singular_name %&gt;(:username =&gt; 'foobar', :password =&gt; 'secret').save!
     &lt;%= user_class_name %&gt;.authenticate('foobar', 'badpassword').should be_nil</diff>
      <filename>rails_generators/nifty_authentication/templates/tests/rspec/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,20 +1,20 @@
 require File.dirname(__FILE__) + '/../spec_helper'
- 
+
 describe &lt;%= user_plural_class_name %&gt;Controller do
   fixtures :all
   integrate_views
-  
+
   it &quot;new action should render new template&quot; do
     get :new
     response.should render_template(:new)
   end
-  
+
   it &quot;create action should render new template when model is invalid&quot; do
     &lt;%= user_class_name %&gt;.any_instance.stubs(:valid?).returns(false)
     post :create
     response.should render_template(:new)
   end
-  
+
   it &quot;create action should redirect when model is valid&quot; do
     &lt;%= user_class_name %&gt;.any_instance.stubs(:valid?).returns(true)
     post :create</diff>
      <filename>rails_generators/nifty_authentication/templates/tests/rspec/users_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ class &lt;%= session_plural_class_name %&gt;ControllerTest &lt; ActionController::TestCas
       assert_template 'new'
     end
   end
-  
+
   context &quot;create action&quot; do
   &lt;%- if options[:authlogic] -%&gt;
     should &quot;render new template when authentication is invalid&quot; do
@@ -15,7 +15,7 @@ class &lt;%= session_plural_class_name %&gt;ControllerTest &lt; ActionController::TestCas
       assert_template 'new'
       assert_nil &lt;%= session_class_name %&gt;.find
     end
-    
+
     should &quot;redirect when authentication is valid&quot; do
       post :create, :&lt;%= session_singular_name %&gt; =&gt; { :username =&gt; &quot;foo&quot;, :password =&gt; &quot;secret&quot; }
       assert_redirected_to root_url
@@ -28,7 +28,7 @@ class &lt;%= session_plural_class_name %&gt;ControllerTest &lt; ActionController::TestCas
       assert_template 'new'
       assert_nil session['&lt;%= user_singular_name %&gt;_id']
     end
-    
+
     should &quot;redirect when authentication is valid&quot; do
       &lt;%= user_class_name %&gt;.stubs(:authenticate).returns(&lt;%= user_class_name %&gt;.first)
       post :create</diff>
      <filename>rails_generators/nifty_authentication/templates/tests/shoulda/sessions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,72 +11,72 @@ class &lt;%= user_class_name %&gt;Test &lt; ActiveSupport::TestCase
     &lt;%= user_singular_name %&gt;.valid? # run validations
     &lt;%= user_singular_name %&gt;
   end
-  
+
   def setup
     &lt;%= user_class_name %&gt;.delete_all
   end
-  
+
   should &quot;be valid&quot; do
     assert new_&lt;%= user_singular_name %&gt;.valid?
   end
-  
+
   should &quot;require username&quot; do
     assert new_&lt;%= user_singular_name %&gt;(:username =&gt; '').errors.on(:username)
   end
-  
+
   should &quot;require password&quot; do
     assert new_&lt;%= user_singular_name %&gt;(:password =&gt; '').errors.on(:password)
   end
-  
+
   should &quot;require well formed email&quot; do
     assert new_&lt;%= user_singular_name %&gt;(:email =&gt; 'foo@bar@example.com').errors.on(:email)
   end
-  
+
   should &quot;validate uniqueness of email&quot; do
     new_&lt;%= user_singular_name %&gt;(:email =&gt; 'bar@example.com').save!
     assert new_&lt;%= user_singular_name %&gt;(:email =&gt; 'bar@example.com').errors.on(:email)
   end
-  
+
   should &quot;validate uniqueness of username&quot; do
     new_&lt;%= user_singular_name %&gt;(:username =&gt; 'uniquename').save!
     assert new_&lt;%= user_singular_name %&gt;(:username =&gt; 'uniquename').errors.on(:username)
   end
-  
+
   should &quot;not allow odd characters in username&quot; do
     assert new_&lt;%= user_singular_name %&gt;(:username =&gt; 'odd ^&amp;(@)').errors.on(:username)
   end
-  
+
   should &quot;validate password is longer than 3 characters&quot; do
     assert new_&lt;%= user_singular_name %&gt;(:password =&gt; 'bad').errors.on(:password)
   end
-  
+
   should &quot;require matching password confirmation&quot; do
     assert new_&lt;%= user_singular_name %&gt;(:password_confirmation =&gt; 'nonmatching').errors.on(:password)
   end
-  
+
   should &quot;generate password hash and salt on create&quot; do
     &lt;%= user_singular_name %&gt; = new_&lt;%= user_singular_name %&gt;
     &lt;%= user_singular_name %&gt;.save!
     assert &lt;%= user_singular_name %&gt;.password_hash
     assert &lt;%= user_singular_name %&gt;.password_salt
   end
-  
+
   should &quot;authenticate by username&quot; do
     &lt;%= user_singular_name %&gt; = new_&lt;%= user_singular_name %&gt;(:username =&gt; 'foobar', :password =&gt; 'secret')
     &lt;%= user_singular_name %&gt;.save!
     assert_equal &lt;%= user_singular_name %&gt;, &lt;%= user_class_name %&gt;.authenticate('foobar', 'secret')
   end
-  
+
   should &quot;authenticate by email&quot; do
     &lt;%= user_singular_name %&gt; = new_&lt;%= user_singular_name %&gt;(:email =&gt; 'foo@bar.com', :password =&gt; 'secret')
     &lt;%= user_singular_name %&gt;.save!
     assert_equal &lt;%= user_singular_name %&gt;, &lt;%= user_class_name %&gt;.authenticate('foo@bar.com', 'secret')
   end
-  
+
   should &quot;not authenticate bad username&quot; do
     assert_nil &lt;%= user_class_name %&gt;.authenticate('nonexisting', 'secret')
   end
-  
+
   should &quot;not authenticate bad password&quot; do
     new_&lt;%= user_singular_name %&gt;(:username =&gt; 'foobar', :password =&gt; 'secret').save!
     assert_nil &lt;%= user_class_name %&gt;.authenticate('foobar', 'badpassword')</diff>
      <filename>rails_generators/nifty_authentication/templates/tests/shoulda/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,14 +7,14 @@ class &lt;%= user_plural_class_name %&gt;ControllerTest &lt; ActionController::TestCase
       assert_template 'new'
     end
   end
-  
+
   context &quot;create action&quot; do
     should &quot;render new template when model is invalid&quot; do
       &lt;%= user_class_name %&gt;.any_instance.stubs(:valid?).returns(false)
       post :create
       assert_template 'new'
     end
-  
+
     should &quot;redirect when model is valid&quot; do
       &lt;%= user_class_name %&gt;.any_instance.stubs(:valid?).returns(true)
       post :create</diff>
      <filename>rails_generators/nifty_authentication/templates/tests/shoulda/users_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,14 +5,14 @@ class &lt;%= session_plural_class_name %&gt;ControllerTest &lt; ActionController::TestCas
     get :new
     assert_template 'new'
   end
-  
+
 &lt;%- if options[:authlogic] -%&gt;
   def test_create_invalid
     post :create, :&lt;%= session_singular_name %&gt; =&gt; { :username =&gt; &quot;foo&quot;, :password =&gt; &quot;badpassword&quot; }
     assert_template 'new'
     assert_nil &lt;%= session_class_name %&gt;.find
   end
-  
+
   def test_create_valid
     post :create, :&lt;%= session_singular_name %&gt; =&gt; { :username =&gt; &quot;foo&quot;, :password =&gt; &quot;secret&quot; }
     assert_redirected_to root_url
@@ -25,7 +25,7 @@ class &lt;%= session_plural_class_name %&gt;ControllerTest &lt; ActionController::TestCas
     assert_template 'new'
     assert_nil session['&lt;%= user_singular_name %&gt;_id']
   end
-  
+
   def test_create_valid
     &lt;%= user_class_name %&gt;.stubs(:authenticate).returns(&lt;%= user_class_name %&gt;.first)
     post :create</diff>
      <filename>rails_generators/nifty_authentication/templates/tests/testunit/sessions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,74 +11,74 @@ class &lt;%= user_class_name %&gt;Test &lt; ActiveSupport::TestCase
     &lt;%= user_singular_name %&gt;.valid? # run validations
     &lt;%= user_singular_name %&gt;
   end
-  
+
   def setup
     &lt;%= user_class_name %&gt;.delete_all
   end
-  
+
   def test_valid
     assert new_&lt;%= user_singular_name %&gt;.valid?
   end
-  
+
   def test_require_username
     assert new_&lt;%= user_singular_name %&gt;(:username =&gt; '').errors.on(:username)
   end
-  
+
   def test_require_password
     assert new_&lt;%= user_singular_name %&gt;(:password =&gt; '').errors.on(:password)
   end
-  
+
   def test_require_well_formed_email
     assert new_&lt;%= user_singular_name %&gt;(:email =&gt; 'foo@bar@example.com').errors.on(:email)
   end
-  
+
   def test_validate_uniqueness_of_email
     new_&lt;%= user_singular_name %&gt;(:email =&gt; 'bar@example.com').save!
     assert new_&lt;%= user_singular_name %&gt;(:email =&gt; 'bar@example.com').errors.on(:email)
   end
-  
+
   def test_validate_uniqueness_of_username
     new_&lt;%= user_singular_name %&gt;(:username =&gt; 'uniquename').save!
     assert new_&lt;%= user_singular_name %&gt;(:username =&gt; 'uniquename').errors.on(:username)
   end
-  
+
   def test_validate_odd_characters_in_username
     assert new_&lt;%= user_singular_name %&gt;(:username =&gt; 'odd ^&amp;(@)').errors.on(:username)
   end
-  
+
   def test_validate_password_length
     assert new_&lt;%= user_singular_name %&gt;(:password =&gt; 'bad').errors.on(:password)
   end
-  
+
   def test_require_matching_password_confirmation
     assert new_&lt;%= user_singular_name %&gt;(:password_confirmation =&gt; 'nonmatching').errors.on(:password)
   end
-  
+
   def test_generate_password_hash_and_salt_on_create
     &lt;%= user_singular_name %&gt; = new_&lt;%= user_singular_name %&gt;
     &lt;%= user_singular_name %&gt;.save!
     assert &lt;%= user_singular_name %&gt;.password_hash
     assert &lt;%= user_singular_name %&gt;.password_salt
   end
-  
+
   def test_authenticate_by_username
     &lt;%= user_class_name %&gt;.delete_all
     &lt;%= user_singular_name %&gt; = new_&lt;%= user_singular_name %&gt;(:username =&gt; 'foobar', :password =&gt; 'secret')
     &lt;%= user_singular_name %&gt;.save!
     assert_equal &lt;%= user_singular_name %&gt;, &lt;%= user_class_name %&gt;.authenticate('foobar', 'secret')
   end
-  
+
   def test_authenticate_by_email
     &lt;%= user_class_name %&gt;.delete_all
     &lt;%= user_singular_name %&gt; = new_&lt;%= user_singular_name %&gt;(:email =&gt; 'foo@bar.com', :password =&gt; 'secret')
     &lt;%= user_singular_name %&gt;.save!
     assert_equal &lt;%= user_singular_name %&gt;, &lt;%= user_class_name %&gt;.authenticate('foo@bar.com', 'secret')
   end
-  
+
   def test_authenticate_bad_username
     assert_nil &lt;%= user_class_name %&gt;.authenticate('nonexisting', 'secret')
   end
-  
+
   def test_authenticate_bad_password
     &lt;%= user_class_name %&gt;.delete_all
     new_&lt;%= user_singular_name %&gt;(:username =&gt; 'foobar', :password =&gt; 'secret').save!</diff>
      <filename>rails_generators/nifty_authentication/templates/tests/testunit/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,13 +5,13 @@ class &lt;%= user_plural_class_name %&gt;ControllerTest &lt; ActionController::TestCase
     get :new
     assert_template 'new'
   end
-  
+
   def test_create_invalid
     &lt;%= user_class_name %&gt;.any_instance.stubs(:valid?).returns(false)
     post :create
     assert_template 'new'
   end
-  
+
   def test_create_valid
     &lt;%= user_class_name %&gt;.any_instance.stubs(:valid?).returns(true)
     post :create</diff>
      <filename>rails_generators/nifty_authentication/templates/tests/testunit/users_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,10 +4,10 @@ class &lt;%= user_class_name %&gt; &lt; ActiveRecord::Base
 &lt;%- else -%&gt;
   # new columns need to be added here to be writable through mass assignment
   attr_accessible :username, :email, :password, :password_confirmation
-  
+
   attr_accessor :password
   before_save :prepare_password
-  
+
   validates_presence_of :username
   validates_uniqueness_of :username, :email, :allow_blank =&gt; true
   validates_format_of :username, :with =&gt; /^[-\w\._@]+$/i, :allow_blank =&gt; true, :message =&gt; &quot;should only contain letters, numbers, or .-_@&quot;
@@ -15,26 +15,26 @@ class &lt;%= user_class_name %&gt; &lt; ActiveRecord::Base
   validates_presence_of :password, :on =&gt; :create
   validates_confirmation_of :password
   validates_length_of :password, :minimum =&gt; 4, :allow_blank =&gt; true
-  
+
   # login can be either username or email address
   def self.authenticate(login, pass)
     &lt;%= user_singular_name %&gt; = find_by_username(login) || find_by_email(login)
     return &lt;%= user_singular_name %&gt; if &lt;%= user_singular_name %&gt; &amp;&amp; &lt;%= user_singular_name %&gt;.matching_password?(pass)
   end
-  
+
   def matching_password?(pass)
     self.password_hash == encrypt_password(pass)
   end
-  
+
   private
-  
+
   def prepare_password
     unless password.blank?
       self.password_salt = Digest::SHA1.hexdigest([Time.now, rand].join)
       self.password_hash = encrypt_password(password)
     end
   end
-  
+
   def encrypt_password(pass)
     Digest::SHA1.hexdigest([pass, password_salt].join)
   end</diff>
      <filename>rails_generators/nifty_authentication/templates/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ class &lt;%= user_plural_class_name %&gt;Controller &lt; ApplicationController
   def new
     @&lt;%= user_singular_name %&gt; = &lt;%= user_class_name %&gt;.new
   end
-  
+
   def create
     @&lt;%= user_singular_name %&gt; = &lt;%= user_class_name %&gt;.new(params[:&lt;%= user_singular_name %&gt;])
     if @&lt;%= user_singular_name %&gt;.save</diff>
      <filename>rails_generators/nifty_authentication/templates/users_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,15 +7,15 @@ module LayoutHelper
     @content_for_title = page_title.to_s
     @show_title = show_title
   end
-  
+
   def show_title?
     @show_title
   end
-  
+
   def stylesheet(*args)
     content_for(:head) { stylesheet_link_tag(*args) }
   end
-  
+
   def javascript(*args)
     content_for(:head) { javascript_include_tag(*args) }
   end</diff>
      <filename>rails_generators/nifty_layout/templates/helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,11 +11,11 @@
       &lt;%%- flash.each do |name, msg| -%&gt;
         &lt;%%= content_tag :div, msg, :id =&gt; &quot;flash_#{name}&quot; %&gt;
       &lt;%%- end -%&gt;
-      
+
       &lt;%%- if show_title? -%&gt;
         &lt;h1&gt;&lt;%%=h yield(:title) %&gt;&lt;/h1&gt;
       &lt;%%- end -%&gt;
-      
+
       &lt;%%= yield %&gt;
     &lt;/div&gt;
   &lt;/body&gt;</diff>
      <filename>rails_generators/nifty_layout/templates/layout.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,19 @@
 !!! Strict
 %html{html_attrs}
-  
+
   %head
     %title
       = h(yield(:title) || &quot;Untitled&quot;)
     %meta{&quot;http-equiv&quot;=&gt;&quot;Content-Type&quot;, :content=&gt;&quot;text/html; charset=utf-8&quot;}/
     = stylesheet_link_tag '&lt;%= file_name %&gt;'
     = yield(:head)
-  
+
   %body
     #container
       - flash.each do |name, msg|
         = content_tag :div, msg, :id =&gt; &quot;flash_#{name}&quot;
-      
+
       - if show_title?
         %h1=h yield(:title)
-      
+
       = yield</diff>
      <filename>rails_generators/nifty_layout/templates/layout.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -128,7 +128,7 @@ class NiftyScaffoldGenerator &lt; Rails::Generator::Base
   def controller_methods(dir_name)
     controller_actions.map do |action|
       read_template(&quot;#{dir_name}/#{action}.rb&quot;)
-    end.join(&quot;  \n&quot;).strip
+    end.join(&quot;\n&quot;).strip
   end
   
   def render_form</diff>
      <filename>rails_generators/nifty_scaffold/nifty_scaffold_generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ class Create&lt;%= plural_class_name %&gt; &lt; ActiveRecord::Migration
     &lt;%- end -%&gt;
     end
   end
-  
+
   def self.down
     drop_table :&lt;%= plural_name %&gt;
   end</diff>
      <filename>rails_generators/nifty_scaffold/templates/migration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
     post :create
     response.should render_template(:new)
   end
-  
+
   it &quot;create action should redirect when model is valid&quot; do
     &lt;%= class_name %&gt;.any_instance.stubs(:valid?).returns(true)
     post :create</diff>
      <filename>rails_generators/nifty_scaffold/templates/tests/rspec/actions/create.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
     put :update, :id =&gt; &lt;%= class_name %&gt;.first
     response.should render_template(:edit)
   end
-  
+
   it &quot;update action should redirect when model is valid&quot; do
     &lt;%= class_name %&gt;.any_instance.stubs(:valid?).returns(true)
     put :update, :id =&gt; &lt;%= class_name %&gt;.first</diff>
      <filename>rails_generators/nifty_scaffold/templates/tests/rspec/actions/update.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,8 @@
 require File.dirname(__FILE__) + '/../spec_helper'
- 
+
 describe &lt;%= plural_class_name %&gt;Controller do
   fixtures :all
   integrate_views
-  
+
   &lt;%= controller_methods 'tests/rspec/actions' %&gt;
 end</diff>
      <filename>rails_generators/nifty_scaffold/templates/tests/rspec/controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@
       post :create
       assert_template 'new'
     end
-    
+
     should &quot;redirect when model is valid&quot; do
       &lt;%= class_name %&gt;.any_instance.stubs(:valid?).returns(true)
       post :create</diff>
      <filename>rails_generators/nifty_scaffold/templates/tests/shoulda/actions/create.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@
       put :update, :id =&gt; &lt;%= class_name %&gt;.first
       assert_template 'edit'
     end
-  
+
     should &quot;redirect when model is valid&quot; do
       &lt;%= class_name %&gt;.any_instance.stubs(:valid?).returns(true)
       put :update, :id =&gt; &lt;%= class_name %&gt;.first</diff>
      <filename>rails_generators/nifty_scaffold/templates/tests/shoulda/actions/update.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
     post :create
     assert_template 'new'
   end
-  
+
   def test_create_valid
     &lt;%= class_name %&gt;.any_instance.stubs(:valid?).returns(true)
     post :create</diff>
      <filename>rails_generators/nifty_scaffold/templates/tests/testunit/actions/create.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
     put :update, :id =&gt; &lt;%= class_name %&gt;.first
     assert_template 'edit'
   end
-  
+
   def test_update_valid
     &lt;%= class_name %&gt;.any_instance.stubs(:valid?).returns(true)
     put :update, :id =&gt; &lt;%= class_name %&gt;.first</diff>
      <filename>rails_generators/nifty_scaffold/templates/tests/testunit/actions/update.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>85091ab29e09546afcc22268a27b82fae28e85cc</id>
    </parent>
  </parents>
  <author>
    <name>Jesus Lopez</name>
    <email>jesus@jesusla.com</email>
  </author>
  <url>http://github.com/jlopez/nifty-generators/commit/5c1de0189d3b7f71c37729e14c90abe47be6773f</url>
  <id>5c1de0189d3b7f71c37729e14c90abe47be6773f</id>
  <committed-date>2009-10-28T13:57:09-07:00</committed-date>
  <authored-date>2009-10-27T16:15:36-07:00</authored-date>
  <message>Removed trailing whitespace from generated code</message>
  <tree>f068c7bc36b065f387e2110c3ee4915738e84e94</tree>
  <committer>
    <name>Jesus Lopez</name>
    <email>jesus@jesusla.com</email>
  </committer>
</commit>
