Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Support for Model Generation #207

Merged
merged 5 commits into from
May 14, 2015

Conversation

hstrowd
Copy link
Contributor

@hstrowd hstrowd commented May 14, 2015

Pulled the model generation largely from Rails as was done for the migration generation. Stayed in line with the conventions set by the migration generator as much as I could tell. Supports specifying attribute data types, references, indexes, polymorphic references, and model inheritance. Generates the ActiveRecord model, DB migration, factory, and rspec test. Pulled the GeneratedAttribute class out into it's own file. Added a full set of tests for the model generation logic. If you have any questions or concerns related to these changes, don't hesitate to let me know. Thanks.

'model <NAME> [field[:type][:index] field[:type][:index]] [options]',
'Create a Model, including its database migration and test scaffolding'
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra empty line detected at class body end.

@umtrey
Copy link
Contributor

umtrey commented May 14, 2015

👏 this is beautiful. some of the hound things probably could go either way, but this has been on the wish list for a long time.

@darbyfrey
Copy link
Contributor

This looks great! Thanks for the contribution @hstrowd!

darbyfrey added a commit that referenced this pull request May 14, 2015
Adds Support for Model Generation
@darbyfrey darbyfrey merged commit 8abe6d0 into bellycard:master May 14, 2015
@shaqq
Copy link
Contributor

shaqq commented May 14, 2015

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants