-
Notifications
You must be signed in to change notification settings - Fork 4
ehsanul/Sinatra-Authlogic-Template
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Warning: Not really tested in production yet. This is a template for a Sinatra app that gets Authlogic (version 2.1.3+) working for authentication. To use it, make sure that you have the required dependencies (Sinatra and Authlogic are vendored): gem install haml activerecord activesupport sqlite3-ruby pony Then clone this repository: git clone git://github.com/ehsanul/Sinatra-Authlogic-Template.git Edit the db/config.yml file and specify adapter settings. It defaults to sqlite3. You have to then run rake to create the database and run migrations. The command is simply: rake For subsequent migrations, run: rake migrate If you have sqlite3 installed and sendmail, or smtp on localhost for the email activation, the app should work out of the box. Run it with: ruby sin-auth-template.rb Or run it in production using passenger, or just: rackup Pony can be configured to use other SMTP settings. Just take a look at the User instance methods and adjust as required. Should probably switch to the Mail library. This is just something to get you started, so it doesn't matter all that much anyways. Contributions: Alf Mikulah - Authlogic 2.1.3 compatibility Todo: Tests
About
An Authentication Solution for Sinatra
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published