hostolab / covidliste
- понедельник, 12 апреля 2021 г. в 00:25:54
0 doses perdues.
Covidliste makes it easy to manage waiting lists for vaccination centers.
If you don't already have them :
rbenv install 2.7.3 && rbenv global 2.7.3
gem install bundler:2.2.15
npm i -g yarn
brew install redis
Setup the project's dependencies :
bundle install
yarn
bin/lefthook install
Create the .env
file:
echo "LOCKBOX_MASTER_KEY=0000000000000000000000000000000000000000000000000000000000000000" > .env
covidliste_development
using your favorite postgresql GUI or CLI.bin/rails db:migrate RAILS_ENV=development
redis-server /usr/local/etc/redis.conf
bin/rails s
If you need Sidekiq background workers or Webpacker development server, you can start them all using overmind
overmind s
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
Visit https://github.com/hostolab/covidliste/blob/master/CONTRIBUTING.md
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
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.