-
Notifications
You must be signed in to change notification settings - Fork 20
Generate YAML
jtessler edited this page Feb 24, 2012
·
6 revisions
This process allows you to update the conf/initial-data.yml or create new test data using the current state of the application. This allows you to run Openbook, make some changes, and then save the new state to a human-readable YAML file.
- Install the module to your Play! framework:
play install logisimayml-1.8
- Update your local dependencies:
play dependencies
- Run
play dependencies
to download and install the module locally.
- Setup FS database in conf/application.conf:
db=fs
(this module does not work with the in-memory database)
- Start Play!:
play run
- Log in, make edits, etc.
- Once you're ready to save the current OpenBook state, close Play.
- Generate the new YAML file:
play yml:generate
(saves to conf/data.yml) - Convert back to the in-memory database in conf/application.conf:
db=mem
- Delete the FS database created in step (4):
rm -r db/
- Use the new YAML file as the initial data:
mv conf/data.yml conf/initial-data.yml
- Check in the changes to GitHub.
- Save the new YAML file as initial test data:
mv conf/data.yml test/foo_test.yml
- Begin the new test with the line:
Fixtures.loadModels("foo_test.yml");