[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] NotNaughty 0.6.2

Florian Aßmann

10/31/2008 12:10:00 AM

Hi folks,

I released NotNaughty version 0.6.2.

NotNaughty is a validation framework. It's main purpose was to provide
more customizable validations to Ruby-Sequel but it can be used for
all things you might want to validate.

FEATURES:

* conditions
with :if or :unless pointing to procs or methods

* stateful
you can define the set of conditions for the current state of your
instance

* easy to extend
validations are encapsulated so you can just inherit from
NotNaughty::Validation and get a validates_xyz_of with conditions for
free

* easy to use
there are various ways to setup a validation on an attribute but
you can define them almost like with any other validation api

* exception handler
wrap SQLError or any other exception in validation errors

INSTALL

$ gem install not-naughty
or
$ gem install sequel_notnaughty

USE

require 'rubygems'
require 'not_naughty'

NotNaughty::Validation.load 'format' # load your validations

class Setup
extend NotNaughty

attr_accessor :serial_no
validates(:serial_no) { format :with => SerialMatcher.new }

end

CHANGES since 0.5 (not-naughty)
* NotNaughty::Builder is now NotNaughty::ClassMethods
* NotNaughty::Builder::ValidationDelegator is now
NotNaughty::ClassMethods::Builder
* NotNaughty::ClassMethods::Builder does not inherit from Delegation
anymore, so { format :with => /rx/ } works
* NotNaughty::Validation loads validations from directories listed
in load_paths
* cleaned up some code parts
* added support for predefined format expressions [resolves:#19814]
* fixed Rakefile
* removed Ruby-Sequel adapter
* removed assistance gem dependency

CHANGES (sequel_notnaughty)
* split from not-naughty gem
* added uniqueness validation with scope [resolves:#19650]
* works with Ruby-Sequel >= 2

BUGS
* rubyforge.org/projects/not-naughty

HACKING
* github.com/boof/not-naughty
* github.com/boof/sequel_notnaughty

Cheers
Florian


2 Answers

Michael Burgueño

11/3/2010 12:28:00 AM

0

On 2 nov, 21:13, Jeff <yourimageunre...@yahoo.com> wrote:
> On Nov 2, 6:50 pm, ermitano <maikelbur...@gmail.com> wrote:
>
> > On 2 nov, 03:10, "who?" <yourimageunre...@sbcglobal.net> wrote:
>
> > >   All you have to do is to click on the link below:
>
> > >    http://www.youtube.com/watch?v=1...
>
> > click on the link and then what?
>
> > i didn't understand where to vote for him.
>
> You had to log in and vote for him.

shit.. i vote for him several times, fucking youtube didn't show my
comments but then there were many comments by me.
the thing is that i voted for him!

Jeff

11/3/2010 12:33:00 AM

0

On Nov 2, 7:28 pm, ermitano <maikelbur...@gmail.com> wrote:
> On 2 nov, 21:13, Jeff <yourimageunre...@yahoo.com> wrote:
>
> > On Nov 2, 6:50 pm, ermitano <maikelbur...@gmail.com> wrote:
>
> > > On 2 nov, 03:10, "who?" <yourimageunre...@sbcglobal.net> wrote:
>
> > > >   All you have to do is to click on the link below:
>
> > > >    http://www.youtube.com/watch?v=1...
>
> > > click on the link and then what?
>
> > > i didn't understand where to vote for him.
>
> > You had to log in and vote for him.
>
> shit.. i vote for him several times, fucking youtube didn't show my
> comments but then there were many comments by me.
> the thing is that i voted for him!

Check later cause your post might show up. The same
thing has happened to me before.