Open jenchanflipp opened 1 year ago
This is a great first pass! I do think that having an interactive process will make more sense, especially because right now the templates are making a bunch of assumptions as to what needs to be filled in. Allowing the user to specify that will help a lot so they don't have to go into each of these files and edit them.
This is a great first pass! I do think that having an interactive process will make more sense, especially because right now the templates are making a bunch of assumptions as to what needs to be filled in. Allowing the user to specify that will help a lot so they don't have to go into each of these files and edit them.
Thanks for your feedback! An interactive process does sound like it would be more helpful to the user. So, the user would have to specify
Is there anything else that they should provide?
I'd look through the template and generator files to see what assumptions are being made in the output, and try to add those as inputs.
Description
To create an ActiveRecordConsumer (one of our most common tasks) there are a number of steps that have to be taken - create a DB migration, Rails model, consumer, consumer config, Deimos schema class. We have now added a new ActiveRecordConsumer Generator, which will streamline this process into a single flow.
Notes for consideration:
Fixes # (GUILD-690)
Type of change
New feature (non-breaking change which adds functionality)
How Has This Been Tested?
[ ] Test A: Unit tests via rspec where we are invoking the generator and validating that all the necessary files have been created
[ ] See spec/generators/active_record_consumer_generator_spec.rb
[ ] Test B: Manual tests that invoke the generator via command line in a ruby project that imports the deimos gem
[ ] Ensure you have a Widget schema file located in your schema root and then execute command
rails g deimos:active_record_consumer test.Widget
andrails g deimos:active_record_consumer test.Widget config/initializers/myconfig.rb
Checklist: