2

I got sick of rewriting login forms and user account management pages with the usual use-cases of registering a new account, changing password, changing e-mail, w/ associated e-mails. (This is for clients that won't accept an OAuth/OpenID solution). So I am creating a sample site with Sinatra and Datamapper that contains nothing but those features in their most distilled form.

What I'd like to do is package that site into a gem that someone could drop into an existing app and customize. I think it could get tricky because the app defines its own database and web server. So they would have to be redesigned as mix-ins for a Sinatra::App and Datamapper::Model.

Has anyone else tried this?

Lawrence I. Siden
  • 9,191
  • 10
  • 43
  • 56
  • I was thinking the same, but with Sequel for the database and Warden, though I'd like to make it datastore agnostic if possible. Have you considered writing it as an extension? http://www.sinatrarb.com/extensions.html If you see anything already done, let me know! – ian Jan 04 '12 at 07:57
  • 1
    Yes. I just wrote it! https://github.com/lsiden/accounts – Lawrence I. Siden Jan 04 '12 at 20:05

1 Answers1

1

I created the Ruby gem "accounts" to provide this functionality for web-apps using Sinatra. It can be cloned or forked at https://github.com/lsiden/accounts.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Lawrence I. Siden
  • 9,191
  • 10
  • 43
  • 56