Fixed major bug with inheritance.
The only check for whether or not to re-load the exemplars was in .spawn, but .gather_exemplars would go up the inheritance chain to get generators from parent classes. This caused some problems if a parent class had already gathered exemplars and then a child class caused it to re-gather them. (It was fine if the child class happened first.)
Moved the check to .gather_exemplars, added/moved specs, un-protected .gather_exemplars.
Adding Known Issues to README and generally updating content for recent changes.
Simplifying the cascading generation to always generate-and-save.
I guess I was right in that comment.
generate/generate! can now be thought of as analogs for create/create!
Moving 'generate' method entirely over to Rails side, leaving 'spawn' on its own for non-Rails use.
Further use of 'spawn' in place of 'generate' when only testing generation behavior without saving.
Minor (comment and whitespace) change in spec.
Making 'spawn' method to take over for 'generate' for the use case of not saving.
Added comments to indicate more ways of calling generator_for.
Adding specs to ensure blocks that specifically take no args (arity of 0 instead of -1 in Ruby 1.8) work just as well as blocks that implicitly take no arguments.
Allowing generator_for to take an attr => value hash
Allowing generator_for to take a mere value --- no block, no args hash, just a value
Allowing generator_for to take a block with no arguments
Small changes to the spec involving the real Widget class (for loading exemplar/generator files). Filled out a spec section for getting generators from parent classes' exemplar files and letting the subclasses override parent generators. Included a spec (currently pending) for getting the same to work if exemplar files aren't used, instead directly calling generator_for on the classes themselves (say, like in a test). Having trouble getting it to work.
added source class to generator recording.
Refactored the generator-recording method to store a hash rather than just the generator itself.
Added generator-recording method, refactoring generator_for a bit.
Errant whitespace
Adding spec to ensure generate-and-save method exists for Rails models. Removed 'def' in the code that came from somewhere and should have been nowhere.
Removing lots of explicit self. receivers because that's the way I roll, also cleaning up a little conditional in generate to see if generators exist.
Modified specs to actually create valid objects when the example says it's trying to create a valid object.
Added spec to ensure non-generator attrs don't get generated, reorged specs a bit.
Calling generate-and-save always on any belongs-to association required by ID.
.gitignore time
Options passed to validator must not stop at Object Daddy. They must be passed on to the actual validation. Damn you, Bradley.
1 2 Next » (1-25/41) | Per page: 25, 50, 100