The Skinny
To setup your newly generated Authenticated user, now all you need to do is setup the routes. (and the mailer if your using activation). All the including and dependency is taken care of for you. This is current as of 0.1.2. If you care about why and how... read on.Why and How
The main issues were with the controllers not having the mixin by default. Then when you try and include it you have to make it a dependency. Not very nice... I also kept getting tripped up on the merb_helpers dependency too.Well you'll be pleased to know that now, when you generate an authenticated user and you app loads, all the authenticated system is mixed into Application. The controller that your controllers should all inherit from. So it's now available to all your controller automatically :)
Also merb_helpers has been made a dependency where it's needed, and also a dependency on the gem so you don't have to worry about it. Ahhh... gem plugins are so nice like that.
It's up on rubyforge so sudo gem install merbful_authentication should do the job.
If you want source with that see my other post for instructions on where to get it.
Happy Hacking!
6 comments:
Many thanks, I ran across this problem when trying the merb + datamapper + merb_authentication screencast tutorial.
Great job.
I am trying out this plugin. Thx for releasing it.
I created a brand new merb app and ran the generator for this plugin. Added the routes to router.rb, uncommented datamapper and set the session_store to :memory. When I run the specs I am getting about 7 failures. This is just out of the box with no changes to the merb app on my part other than the config as detailed above. Do I need to do anything else to get the specs to pass?
Here are the failing specs:
1)
'Sessions Controller index action logins and redirects' FAILED
expected not nil, got nil
./spec/controllers/sessions_spec.rb:50:
2)
'Sessions Controller index action remembers me' FAILED
expected not nil, got nil
./spec/controllers/sessions_spec.rb:70:
3)
'Users allows signup' FAILED
./spec/controllers/users_spec.rb:16:
./spec/controllers/users_spec.rb:14:
4)
NoMethodError in 'Users requires login on signup'
undefined method `errors' for nil:NilClass
./spec/controllers/users_spec.rb:23:
./spec/controllers/users_spec.rb:21:
5)
NoMethodError in 'Users requires password on signup'
undefined method `errors' for nil:NilClass
./spec/controllers/users_spec.rb:31:
./spec/controllers/users_spec.rb:29:
6)
NoMethodError in 'Users requires password confirmation on signup'
undefined method `errors' for nil:NilClass
./spec/controllers/users_spec.rb:39:
./spec/controllers/users_spec.rb:37:
7)
NoMethodError in 'Users requires email on signup'
undefined method `errors' for nil:NilClass
./spec/controllers/users_spec.rb:47:
./spec/controllers/users_spec.rb:45:
Finished in 2.931224 seconds
72 examples, 7 failures
thanks
@jevon
K, I've seen this kind of error before. It means your app is raising an error. If you start merb and go to the page in the specs you should be able to see what the error is.
You'll need to set datamapper as the ORM before you run merbful_authentication.
I just generated a new app, and a ran merbful_authentication, setup the routes and session and it worked with no problems. All specs pass. I am on merb trunk with the latest plugin.
Please let me know what error you are experiencing. You can get hold of me at has.sox [at] g m a i l [dot] c o m
Found the issue. It works fine with the Merb trunk. The specs break when you use Merb 0.5.2 released gem. I switched over to using trunk and all's fine.
thanks for your help and a great plugin.
Wow, this is a great plugin, and I'm really enjoying using merb in my current projects.
If you're taking suggestions for plugin improvements, I have one. How difficult would adding optional OpenID support be, maybe with a --with-openid switch? I may look into doing this myself, but from what I saw it looked like a reasonably trivial addition, and as I'm still learning datamapper and have forgotten much of test::unit, it may be easier for someone familiar with all of these to make the additions. Then again, maybe not. :) I'll look at what the restful_open_id_authentication plugin does and see how difficult the changes would be.
Thanks again.
Download videos and read stories about incest: [url=http://www.adambagatto.com/picture_library/granny-porn-stars.html ]Milf Mom [/url], [url=http://www.adambagatto.com/video/video/asian-mature-porno.html ]Son Fuck [/url], [url=http://www.adambagatto.com/images/gallery/3D/fat-granny-porn-free.html ]Incest Family Incest Family [/url], [url=http://www.andrewdabeka.ca/images/mother-sucks-son-porn.html ]My Big Incest Family [/url], [url=http://www.andrewdabeka.ca/img/icons/insest-porn.html ]Mom Son Sex Mother Son Sex [/url], [url=http://www.andrewdabeka.ca/picture_library/moms-sons-sex-porn.html ]Son Mom Incest [/url], [url=http://www.ashphotography.ca/images/lesbian-porn-mature-free.html ]Royal Family Incest [/url], [url=http://www.ashphotography.ca/zenphoto/uploaded/dad-daughter-porn.html ]Moms Naked [/url], [url=http://www.ashphotography.ca/jes-new/pages/mom-sons-cock.html ]Burn Mother Fucker [/url], [url=http://www.ashphotography.ca/justine/video-porno-mature-men-free.html ]Mothers Fucking Their Sons [/url]
Post a Comment