Permalink
Commits on Jul 15, 2010
  1. Put the Inflector into our own namespace

    dbussink committed Jul 15, 2010
    It's not a sign of being a nice citizen that in case people don't
    use ActiveSupport, they end up with this constant defined anyway.
Commits on Jul 12, 2010
Commits on Jul 9, 2010
  1. Minor clean up in dump/load

    solnic committed Jul 9, 2010
  2. Moved property shared specs to dm-core/spec.

    solnic committed Jul 9, 2010
    This makes easier to require these shared specs in external
    plugins/projects where you want to check behaviour of your custom
    property types. Just do:
    
    require 'dm-core/spec/shared/semipublic/property_shared_spec'
    require 'dm-core/spec/shared/public/property_shared_spec'
    
    describe DataMapper::Property::MyAwesomeFoo do
      before :all do
        @name          = :foo
        @type          = DataMapper::Property::MyAwesomeFoo
        @primitive     = String
        @value         = 'value'
        @other_value   = 'other value'
        @invalid_value = 1
      end
    
      it_should_behave_like 'A semipublic Property'
      it_should_behave_like 'A public Property'
    
      # here go your custom examples
    end
Commits on Jul 8, 2010
  1. Append Property::Lookup extensions to Model

    Piotr Solnica
    Piotr Solnica committed Jul 8, 2010
  2. Updated HugeInteger property used in specs

    Piotr Solnica
    Piotr Solnica committed Jul 8, 2010
  3. Added DataMapper::Property::Lookup module.

    postmodern authored and Piotr Solnica committed Jul 7, 2010
    The module provides transparent access to Property and Type classes via
    a const_missing method.
Commits on Jul 7, 2010
  1. Adds Property.determine_class as a part of the semipublic API. This m…

    solnic authored and Piotr Solnica committed Jun 27, 2010
    …ethod
    
    is used by Model.property and Model.const_missing hook to figure out
    what property class should be used. It covers all the various cases like:
    
    class User
      include DataMapper::Resource
    
      # This is a part of DataMapper::Property namespace, const_missing hook
      # will catch it
      property :id,   Serial
    
      # This doesn't trigger const_missing hook hence we need to map it to
      # DataMapper::Property::String inside Model.property method
      property :name, String
    
      # This might not be defined inside DataMapper::Property namespace and
      # we need to map it to a correct Property-derived class like
      # YourApp::DataMapper::Properties::Hash or whatever else
      property :opts, Hash
    
      # This might be some deprecated Type that we need to support until
      # DataMapper 1.1. Mapping to a Property class is based on type's
      # primitive. ie if Foo.primitive == String then we create a
      # DataMapper::Property::String instance and set Foo as its type
      property :foo,  Foo
    end
Commits on Jul 5, 2010
  1. Minor spelling fix

    Rob Tirrell authored and snusnu committed Jul 5, 2010
    [#1346 state:resolved]
Commits on Jul 3, 2010
  1. Minor formatting fix

    dkubb committed Jul 3, 2010
Commits on Jun 27, 2010
  1. Minor documentation fixes

    snusnu committed Jun 27, 2010
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