Permalink
Commits on Jun 10, 2010
  1. Initialize relationships before checking for keys

    namelessjon committed Jun 10, 2010
    DataMapper.finalize now initializes all relationships before checking
    for keys.  This allows a join model which consists entirely of
    belongs_to relationships with `:key => true' to be considered valid.
    
    [#1313 state:resolved]
  2. Wrap finalize spec cleanup in ensure blocks

    namelessjon committed Jun 10, 2010
    This means one spec failure won't cascade through the specs.  An after
    block might seem to be the solution, but we'd need one per spec, which
    means nested describes for no other reason than to clean up.
Commits on Jun 8, 2010
  1. Version bump to 1.0.0

    dkubb committed Jun 8, 2010
Commits on Jun 6, 2010
  1. Test to make sure the model has a name when finalizing it

    dkubb committed Jun 6, 2010
    [#1303 state:resolved]
  2. Changed spec description strings to use single quotes

    dkubb committed Jun 6, 2010
    * My general coding style is to only use double quotes when I am doing
      string interpolation somewhere in the string, and otherwise defaulting
      to using single quotes at all times. When I see single quotes I don't
      have to visually inspect the String to see if anything else is going
      on inside it to alter it at runtime.
  3. Spec error message for own exceptions

    dkubb committed Jun 6, 2010
    * In general I believe if your code raises an exception you should spec
      the error message that you return. Not only will this make the code
      pass when heckled, but it also alerts you to unintended changes in
      the messages.
    
      For the record, I do not believe in speccing exceptions raised by ruby
      or code that is not under test.
  4. Fixed incorrect spec name

    dkubb committed Jun 6, 2010
Commits on May 29, 2010
  1. Fixed bug with hooks applied to subclasses

    dkubb committed May 29, 2010
    * Improved specs for resource hooks
    * Added specs for inherited after hooks
    * Changed inherited hooks to be based on instance method
    
    [#1271 state:resolved]
  2. Ensure the SaveFailureError exception has a reference to the resource

    dkubb committed May 29, 2010
    * When dm-validations is being used, this allows the exact errors to be
      retrieved from the invalid resource when the SaveFailureError exception
      is raised.
    
    [#1295]
  3. Refactored resource destruction

    dkubb committed May 29, 2010
Commits on May 27, 2010
  1. Version bump to 1.0.0.rc3

    dkubb committed May 27, 2010
Commits on May 26, 2010
  1. Add Model to case statement to force it to be treated as a scalar value

    dkubb committed May 26, 2010
    * Remove unnecessary conditional logic that defined a different method
      based on the RUBY_VERSION. In all cases, the remaining code should
      work with all versions of ruby.
  2. Remove unnecessary test

    dkubb committed May 26, 2010
    * Kernel::Array() will handle an Enumerable fine without a special test.
  3. Add DataMapper.finalize to public api

    namelessjon committed May 26, 2010
    This method takes care of initializing all foreign key and anonymous
    join tables for DataMapper models.  This initialization can only be done
    after all models are loaded, due the need to identify primary key types,
    amongst other things.
    
    * assert_valid is left in the private api, but will be removed soon.
Commits on May 25, 2010
  1. Updated Property option :unique_index to default to the :unique value

    dkubb committed May 25, 2010
    * If a property is a key, then :unique and :unique_index will be set
      to :key because there may be a composite PK and all properties would
      need to be validated as being unique together.
    * If :unique is not set, then it defaults to false, which also makes
      :unique_index default to false
    * If :index is not set it will also default to false for consistency
      with :unique_index
  2. Added Model#each

    dkubb committed May 25, 2010
    * Added specs for #each to finder interface
  3. Ensure Model is Enumerable

    dkubb committed May 25, 2010
  4. Added Model#values_at

    dkubb committed May 25, 2010
    * Added specs for #values_at to finder interface
  5. Added Model#fetch

    dkubb committed May 25, 2010
    * Added specs for #fetch to finder interface
Commits on May 24, 2010