Marley Spoon Recipes is a simple Sinatra application where users can see
- a list of Marley Spoon recipes
- detailed information about each recipe.
The application is a view-only application which connects to Marley Spoon's Contentful CMS via the Contentful Content Delivery API.
Views have been implemented without styling as no UI specification has been provided as of yet.
The app requires:
- Ruby version 2.6.1
- Git
The app is deployed at https://marley-spoon-recipes.herokuapp.com
Ensure you have the correct version of ruby installed. You can check your ruby version by typing ruby --version
in your terminal.
Instructions for how to install Ruby will depend on your development environment and the tool you use to manage your ruby installations. Please see the Ruby documentation website for detailed installation instructions.
Clone the repositoty: git clone git@github.com:carlad/marley-spoon-recipes.git
After cloning the repository navigate into the project directory cd marley-spoon-recipes
and run bundle install
.
You will need to create a .env
file in the root directory with values set for the CONTENTFUL_SPACE_ID and
CONTENTFUL_ACCESS_TOKEN environment variables. Copy the .env_example
file and add the credentials found here.
(The .env
file is ignored by git and not committed, to ensure no credentials are leaked - see the .gitignore
file).
Run bundle exec puma
then visit localhost:9292
Run bundle exec rspec
You can also use Guard to watch for any file changes and rerun relevant tests automatically:
bundle exec guard
It is recommended to use the configured pre-commit and pre-push hooks to check linting, security, and ensure tests pass before pushing.
You will need to install the hooks locally for them to take effect:
$ ./scripts/install-hooks.bash
The application uses CircleCI to run tests and deploy to Heroku.
To run your own instance of the application using the same tools you will need to configure the CONTENTFUL_SPACE_ID and CONTENTFUL_ACCESS_TOKEN environment variables on both platforms, as well as the HEROKU_APP_NAME and your HEROKU_API_KEY on CircleCI. Refer to the Heroku Docs and CircleCI Docs for more information on how to do this.
TODO: Parse markdown content in views