Configuration - addisonmartin/share-the-food GitHub Wiki

The section gives an overview of the various project configuration files, and what they are each used for.

If you encounter any errors with this wiki, or the project in general, please submit a new issue!

Ruby Version

The project's Ruby version is specified in share-the-food/.ruby-version. Most Ruby language managers will search for and use that file by default.

Current Ruby version.

Environment

Ruby on Rails runs in three different environments: development, test, and production. Specific Gems can be installed for specific versions, see the Gemfile.

Environment specific configuration is handled in share-the-food/environments/development.rb, etc.

Environment Variables

Certain, sensitive environment variables are stored encrypted. The decryption key is master.key, which is not tracked by Git. You can edit the credentials from your terminal.

rails credentials:edit

For Heroku, the master.key's value must be supplied as an en environment variable directly, because the file isn't tracked by git.

Project Dependencies

A list of all the project's dependencies can be found in the Gemfile. Dependencies are split by the environment.

In the Gemfile, all versions are manually specified, exact for the minor version in which case the latest version is used. This means each Gem declaration in the Gemfile is followed by a version specification of the following form:

'~> X.X.0'

The latest Gem versions can be found here.

Database

PostgreSQL

Database configuration lives in share-the-food/config/database.yml. Three databases are defined for each environment: development, test, and production.

Active Storage (Images)

Images are stored on Cloudinary. See the production database's config.

Routes

All of the web routes can be found in: share-the-food/config/routes.rb

Alternatively, you can view the routes with a command.

rails routes

User Authorization

User roles are handled with the cancancan gem. User roles are defined in: share-the-food/app/model/ability.rb.

Travis CI

Travis CI configuration can be found in: share-the-food/.travis.yml

Web Server (Puma)

share-the-food/config/puma.rb

Foreman (Procfile)

share-the-food/Procfile

Rubocop

The Ruby style guidelines configuration can be found at: share-the-food/.rubocop.yml

Sonarqube

share-the-food/sonar-project.properties