Initial commit

Change-Id: Ia4dfa7af605981be19ef52add71e16a88bb0e5e6
Generalized to allow for more than two versions

Change-Id: I5087e696a11b7367f0b0799ade87d642fac27d2e
added aux_data schema for back-compat. fields

The previous versions of the foo message remain unchanged, but a new v14
version is introduced with an aux_data schema.

- If a Foo::V14 object is constructed without aux_data, then
  generate_old_fields cannot be executed
- If the object is constructed with aux_data, then generate_old_fields
  used the aux data to create the backwards-compatible fields
- aux_data is no longer a possible argument to generate_old_fields

Change-Id: I2986adbceec6d26cfa3592e1e6a73e0d822a4a80
Deep copy all hashes

Change-Id: I6bb35626ff25b64448e8de67ac6fa023b75adb6d
Allow partial hashes and partial updates.

Complete validation only happens during encoding and decoding.

Change-Id: I254faceb83cd6ded99314043dd105aaf6c29610d
Base mixin created, small duplicate code remains

Change-Id: Ib0f307e5ee2cdd8d8fbbeae1fd8982104f3d64d1
Replaced MsgConstError with UpdateAttrError

Change-Id: I53f6e384d1cae5f264b04208409cf8496c339605
Removed unnecessary hash lookup

Change-Id: I178c413c97532482ae76ba1857d2018e6b64d443
Added reader for aux_data

Change-Id: I9f9b3704fe58e8e00d9d77a8b3682ebf3d9f798c
Modify tests to reflect absence of future versions

Previously, tests simulate their version by stubbing the defintion of the
method Schemata::Component::Foo.current. If a test simulating version 12
constructed a new Foo::V13 object, it would pass because the class
Schemata::Component::Foo::V13 still existed (even if a call to current
returned Schemata::Component::Foo::V12).

Now, the handles to future version classes are explicitly removed from
Schemata::Component::Foo during tests and restored after the tests have
run. This means that they are not present in the class lookup table for
the duration of the test.

Change-Id: I0f4b9f57e0825e0da519d8b29a8a032a23f4f0bf
Common container to validate contents and aux data

- Support partial validation of aux data.
- Don't validate aux data during decode.

Change-Id: I1a8caca75f92f0fa25fe045774a572b76d26c8d8
Removed dupl code by pushing it into Foo::Base

Change-Id: Ic98f84a0ab2950384ee1c8ed467d2880e80876f8
Turned schema and aux_schema to class methods

Change-Id: If584390a02415d771c3d9cf3e2d18c3e3a1bdb55
Change mixin to base class

Change-Id: Iede982cbf869c864fdf4309998d3a01a76a1da50
Big refactor to reduce duplicated code

- MsgBase mixin used for each version of each message in each component
- MsgTypeBase mixin for message type (e.g., "Bar", "Foo") in each
  component
- Schemata::API mixin for external API (e.g., Schemata::Component.decode, ...)
- ParsedMsg and Error moved to common directory
- Included a "Bar" message type for the CloudController gem (to identify
  duplicated code across gems)

Change-Id: I1bca524250b322ef4feb7789b8ac997a90b410c4
Improve specs.

Change-Id: I59b9cd2708c555c332151da4275c915a93cd5096
Add .gitignore, Gemfile.lock.

Change-Id: I931baa03aaa67559faaa57544340a42001875794
Decode and Encode API Change

Encode:
  json = msg_obj.encode
Decode:
  msg_obj = Schemata::Component::Foo.decode(json)

Change-Id: Id1af29a702a0bd8d006f5b85b31d3494eeb794a7
Create DSL

Change-Id: Ic0e43aee3f7a888b7604dc347ae219519aed996e
Move attr accessors from init

Before this commit, accessors for message types (i.e.,
Schemata::Component::Foo::V11) and ValidatingContainer were defined in
the initializer. To make sure that accessor is defined exactly once for
each class, the following changes are made:

- ValidatingContainer.define(schema):
    Creates a subclass of ValidatingContainer with accessors for each key
    in the schema.
- 'define' called from DSL 'version' call; so ValidatingContainer
  subclasses are defined once for each new message version
- Accessors for the message version are defined in the DSL 'version'
  call.

Change-Id: I644d050d496f916175bda304e5d886dc444a31c3