[ANN] NotNaughty 0.6.2

Discussion in 'Ruby' started by Florian Aßmann, Oct 31, 2008.

  1. 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
    Florian Aßmann, Oct 31, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Sampson [MSFT]

    [ANN]: NNTP Server slow downs.

    Mike Sampson [MSFT], Oct 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    396
    Mike Sampson [MSFT]
    Oct 7, 2003
  2. Mike Sampson [MSFT]

    [ANN]: NNTP Server slow downs.

    Mike Sampson [MSFT], Dec 6, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    484
    Mike Sampson [MSFT]
    Dec 6, 2003
  3. Richard Grimes [MVP]

    ANN: Free .NET Workshops

    Richard Grimes [MVP], Jul 4, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    493
    Richard Grimes [MVP]
    Jul 4, 2005
  4. Michael Livsey
    Replies:
    3
    Views:
    398
    Michael Livsey
    May 27, 2004
  5. Florian Aßmann

    [ANN] NotNaughty - Validation Framework 0.4

    Florian Aßmann, Feb 25, 2008, in forum: Ruby
    Replies:
    1
    Views:
    86
    Avdi Grimm
    Feb 25, 2008
Loading...

Share This Page