Wednesday, February 27, 2008

Merbful Authentication Initial Merb 0.9 Support

It's ready for a first off flogging. A huge thanx to Shay Arnett of merborials.com fame for all the great help in getting it going, along with plenty of others how have given support and hacks to get the plugin going. Merbful Authentication, the authentication generators based on RickOlsons cool restful_authentictaion plugin is ready for a first cracking. Please bear in mind that Merb 0.9 is still in it's infancy and so is this gem. It needs to be flogged so it can be solid. Having said that, it seems to be solid, but... well, you know...

There are not too many changes from before, mostly spec updates, and internal updates that only really affect the generators to use merb-gen.

Unfortunately test unit support is... well the test unit tests aren't working atm. RSpec ones work, and all the specs should function correctly. The specs are fairly complete tho so I have at least some confidence that the plugin is working :)

Git it


The repo has now been fully moved over to git. I'm not planning on updating the SVN repo. Of course if there are people that really want to use the SVN repo, I'll push it over there.

To get merbful_authentication just
sudo gem install merbful_authentication
or get it from my git repo.
git clone git://github.com/hassox/restful-authentication.git
cd restful-authentication
git checkout -b merbful_authentication origin/merbful_authentication
rake install

How to use it

merb-gen authenticated user_model session_controller [--include-activation]
The only required argument is the user model. The sessions controller will default to Sessions. If you use the --include-activation mailers and required code will also be included.

What's different?

Well, besides the internals of the gem being simplified, there has been some changes to the generated files themselves.

  • There isn't the mess of dependency and require statements anymore. There is a require on 1 file lib/authenticated_system/authenticated_system_dependencies.rb All the dependencies are listed in here.

  • The required routes are now in the lib/authenticated_system/authenticated_system_routes.rb file. They are automatically prepended to you routes once the app has started. So now you can just start using them :)

That's really it. The other changes are in the structure of the gem itself, and just a couple of small tweaks to get the syntax right for 0.9.

I hope this release will be relatively bug free, but if you do have any issues, catch me in #merb, or shoot me an email has.sox [at] gmail DOT c o m