<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,13 +5,63 @@ A slice for the Merb framework.
 
 MerbfulAuthentication is an authentication framework for the Merb Web Framework.  
 
-Currently Activerecord and Datamapper support is planned.  Although it's easy to add your own.
+Currently DataMapper is available and ActiveRecord is planned.  Although it's easy to add your own.
+
+MerbfulAuthentication provides your model with a mixin that gives your model all the required behavior
+and links it to the controllers.  
+
+As an example.  In your normal applications model directory create your user model.
+
+class User
+  include MerbfulAuthentication::Adapter::DataMapper
+end
+
+This will give the User class the required behavior and provide access to the class through
+MerbfulAuthentication[:user] for other slice authors.  To save key presses a handy constant is available
+MA.
+
+So using the MA constant you can declare your class like this
+
+class Person
+  include MA::Adapter::DataMapper
+end
+
+And in your custom slice, get access to the user class with MA[:user]
+
+===Useful Helpers
+
+The normal merbful_authentication helpers are available for your application, but also there is some consistent 
+helpers for other slice authors. Most notably is the controller helper
+
+:current_ma_user also aliased as :current_person, or :current_user or whatever your user class name is.
+
+=== Controllers
+
+The controllers that drive MerbfulAuthentication are always named MA::Users, and MA::Sessions
+
+These are then mapped to appropriately named routes.  
+
+=== Options
+
+See notes after installation instructions
 
 ------------------------------------------------------------------------------
 
 Instructions for installation:
 
-file: config/init.rb
+=== Quick Install
+# config/init.rb
+dependency &quot;merb-slices&quot;
+dependency &quot;merbful_authentication&quot;
+
+# router
+r.add_slice(:MerbfulAuthentication, &quot;path/to/mount/at&quot;)
+
+# Boot strap to your app
+rake slices:merbful_authentication:install
+
+
+=== Load the slice in your init.rb file
 
 # add the slice as a regular dependency
 
@@ -21,36 +71,78 @@ dependency 'merbful_authentication'
 
 Merb::Plugins.config[:merb_slices] = { :queue =&gt; [&quot;MerbfulAuthentication&quot;, ...] }
 
-# optionally configure the plugins in a before_app_loads callback
 
-Merb::BootLoader.before_app_loads do
-  
-  Merb::Slices::config[:merbful_authentication] = { ... }
-  
-end
 
-file: config/router.rb
+=== Configure Your Router
+
+In config/router.rb you need to activate your brand new MerbfulAuthentication Slice.  You can do this a number of ways.
+
+The easiest way is like this:
+
+r.add_slices
 
-# example: /merbful_authentication/:controller/:action/:id
+If you'd like to specify MerbfulAuthentication
 
 r.add_slice(:MerbfulAuthentication)
 
-# example: /foo/:controller/:action/:id
+By default this will mount the slice at /merbful_authentication.  So your login url will be at 
 
-r.add_slice(:MerbfulAuthentication, 'foo') # same as :path =&gt; 'foo'
+/merbful_authentication/login
 
-# example: /:lang/:controller/:action/:id (with :a param set)
+If you'd like to specify a different mount point in your application (recommended) do it like this.
 
-r.add_slice(:MerbfulAuthentication, :path =&gt; ':lang', :params =&gt; { :a =&gt; 'b' })
+r.add_slice(:MerbfulAuthentication, 'authentcation') 
 
-# example: /:controller/:action/:id
+Your login url will now be /authentication/login, your signup url will be at /authentication/users/new
 
-r.slice(:MerbfulAuthentication)
+If you'd like to set more options, I suggest you look up the merb-slices documentation.
 
-Normally you should also run the following rake task:
+
+
+=== Install your slice
+
+You need to install the slice.
 
 rake slices:merbful_authentication:install
 
+=== Configuring your install.
+
+If you don't have any configuration applied some simple defaults will be assumed.  You configure your installation
+by writing it to the config/slices.yml file
+
+==== Routing options
+:route_path_model:    first choice for model route path.  defaults to &quot;users&quot; (used to make single_model_path and plural_model_path)
+:route_path_session:  first choice for the sessions route path.  Defaults to &quot;sessions&quot;
+
+===== Named routes for the MA::Users resource
+:user:
+  :new:       # ||= :&quot;new_#{single_model_name}&quot;
+  :show:      # ||= :&quot;#{single_model_name}&quot;
+  :edit:      # ||= :&quot;edit_#{single_model_name}&quot;
+  :delete:    # ||= :&quot;delete_#{single_model_name}&quot;
+  :index:     # ||= :&quot;#{plural_model_path}&quot;
+  :activate:  # ||= :&quot;#{single_model_name}_activation&quot;
+  
+A named route called :login, and one called :logout is also included.
+
+
+=== Including activation emails for account verification
+
+To include activation email to your uses use the
+:use_activation: true option
+
+To not use it either leave it out, or set it false like this
+:use_activation: false
+
+If this option is turned off, it will just automatically complete the relevant fields
+to have an activated user.  This way, if you decide later that you'd like to include activation
+then the previously signed up users are already fully active and ready to fit into the new behavior :)
+
+There is also the subjects that you can setup for your emails
+
+:welcome_subject:       # ||= &quot;Welcome&quot;
+:activation_subject:    # ||= &quot;Please Activate Your Account&quot;
+
 ------------------------------------------------------------------------------
 
 You can put your application-level overrides in:</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -86,7 +86,7 @@ if defined?(Merb::Plugins)
     #  routes at any level of your router setup.
     def self.setup_router(scope)
       plural_model_path = MA[:route_path_model] || MA[:plural_resource] 
-      plural_model_path ||= (MA[:user_class_name] = &quot;User&quot;).to_s.snake_case.singularize.pluralize
+      plural_model_path ||= &quot;User&quot;.snake_case.singularize.pluralize
       plural_model_path = plural_model_path.to_s.match(%r{^/?(.*?)/?$})[1]
       single_model_name = plural_model_path.singularize
       
@@ -97,23 +97,23 @@ if defined?(Merb::Plugins)
       activation_name = (MA[:single_resource].to_s &lt;&lt; &quot;_activation&quot;).to_sym
       
       MA[:routes] = {:user =&gt; {}}
-      MA[:routes][:user][:new]       = :&quot;new_#{single_model_name}&quot;
-      MA[:routes][:user][:show]      = :&quot;#{single_model_name}&quot;
-      MA[:routes][:user][:edit]      = :&quot;edit_#{single_model_name}&quot;
-      MA[:routes][:user][:delete]    = :&quot;delete_#{single_model_name}&quot;
-      MA[:routes][:user][:index]     = :&quot;#{plural_model_path}&quot;
-      MA[:routes][:user][:activate]  = :&quot;#{single_model_name}_activation&quot;
+      MA[:routes][:user][:new]       ||= :&quot;new_#{single_model_name}&quot;
+      MA[:routes][:user][:show]      ||= :&quot;#{single_model_name}&quot;
+      MA[:routes][:user][:edit]      ||= :&quot;edit_#{single_model_name}&quot;
+      MA[:routes][:user][:delete]    ||= :&quot;delete_#{single_model_name}&quot;
+      MA[:routes][:user][:index]     ||= :&quot;#{plural_model_path}&quot;
+      MA[:routes][:user][:activate]  ||= :&quot;#{single_model_name}_activation&quot;
           
       # Setup the model path
       scope.to(:controller =&gt; &quot;Users&quot;) do |c|
         c.match(&quot;/#{plural_model_path}&quot;) do |u|
           # setup the named routes          
-          u.match(&quot;/new&quot;,             :method =&gt; :get ).to( :action =&gt; &quot;new&quot;     ).name(:&quot;new_#{single_model_name}&quot;)
-          u.match(&quot;/:id&quot;,             :method =&gt; :get ).to( :action =&gt; &quot;show&quot;    ).name(:&quot;#{single_model_name}&quot;)
-          u.match(&quot;/:id/edit&quot;,        :method =&gt; :get ).to( :action =&gt; &quot;edit&quot;    ).name(:&quot;edit_#{single_model_name}&quot;)
-          u.match(&quot;/:id/delete&quot;,      :method =&gt; :get ).to( :action =&gt; &quot;delete&quot;  ).name(:&quot;delete_#{single_model_name}&quot;)
-          u.match(&quot;/&quot;,                :method =&gt; :get ).to( :action =&gt; &quot;index&quot;   ).name(:&quot;#{plural_model_path}&quot;)
-          u.match(&quot;/activate/:activation_code&quot;, :method =&gt; :get).to( :action =&gt; &quot;activate&quot;).name(:&quot;#{single_model_name}_activation&quot;)
+          u.match(&quot;/new&quot;,             :method =&gt; :get ).to( :action =&gt; &quot;new&quot;     ).name(MA[:routes][:user][:new])
+          u.match(&quot;/:id&quot;,             :method =&gt; :get ).to( :action =&gt; &quot;show&quot;    ).name(MA[:routes][:user][:show])
+          u.match(&quot;/:id/edit&quot;,        :method =&gt; :get ).to( :action =&gt; &quot;edit&quot;    ).name(MA[:routes][:user][:edit])
+          u.match(&quot;/:id/delete&quot;,      :method =&gt; :get ).to( :action =&gt; &quot;delete&quot;  ).name(MA[:routes][:user][:delete])
+          u.match(&quot;/&quot;,                :method =&gt; :get ).to( :action =&gt; &quot;index&quot;   ).name(MA[:routes][:user][:index])
+          u.match(&quot;/activate/:activation_code&quot;, :method =&gt; :get).to( :action =&gt; &quot;activate&quot;).name(MA[:routes][:user][:activate])
           
           # Make the anonymous routes
           u.match(%r{(/|/index)?(\.:format)?$},  :method =&gt; :get    ).to( :action =&gt; &quot;index&quot;)</diff>
      <filename>lib/merbful_authentication.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,6 @@ describe MerbfulAuthentication do
     @adapter_path = File.dirname(__FILE__) / &quot;..&quot; / &quot;lib&quot; / &quot;merbful_authentication&quot; / &quot;adapters&quot;
     @ar_path = @adapter_path / &quot;activerecord&quot;
     @config = Merb::Slices::config[:merbful_authentication]
-    @config[:user_class_name] = &quot;User&quot;
     DataMapper.setup(:default, 'sqlite3:///:memory:')
   end
   </diff>
      <filename>spec/merbful_authentication_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d0f8c6d881ca762486c3daabdd65fa824197082d</id>
    </parent>
  </parents>
  <author>
    <name>Daniel Neighman</name>
    <email>has.sox@gmail.com</email>
  </author>
  <url>http://github.com/hassox/merbful_authentication/commit/681046faf3a77c27b6a2c73203d83b326c9959a2</url>
  <id>681046faf3a77c27b6a2c73203d83b326c9959a2</id>
  <committed-date>2008-06-02T08:25:31-07:00</committed-date>
  <authored-date>2008-06-02T08:25:31-07:00</authored-date>
  <message>Adds a reasonable readme</message>
  <tree>c053c4dc1eeca70548e1ab4a29a42f976d0fb658</tree>
  <committer>
    <name>Daniel Neighman</name>
    <email>has.sox@gmail.com</email>
  </committer>
</commit>
