Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

IIC2113-2021-2/2020-2-repo-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo Base

This is a Rails application, initially generated using Potassium by Platanus.

Before installation

Make sure you have install a ruby package manager and a node package mannager. For Ruby we recomend using rbenv with rbenv-aliases to set an alias for an specific version. For node we recomend using nodenv with nodenv-aliases to set an alias for an specific version.

Note: You can choose any other option available like rvm for Ruby or nvm for Node. But make sure you don't have multiple package mannagers install for Ruby or Node.

Local installation

Assuming you've just cloned the repo, run this script to setup the project in your machine:

$ ./bin/setup

It assumes you have a machine equipped with Ruby, Node.js, Docker and make.

The script will do the following among other things:

  • Install the dependecies
  • Create a docker container for your database
  • Prepare your database
  • Adds heroku remotes

After the app setup is done you can run it with Heroku Local

$ heroku local

or

$ rails s

Local installation (windows detail)

One assistant did the same installation as above but with the next details:

Continuous Integrations

The project is setup to run tests in CircleCI

You can also run the test locally simulating the production environment using docker. Just make sure you have docker installed and run:

$ bin/cibuild

If you do not want to run your test with in Docker you can run them locally (you will need the database running either way):

$ bundle exec rspec spec/

Style Guides

Style guides are enforced through a CircleCI job with reviewdog as a reporter, using per-project dependencies and style configurations. Please note that this reviewdog implementation requires a GitHub user token to comment on pull requests. A token can be generated here, and it should have at least the repo option checked. The included config.yml assumes your CircleCI organization has a context named org-global with the required token under the environment variable REVIEWDOG_GITHUB_API_TOKEN.

The project comes bundled with configuration files available in this repository.

Linting dependencies like rubocop or rubocop-rspec must be locked in your Gemfile. Similarly, packages like eslint or eslint-plugin-vue must be locked in your package.json.

You can add or modify rules by editing the .rubocop.yml, .eslintrc.json or .stylelintrc.json files.

You can (and should) use linter integrations for your text editor of choice, using the project's configuration.

Internal dependencies

Authentication

We are using the great Devise library by PlataformaTec

Rails pattern enforcing types

This projects uses Power-Types to generate Observers, Services, Commands, Utils and Values.

Error Reporting

To report our errors we use Sentry

Administration

This project uses Active Admin which is a Ruby on Rails framework for creating elegant backends for website administration.

Seeds

To populate your database with initial data you can add, inside the /db/seeds.rb file, the code to generate only the necessary data to run the application. If you need to generate data with development purposes, you can customize the lib/fake_data_loader.rb module and then to run the rake load_fake_data task from your terminal.