Skip to main content

Clearance Crypto

So in my foray into the rails templates world I’ve stumbled onto a couple of authentication options that I wasn’t previously aware of.

Authlogic which is nice in that it moves all the actual authentication logic into a gem to make updates dead simple. The one thing I didn’t like was that you have to generate all of your own MVC code. Though honestly this isn’t such an issue now that I have it all rolled in to a Rails 2.3 template

Clearance is also nice in that it generates the MVC code yet still keeps all the authentication logic in a gem for easy updates. The only thing I didn’t really care for, though I do understand why they did it, is the inability to choose the hash algorithm.

Along comes ClearanceCrypto this provides a very similar way to choose the hashing algorithm like you can in Authlogic. The code was picked and tweaked from the Authlogic code to match the way Clearance checks the authentication.

It’s very new and may have issues. Feel free to let me know if you find anything.

continue reading

Rails templates - Round 3

And yet another big change to Strappy there is a new branch that allows you to choose the authentication method you want to use (Authlogic, Clearance or restful_authentication) it’s currently located in a branch called choosy but will probably be moving to master soon.

continue reading

expose_model

I read an article by Stpehen Celis way back when and liked the idea behind it, but not having to add the methods to all my controllers. So I rolled it up into a gem and can now get the same functionality by doing

class FooController < ApplicationController
  expose_model :foo
end

and get the foo and foos methods plus the helper_methods.

You can find it on github

continue reading

Rails templates

Ok, I admit I’m a little late to the party.

I finally stumbled onto the rails templates and really like the idea. I was using bort but I wasn’t all that hapy with some of the decisions they made, like rolling all the migrations into one monolithic beast.

I took the forked version of bort and turned it into a rails template. Very nice.

You can find strappy here

The next step I plan on is making the restful_authentication generator build specs with 100% coverage. I see no reason to start an app at 88%

continue reading

HpricotScrub is now a Gem

I turned HpricotScrub into a Gem so that it’s easier to use across projects.

You can find the RubyForge project here and the Trac is here

sudo gem install hpricot_scrub
continue reading

Latest comments

Wayne E. Seguin on rvm + gemsets + TextMate == yay! on Feb 19, 2010 at 11:36 AM

Great writeup!

I’d like to point out one additional item for users of rvm, you can type ‘rvm info’ in your shell to gain the information about your current environment all in one command.

Thanks!

~Wayne

Wayne E. Seguin

Marnen Laibow-Koser on I prefer GemTools over config.gem on Jun 27, 2009 at 07:01 AM

I’ve never used GemTools, but I used to use geminstaller for similar reasons. However, as config.gem has matured, it has gotten to the point where I am switching applications over from geminstaller; rake gems is a big reason for this.

And for the use case of Capistrano installing everything, you don’t need GemTools. Just put in a suitable Cap task to install the Rails gems to bootstrap the system; then you can rely on config.gem.

Marnen Laibow-Koser

Reena on FCKeditor on Rails on Apr 13, 2009 at 04:17 AM

Hi,

I am new to this rails application, trying to create a blog application, where i have used fckeditor, till now i am able to get the fckeditor on to the browser, but i really do not know how to save the contents typed over there to the database. can some one explain me.

Thank You

Reena

micahel on Hpricot Scrub on Apr 07, 2009 at 10:11 AM

@chick – was the gem for version 0.3.5 broken for you?

gem install hpricot_scrub

sounds like you may have gotten the old hpricot-scrub gem, which should have been removed from rubyforge, but appears it was still there.

micahel

chick on Hpricot Scrub on Mar 26, 2009 at 02:44 PM

forgot to say thanks

chick