README
Last updated
Last updated
is a web framework written in the language.
This project is to provide an ORM in Crystal.
Granite is looking for volunteers to take over maintainership of the repository, reviewing and merging pull requests, stewarding updates to follow along with Crystal language updates, etc.
Fork it ( https://github.com/amberframework/granite/fork )
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am 'Add some feature')
Push to the branch (git push origin my-new-feature)
Create a new Pull Request
Granite uses Crystal's built in test framework. The tests can be run with $ crystal spec
.
The test suite depends on access to a PostgreSQL, MySQL, and SQLite database to ensure the adapters work as intended.
There is a self-contained testing environment provided via the docker-compose.yml
file in this repository. We are testing against multiple databases so you have to specify which docker-compose file you would like to use. Replace "{database_type}" with "mysql" or "pg" or "sqlite". Before you can run the docker configuration you have to set the appropriate env variables. To do so you can either load them yourself or modify the .env
file that docker-compose loads by default.
You can find postgres versions at https://hub.docker.com//postgres/ You can find mysql versions at https://hub.docker.com//mysql/
After you have docker installed do the following to run tests:
First run
Subsequent runs
Cleanup
If you're done testing and you'd like to shut down and clean up the docker dependences run the following:
Run all
To run the specs for each database adapter use ./spec/run_all_specs.sh
. This will build and run each adapter, then cleanup after itself.
If you'd like to test without docker you can do so by following the instructions below:
Install dependencies with $ shards install
Update .env to use appropriate ENV variables, or create appropriate databases.
Setup databases:
PostgreSQL
MySQL
Export .env
with $ source .env
$ crystal spec