Git Product home page Git Product logo

covidliste's Introduction

Covidliste

Test Ruby Style Guide Security Rating Vulnerabilities codecov

Covidliste makes it easy to manage waiting lists for vaccination centers.

https://www.covidliste.com

Stack

Local Development

Installation

Prerequisites

If you don't already have them :

  • Install ruby 2.7.3 rbenv install 2.7.3 && rbenv global 2.7.3
  • Install bundler 2.2.15 gem install bundler:2.2.15
  • Install yarn npm i -g yarn
  • Install redis brew install redis
  • Install postgresql brew install postgresql

Dependencies

Setup the project's dependencies :

bundle install
yarn
bin/lefthook install

Create the .env file:

echo "LOCKBOX_MASTER_KEY=0000000000000000000000000000000000000000000000000000000000000000" > .env

Database / Cache

  1. Create a database called covidliste_development using your favorite postgresql GUI or CLI.
  2. Then run the migrations : bin/rails db:migrate RAILS_ENV=development
  3. Run redis if it's not already running : redis-server /usr/local/etc/redis.conf

Running

bin/rails s

If you need Sidekiq background workers or Webpacker development server, you can start them all using overmind

overmind s

Admin development

In a rails console with rails c

user = User.find_by(email: <your_email>)
user.add_role(:admin)
# user.add_role(:super_admin) # for super admin

Docker

Launch the Docker environment:

docker-compose up

Visit http://localhost:3000

Contributing

Visit https://github.com/hostolab/covidliste/blob/master/CONTRIBUTING.md

Thanks to all our contributors

Code formatting

In order for the pipeline to be successful, you must ensure that you respect the linting made using

bin/standardrb --fix
bin/yarn prettier --write .

If some errors are printed it means that some of the different issues can not be corrected automatically. Then you will need to correct them manually.

In rubymine, please follow this procedure to add the formatter / linter directly in the editor tabs: https://www.jetbrains.com/help/ruby/rubocop.html#prerequisites

Testing

To launch the tests locally, run:

bin/rspec
# On macOS you can open Code Coverage results with:
# open coverage/index.html

If you want to debug System Tests in the browser, add the following Ruby line as a debugger in your spec/system/... file:

page.driver.debug(binding)

Then launch the test with:

INSPECTOR=true bin/rspec spec/system/THE_FILE_spec.rb

It should automatically open Chrome and allow you to inspect the DOM, queries, etc. You can next and continue in the Terminal as if you had a binding.pry debugging session.

covidliste's People

Contributors

adrienpoly avatar carsso avatar colinemarie avatar florck avatar github-zoe-cade avatar guillaumewrobel avatar hack3rvaillant avatar jcsanti avatar kelu27 avatar mathieuripert avatar mininao avatar papike avatar peiofour avatar rchampourlier avatar rthbound avatar ssaunier avatar thbar avatar valentindotxyz avatar yannbertrand avatar

Watchers

 avatar  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.