Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
Commits on Nov 16, 2012
@jnunemaker Remove plugins, Toy.clear and Toy.reset.
With AS::Concern, plugins are pretty easy without some built in way of
doing it. Just make a module and include it.
@jnunemaker Reformat changelog to be more markdowny. daeee1f
@jnunemaker Updates for adapter 0.7.0. Changed read multiple methods.
* Read multiple methods now take array of ids instead of any number of
* Removed get_multi, use (find/read/get)_multiple.
@jnunemaker Ensure option passing to read methods is spec'd. ae2fb02
Commits on Nov 19, 2012
@jnunemaker Release 0.13.0. 0e3b466
@jnunemaker Ensure uuid returns self if already a uuid. 2d5b932
@jnunemaker Ensure uuid returns self if already uuid. Also sets store default. 968d1ee
@jnunemaker Use described_class shortcut. 750cdc2
@jnunemaker Added hash key factory.
The basic idea is a composite key. Each attribute defined for the hash
key is available as a virtual attribute. The adapter you use must know
how to natively store an id that is a hash or be able to convert it to
something native.
@jnunemaker Ensuring that all hash values get set.
Previously if you set one value, it would not try to set the others as
id? would return true, since the hash was not blank once it had a
single key. This overrides id? to ensure that it returns false if any
of the values are blank.

Really need to introduce a new type here...
@jnunemaker Added hash key example. 22ec830
Commits on Nov 20, 2012
@jnunemaker Stop persisting nil attributes. b83628b
@jnunemaker No need for id to be a real attribute.
No tests break and this makes id like any other virtual attribute which
means exceptions are not needed for it when persisting and such.
@jnunemaker Added Model.persisted_attributes. 1476963
@jnunemaker Use class level persisted_attributes to generate instance persisted a…
@jnunemaker Remove tap usage. f0d882f
@jnunemaker Memoize defaulted and persisted attributes. e1edf96
@jnunemaker Added json type.
Encodes and decodes using active supports json. Does not try to decode
non-string values. This allows you to stay in ruby land until to_store.
from_store is called whenever a value is assigned in toystore so
without this, you would always have to assign a json string. Not fun.
@jnunemaker Rename user to track in hash key factory spec 055737c
Commits on Nov 21, 2012
@jnunemaker Changed hash key factory to composite
Added composite object that is hash-like.

Not sure about this direction after doing it. Thinking it might be
better to have no id by default and then allow adding one or more
primary keys after declaring the attributes.
@jnunemaker Added #keys and #values to Composite. 78f4866
@jnunemaker Unfocus composite key factory specs. 205a7a5
@jnunemaker Fix object specs. f100049
@jnunemaker Swap out primary querying method to those that match adapters. cc26d38
@jnunemaker Pulling composite type and key factory.
Changed my mind. I don't like where this was headed. Thinking about some different ideas instead.
@jnunemaker Added persisted_id and made it and persist method public.
Now there are choke points for persisted_id, persisted_attributes, and
the actual persist method. These are all safe to override if you need
something wacky.
@jnunemaker Use persisted_id in #delete. 5c687f4
@jnunemaker Moved class and instance level persisted_attributes to persistence mo…
@jnunemaker Turned on fail fast for rspec.
Giving it a try. I always feel overwhelmed if several things fail at
once and prefer to just work on one at a time.
@jnunemaker Moved Identity to Store from Object.
No need for objects to require identity.
@jnunemaker Update changelog for 0.14.0 changes thus far. 08e616e
@jnunemaker Minor: alignment. 8c249d7
@jnunemaker Update readme and all examples. 36d6dcf
Commits on Dec 20, 2012
@jnunemaker Allow nil values for uuid attributes. d58b3fe
Commits on Dec 21, 2012
@jnunemaker Ensure persisted_id is used when reloading object from adapter. a9f6b94
@jnunemaker Added symbol type. edbedcf
Commits on Jan 26, 2013
@jnunemaker Minor whitespace fix in guardfile. b84ff01
@jnunemaker Release 0.13.1. e584b40