Good stuff as usual Rodrigo. I'm not seeing the test failures you're talking about? About the line you removed, I would assume it's intent was to not require login and email for openid users, but as you say the other validations seem to make that a requirement anyway. I'll investigate.
Christian On Fri, Jun 24, 2011 at 23:32, Rodrigo Rosenfeld Rosas <rr.ro...@gmail.com>wrote: > Christian, it is not finished yet, but I won't have time soon to clean it > up (hope to do that on next weekend). > > If you are curious, take a look at my branch "devise-openid". > > Some tests are failing because I removed what I think is a redundant line > in User model: > > validates_presence_of :login, :email, :if => > :password_required? # <- removed that line > validates_format_of :login, :with => /^#{USERNAME_FORMAT_ON_CREATE} > **$/i, :on => :create > validates_format_of :login, :with => /^#{USERNAME_FORMAT}$/i, :on > => :update > validates_format_of :email, :with => Email::FORMAT > ... > validates_length_of :login, :within => 3..40 > validates_length_of :email, :within => 3..100 > > I removed the first line because the other validations will already make it > sure that login and e-mail should be present since they don't add options > like allow_nil and allow_blank. > > I think those tests should be fixed instead... > > There are other OpenID related tests that should be fixed (validation for > valid URL) or removed. > > Tip: don't try to read each commit separately as I tried one solution and > than changed to another one. Just do a diff between the first commit > changing to Devise (with a single failing test) and the last one... > > Hope you like it ;) > > -- > To post to this group, send email to gitorious@googlegroups.com > To unsubscribe from this group, send email to > gitorious+unsubscribe@**googlegroups.com<gitorious%2bunsubscr...@googlegroups.com> > -- MVH Christian -- To post to this group, send email to gitorious@googlegroups.com To unsubscribe from this group, send email to gitorious+unsubscr...@googlegroups.com