Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jul 15, 2010
  1. @dbussink

    Put the Inflector into our own namespace

    dbussink authored
    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.
  2. @dbussink
  3. @dbussink
Commits on Jul 12, 2010
  1. @solnic
Commits on Jul 9, 2010
  1. @solnic

    Minor clean up in dump/load

    solnic authored
  2. @solnic
  3. @solnic

    Moved property shared specs to dm-core/spec.

    solnic authored
    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 authored
  2. @postmodern

    Added DataMapper::Property::Lookup module.

    postmodern authored Piotr Solnica committed
    The module provides transparent access to Property and Type classes via
    a const_missing method.
Commits on Jul 7, 2010
  1. @solnic

    Adds Property.determine_class as a part of the semipublic API. This m…

    solnic authored Piotr Solnica committed
    …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. @snusnu

    Minor spelling fix

    Rob Tirrell authored snusnu committed
    [#1346 state:resolved]
Commits on Jul 3, 2010
  1. @dkubb

    Minor formatting fix

    dkubb authored
Commits on Jun 27, 2010
  1. @snusnu

    Minor documentation fixes

    snusnu authored
Commits on Jun 10, 2010
  1. @namelessjon

    Initialize relationships before checking for keys

    namelessjon authored
    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. @dkubb
Commits on Jun 8, 2010
  1. @dkubb

    Version bump to 1.0.0

    dkubb authored
Commits on Jun 6, 2010
  1. @dkubb
  2. @dkubb

    Test to make sure the model has a name when finalizing it

    dkubb authored
    [#1303 state:resolved]
  3. @dkubb
  4. @dkubb

    Minor whitespace formatting fix

    dkubb authored
Commits on May 29, 2010
  1. @dkubb

    Fixed bug with hooks applied to subclasses

    dkubb authored
    * Improved specs for resource hooks
    * Added specs for inherited after hooks
    * Changed inherited hooks to be based on instance method
    
    [#1271 state:resolved]
  2. @dkubb

    Ensure the SaveFailureError exception has a reference to the resource

    dkubb authored
    * 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. @dkubb

    Refactored resource destruction

    dkubb authored
  4. @dkubb
  5. @dkubb
Commits on May 27, 2010
  1. @dkubb

    Version bump to 1.0.0.rc3

    dkubb authored
  2. @dkubb
Commits on May 26, 2010
  1. @dkubb

    Add Model to case statement to force it to be treated as a scalar value

    dkubb authored
    * 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. @dkubb

    Remove unnecessary test

    dkubb authored
    * Kernel::Array() will handle an Enumerable fine without a special test.
  3. @namelessjon

    Add DataMapper.finalize to public api

    namelessjon authored
    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. @dkubb

    Updated Property option :unique_index to default to the :unique value

    dkubb authored
    * 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. @dkubb
  3. @dkubb
  4. @dkubb

    Added Model#each

    dkubb authored
    * Added specs for #each to finder interface
  5. @dkubb

    Ensure Model is Enumerable

    dkubb authored
Something went wrong with that request. Please try again.