Skip to content
Backend Code Challenge (Ruby)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db
lib
log
public
spec
test
tmp
vendor
.gitignore
.rspec
.ruby-version
Dockerfile
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru
docker-compose.yml

README.md

Viva Real - Code Challenge

Desafio Backend

Ferramentas:

  • Ruby 2.3.1
  • Rails 5.1.1
  • RSpec 3.6
  • SQLite
  • Puma

Dependências:

Instalação

  1. Instalar Docker: https://www.docker.com/community-edition#/download
  2. Clonar repositório:
$ git clone git@github.com:guilhermeslk/vr-code-challenge.git && cd vr-code-challenge
  1. Realizar build do ambiente:
$ docker-compose build
  1. Criar banco de dados da API no container web:
$ docker-compose run web rake db:create db:migrate
  1. Rodar seeds para cadastro de províncias:
$ docker-compose run web rake db:seed
  1. Subir ambiente:
$ docker-compose up

A aplicação estará rodando em http://localhost:3000 :)

Testes:

  1. Criar banco de dados de testes:
$ docker-compose run rake db:create db:migrate RAILS_ENV=test
  1. Rodar suíte:
$ rspec
You can’t perform that action at this time.