Merge pull request #57 from redding/jcr-track-model-class-on-records

Track the model class on the record class
Make providing a class name optional for base association

This modifies the model associations base to make the associated
class name optional. This will allow adding polymorphic associations,
that do not have a static class name, but still allow them to build
on the current association logic. The one-to-one and one-to-many
associations still require passing an associated class name as they
did before.
Merge pull request #58 from redding/jcr-make-class-name-optional

Make providing a class name optional for base association
Use better ActiveRecord association methods for factories/stacks

This is a small refactor that switches to using "better"
ActiveRecord association methods. This changes from using the
`type` and `macro` methods for associations to using the booleans
`belongs_to?` and `collection?`. These require less
equality-checking and instead rely on the association object to
handle determining what it is or isn't. The fake record and it's
associations were updated as well to mimic this. I chose to go
with a similar boolean flag usage on the model associations to
be consistent and I think it's preferred to not hard check class
types and instead expect interfaces.
Merge pull request #59 from redding/jcr-use-better-ar-methods

Use better ActiveRecord association methods for factories/stacks
Commonize applying args logic from record and model factories

This commonizes the logic for applying args between record and
model factories. This is to setup some new features related to
this logic. This commonizes most of the logic and makes the
behavior consistent between the two kinds of factories.
Merge pull request #60 from redding/jcr-reorganize-applicable-args

Commonize applying args logic from record and model factories
Have factories build associations when provided in defaults

This modifies the factories applying args behavior to build
associations when provided defaults for them. This only occurs
when an association is not already set on the record/model.
This sets up providing defaults before a stack begins walking the
dependency tree. This way a record can set polymorphic data on
a model it depends on and the stack will be able to traverse the
associations.
Merge pull request #61 from redding/jcr-build-association-when-applying

Have factories build associations when provided in defaults
Modify stacks to take record/model instances instead of classes

This modifies stacks to take a record/model instance instead of
their class. The benefit of this is that the record used with the
stack can have data pre-set on it. This will allow stacks to work
with polymorphic associations because it will be possible to
set the type column for the association before the stack walks the
dependencies. This will also allow setting regular associations,
so custom records can be inserted into the stack as needed.
Organize stacks under the factory folder

This organizes stacks under the factory folder. With the changes
to stacks, they are now always intended to be used with factories.
This organizes them with factories to signify this and to remove
the unneeded `MR::Stack` module.
Merge pull request #62 from redding/jcr-pass-args-to-stacks

Modify stacks to take record/model instances instead of classes
Make the class name an option for fake record associations

This makes the class name optional for fake record associations.
This sets up defining fake polymorphic associations, as they do
not specify a class name option. Like ActiveRecord, these
associations will look at the record's data to determine the
class name.
Allow easily configuring a model class for fake records

This allows easily configuring a model class for fake records.
This is setup for polymorphic associations with fake records to
ask for the model class. This is covered by real records because
the model sets itself on the real record. This never occurs for
fake records so it's necessary to manually configure their model
classes.
wip