Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Mar 1, 2011
  1. Dan Kubb
  2. Dan Kubb
  3. Dan Kubb

    Updated rcov dependency to 0.9.9

    dkubb authored
  4. Dan Kubb
  5. Dan Kubb

    Updated Copyright year

    dkubb authored
  6. Dan Kubb

    Version bump to 1.1.0.rc1

    dkubb authored
Commits on Feb 28, 2011
  1. Dan Kubb

    Regenerated gemspec

    dkubb authored
  2. Dan Kubb
Commits on Feb 26, 2011
  1. Dirkjan Bussink

    Refactor properties and relationships to use a single module

    dbussink authored
    This prevents having a very large number of anonymous modules
    attached to a model. All these anonymous models harm performance
    because of slower method lookup. It also makes the behavior when
    reopening a model and redefining a property more consistent. The
    latter actually happens a lot in the specs.
    
    This was found wheni debugging the JIT issue with Rubinius.
Commits on Feb 22, 2011
  1. Dan Kubb

    Simplify relationship finalization

    dkubb authored
    * Using a case statement here won't necessarily work because the
      OneToMany object is a proxy object, and the Relation#=== methods
      are inherited from Class#===, and don't know anything about the
      proxy object. The best approach is to use kind_of? and only
      handle the 3 distinct cases:
    
        1. The relationship is m:1
        2. The relationship is m:m (or 1:1 wrapping a m:m)
        3. The relationship is 1:m (or 1:1 wrapping a 1:m)
  2. Dan Kubb
Commits on Feb 21, 2011
  1. Piotr Solnica

    Cleaned up my previous commit

    solnic authored
  2. Piotr Solnica
  3. Dan Kubb

    Make sure all specs require spec_helper

    dkubb authored
    * On some platforms, where the specs are run in a different order, this
      was causing problems because the specs that didn't require spec_helper
      were being executed first, and the environment wasn't setup properly
      for them. However, on OSX (where I test primarily) the spec_helper is
      required at some earlier point in time.
    
      This should never happen. A spec should be able to run stand-alone, and
      in any order and always return the same results.
  4. Dan Kubb

    Require spec_helper using a relative path

    dkubb authored
    * This silences a JRuby warning
Commits on Feb 20, 2011
  1. Jordan Ritter

    Don't ever use String#to_datetime because it's broken in AS < 3.x.

    jpr5 authored
    Tested 2.3.3 and 2.3.11 (latest as of this commit):
    
    ruby> ActiveSupport::VERSION::STRING
    => "2.3.11"
    ruby> "2010-01-01 00:00:00 -0800".to_datetime
    => Fri, 01 Jan 2010 00:00:00 +0000    # TZ gone
    
    ruby> DateTime.parse("2010-01-01 00:00:00 -0800")
    => Fri, 01 Jan 2010 00:00:00 -0800    # TZ preserved
Commits on Feb 19, 2011
  1. Dan Kubb

    Added i18n dependency

    dkubb authored
Commits on Feb 18, 2011
  1. Dan Kubb
  2. Dan Kubb

    Updated gemspec

    dkubb authored
    * Removed duplicate deps specified in Rakefile
  3. Dan Kubb

    Changed jeweler dep to 1.5.2

    dkubb authored
    * Removed check_dependencies task as a dep on the spec/rcov rake tasks
Commits on Feb 8, 2011
  1. Martin Gamsjaeger

    Make DataMapper::Model.new a private API for now

    snusnu authored
    This method is mainly used inside DM to generate
    anonymous join models. It was never really meant
    to be public API and we actually already started
    questioning the meaning of semipublic API.
    If a method is intended to be called by clients,
    it's public API, if not it should be private API.
Commits on Jan 24, 2011
  1. Dan Kubb
  2. Dan Kubb
  3. Xavier Shay
Commits on Jan 21, 2011
  1. Xavier Shay

    Ruby 1.8 doesn't support Range#cover?, use Range#include? instead - i…

    xaviershay authored
    …n this case they are equivalent
  2. Xavier Shay
  3. Xavier Shay

    Allow Query::Path objects to be specified for the order of a query. For

    xaviershay authored
    example:
    
      Post.all(
        :order => author.full_name,
        :links => [Post.relationships['author'].links]
      )
  4. Xavier Shay

    Relax the valid order assertions to allow ordering by properties not on

    xaviershay authored
    the base model, for example:
    
      Post.all(
        :order => Author.full_name,
        :links => Post.relationships['author'].links]
      )
  5. Xavier Shay
Commits on Jan 19, 2011
  1. Martin Gamsjaeger
Commits on Jan 18, 2011
  1. Martin Gamsjaeger
Commits on Jan 17, 2011
  1. Jordan Ritter

    Make Property lookups defensive against same-named custom properties.

    jpr5 authored
    Background: Property class lookups are triggered through const_missing,
    typically when defining a property in the Model DSL and referring to it by
    innermost class name (e.g. "Serial").  This in turn maps to Property#find_class,
    which uses an algorithm that effectively relegates lookups inside the
    descendants tree to a flat namespace of demodulized names.  The algorithm
    returns the most-recently-defined property of the same name, which is incorrect
    in the case where a custom property with the same class name as a DM built-in is
    present, but not relevant in all contexts. (FYI this problem was present before
    the demodulized_names optimization was introduced.)
    
    We solve this problem by only ever adding to the lookup table (not allowing
    overrides).  Given that DM typically gets its property classes loaded first,
    this means its types are always "reserved", and anything externally-derived will
    be included for indirect lookups only when they don't override built-in type
    names.  For the common case, this should be fine.
    
    For external property authors who want to provide "replacements" for builtins
    (e.g. in a non-DM-supported adapter), they should follow the convention of
    wrapping those (or all) properties in a module, and include'ing the module on
    the model class directly.  This bypasses the const_missing lookup that would
    normally check the Property descendant tree/table, ensuring the correct property
    class mapping in the context of a given model.
  2. Piotr Solnica

    Collection should use loaded values when setting up default attributes

    solnic authored
    [#1336 state:fixed]
    [#1411 state:fixed]
  3. Martin Gamsjaeger
  4. Martin Gamsjaeger
Something went wrong with that request. Please try again.