Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on May 23, 2014
  1. @nikkypx

    Fix typo in comment

    nikkypx authored
Commits on Feb 20, 2014
  1. @nerab

    Allow optional attributes with types other than String

    nerab authored
    This commit adds support for optional attributes (nil is an allowed
    value). Without it, HappyMapper will fail with an error similar to:
    
      TypeError in '#to_xml Address before(:all)'
      wrong argument type Float (expected String)
    
    if an attribute is defined with a type other than String, but
    is actually nil, when to_xml is called.
    
    The fix is pretty simple - always calling to_s on the value is the
    right thing to do for an attribute, because attributes are always
    text in XML.
Commits on Sep 25, 2013
  1. @Michael-Gannon

    Release 0.4.1.

    Michael-Gannon authored
    * add support for explicit xpath option
Commits on Feb 16, 2012
  1. @teleological

    Support for explicit xpath option

    teleological authored
    Default xpath for non-root nodes matches all descendants. Sometimes,
    you only want to match the immediate child. The ability to specify
    xpath will cover this and other cases.
Commits on Sep 26, 2011
  1. Release 0.4.0.

    authored
Commits on Mar 13, 2011
  1. @burtlo

    Comments and Test Cleanup

    burtlo authored
      + #to_xml needed a small amount of refactoring
      + tests were outputting the xml
  2. @burtlo

    Feature: #to_xml

    burtlo authored
      Unhappymapper (or happyunmapper) which will take the HappyMapper mappings
      and write them back to XML
Commits on Jan 19, 2011
  1. FIX: Requires, XML, and Spec typo

    Frank Webber authored
     + HappyMapper could not be used with the examples because the require
       paths were not relative for the other files
    
     + Multi-Street Address XML was incorrect
    
     + Spec had a little typo
Commits on Jul 4, 2010
  1. Release 0.3.2.

    authored
    * Support for after_parse callbacks.
    * Add content method for getting at node's text.
  2. @technicalpickles
Commits on Jun 18, 2010
  1. Release 0.3.1.

    authored
  2. Removing rubygems.

    authored
Commits on Oct 5, 2009
  1. Prepped for 0.3 release.

    authored
Commits on Oct 2, 2009
  1. @bkeepers

    Fix for an element without a namespace nested inside of one with a na…

    bkeepers authored
    …mespace
    
    Set the namespace to false for elements that do not share the same namespace as the class:
    
      class Alert
        include HappyMapper
        namespace 'http://example.com/ns/alert';
    
        element :severity, String, :namespace => false
      end
Commits on Jul 16, 2009
  1. @bkeepers

    added collections for primitive values. included example class and xml

    Michael Macasek authored bkeepers committed
Commits on Jul 15, 2009
  1. @bkeepers

    Rework namespaces to work for namespaces declared inline.

    bkeepers authored
    This changes how namespaces are declared from previous versions. Instead of declaring the namespace prefix in the mapping, you must declare the namespace URL.
    
      class Foo
        include HappyMapper
        namespace http://example.com/v2
      end
Commits on May 28, 2009
  1. Classes can now be strings instead of constants so you don't have to …

    authored
    …worry about class definition order (this was all for technicalpickles, enjoy!)
Commits on May 18, 2009
  1. Prepped for 0.2.4 release.

    authored
Commits on Jan 30, 2009
  1. Removed no longer needed libxml helpers.

    authored
    Prepped for 0.2.2 release.
  2. @bkeepers

    Removed GC.start from .parse as it was causing significant performanc…

    bkeepers authored committed
    …e issues.
    
    Setting the node to nil should be sufficient to mark it for garbage collection, which will run before the ruby program terminates.
    
    Signed-off-by: John Nunemaker <nunemaker@gmail.com>
  3. @bkeepers

    Removed get_ prefix, it reminds me too much of Java

    bkeepers authored committed
    Signed-off-by: John Nunemaker <nunemaker@gmail.com>
  4. @mojodna

    Type coercion

    mojodna authored committed
    When the :parser option is provided for an element mapping along
    with a non-primitive type, HappyMapper will attempt to coerce the
    value of the mapped node into the specified type by using the class
    method specified by :parser.
    
    If coercion requires access to the full node (including tags), use
    :raw => true to parse the full node instead of just the value.
    
    Signed-off-by: John Nunemaker <nunemaker@gmail.com>
  5. @mojodna

    auto-detect root nodes

    mojodna authored committed
    Signed-off-by: John Nunemaker <nunemaker@gmail.com>
  6. @mojodna

    Pass namespaces around to avoid storing state

    mojodna authored committed
    Attaching a namespace to an instance of an object causes it to be
    stateful, resulting in non-deterministic behavior when run against
    different documents in varying orders.
    
    When choosing a namespace to use, the order is:
    1 - via namespace in class defn
    2 - via :namespace in element defn
    
    This patch also removes some unnecessary initialization.
    
    Signed-off-by: John Nunemaker <nunemaker@gmail.com>
  7. @mojodna

    Improved namespace support

    mojodna authored committed
    The previous namespace support did not handle documents containing multiply
    namespaced nodes.  It also made assumptions about the 'default' namespace
    when multiple prefixed namespaces were provided (with no implicit default).
    
    This patch allows namespaces to be set item-wide (via 'namespace <ns>' in
    the class) or on a per-element basis (via :namespace => <ns> on the
    element mapping).
    
    Signed-off-by: John Nunemaker <nunemaker@gmail.com>
  8. @mojodna

    fixed warnings about use of XML::Parser

    mojodna authored committed
    Signed-off-by: John Nunemaker <nunemaker@gmail.com>
Commits on Jan 29, 2009
  1. Added :root option to tag method. This allows setting an object as th…

    authored
    …e root element, which sets xpath to use / and sets single to true for this object.
  2. Automatic handling of namespaces. Much thanks to Robert Lowrey for st…

    authored
    …arting this and providing me with a lot of research.
Something went wrong with that request. Please try again.