-
Notifications
You must be signed in to change notification settings - Fork 4
/
README
43 lines (20 loc) · 1.19 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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