Giter Club home page Giter Club logo

agenda-saude-joinville's Introduction

agendamento-vacina

Original project, it reflects the master branch

agendamento-covid

Internal 'fork', it reflects the master-covid branch

Index

Dependencies

Created with command rails new rails-template --database=postgresql --skip-turbolinks --webpack=react --skip_coffee.

Things you need to install to run this project:

  • Ruby >= 2.6.5
  • Node >= 13.2.0
  • PostgreSQL 12.1

Ubuntu

apt-get update
apt-get postgresql postgresql-contrib postgresql-server-dev-all cmake node libpq-dev
gem install bundler

MacOS

brew update
brew install postgres node
gem install bundler

Development

Setup

bundle install
cp config/database.yml.example config/database.yml
bin/rails db:setup

Run the local server at http://localhost:3000 with:

bundle exec rails serve

Check code style with:

bundle exec rubocop

Run tests with:

bundle exec rails test

Use guard to run tests and check code style as you code:

bundle exec guard

You can check test coverage information by running the test suite and looking into coverage/ folder:

bundle exec rails test
open coverage/index.html

Style Guides

Defaults

This project come with some defaults preconfigured:

Active Admin

This is an administration framework that automatically generate scaffold UIs. Take a look in the docs.

To register new models use:

rails generate active_admin:resource [ModelName]

This creates a file at app/admin/model_names.rb for configuring the resource. Refresh the web browser to see the interface.

Authentication

It has Devise installed and configured with User model, i18n files and the internationalized views for English and Brazilian Portuguese.

Go to Model documentation to see the available model configurations and Controller documentation to see the avaliable configurations for controllers.

Tests

RSpec is installer and configured. All tests are located on the spec directory. It also comes with faker, factory boy, shoulda-matchers, database_rewinder, ruby-prof, timecop, vcr, webmock, [simplecov] support.

Code Quality

rubocop is configured with default Ruby and Rails linting and best practices. Take a look in all Rals cops available.

guard is configured to support live file reloads for Rails, RSpec and Rubocop.

Danger

Config for Danger with support for SimpleCov. Take a look on Dangerfile for details. Review your Dangerfile and change the checks for your needs. Also, config the needed environment variables in your CI:

DANGER_GITHUB_API_TOKEN: XXX

Take a look in the project documentation.

Pronto

Run it with pronto run ..

If you want to use Pronto in your CI, please config the needed environment variables. Bellow is an example:

PRONTO_GITHUB_ACCESS_TOKEN: XXX
PRONTO_PULL_REQUEST_ID: "$(echo $CIRCLE_PULL_REQUEST | grep -o -E '[0-9]+')"
PRONTO_GITHUB_SLUG: "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
PRONTO_FORMAT: "%{msg} [%{runner}:%{level}]"
PRONTO_VERBOSE: true

Take a look in the project documentation.

Deploy

Change your remotes to reflect the new application state

git remote set-url origin [email protected]:magrathealabs/agenda-saude-joinville.git
git remote add vacina https://git.heroku.com/agendamento-vacina.git
git remote add covid https://git.heroku.com/agendamento-covid.git

It should look like this in the end (remove any other remotes)

git remote -v

covid https://git.heroku.com/agendamento-covid.git (fetch)
covid https://git.heroku.com/agendamento-covid.git (push)
origin  [email protected]:magrathealabs/agenda-saude-joinville.git (fetch)
origin  [email protected]:magrathealabs/agenda-saude-joinville.git (push)
vacina  https://git.heroku.com/agendamento-vacina.git (fetch)
vacina  https://git.heroku.com/agendamento-vacina.git (push)

For the vacina app deploy you can run

git push vacina master:master

And for the covid app deploy you can run

git push covid master-covid:master

agenda-saude-joinville's People

Contributors

laurogripa avatar mat-bit avatar gustavodiel avatar bugarela avatar maickellvilela avatar vgasparini avatar vitorebatista avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.