Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/ Tap Public

🍺 Yes. We have to drink. But we also have to pay. This does the drinking part.

License

Notifications You must be signed in to change notification settings

ZeusWPI/Tap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1,051 Commits

Repository files navigation

Code Climate Ruby

🍺 Yes. We have to drink. But we also have to pay. This is the drinking part.

Development

To provide a consistent experience on every system, docker and docker-compose is used during development and production.

Using Docker and Make (recommended)

Linux/Unix

  1. Install Docker and Docker Compose (if not already included).
  2. Start the development server
    make up

    This will start a development server on http://localhost:3000. Cancelling this command will leave tap running in the background. You can stop it using make down.

  3. Seed the database.
    make seed

    The development setup uses a SQLite 3 database, which can be found under /db/development.sqlite3.

See the Makefile for all commands.

Windows

  1. Install WSL (Windows Subsystem for Linux)
  2. Follow the instructions for Linux/Unix above

Directly on your system

Tip

If you have nix with flakes, run nix develop.

  1. Install gems: bundle install
  2. Install npm packages: npm i
  3. Initialize and migrate the db: bundle exec rails db:migrate
  4. Seed the db: bundle exec rails db:seed
  5. Start Tap: ./bin/dev (or run npm run build:js, then bundle exec rails s)

Tests

Run bundle exec rake
or if that doesn't work try bundle exec rspec?

Linter (rubocop)

  • Run bundle exec rubocop to lint
  • To autocorrect most offences
    • safely : bundle exec rubocop -a
    • unsafely : bundle exec rubocop -A

Deploy to production

  1. Make sure your user has access to tap@tap.zeus.gent.
  2. Uncomment the - "${HOME}/.ssh:/root/.ssh:ro" line in docker-compose.yml.
  3. Run make deploy.

FAQ

Can I use Tap for development without setting up Tab? Tap does not sync with Tab when in development mode. The user's balance is mocked by Ζ΅12.34 instead.
How do I login as the "Koelkast" user? In development, you can login as Koelkast using the link: http://localhost:3000/sign_in?token=token
I get a "mismatching_redirect_uri" error when trying to login The Zeus authentication provider has a pre-configured list of hosts that are allowed to use the login. http://localhost:3000 is on this list and should be used for development.
Docker image build is stuck on "Fetching gems..." or another command If you are connected to the **`eduroam`** network, Docker build will not have access to the internet. This is because eduroam and docker use the same IP range, which causes conflicts. To solve this you can [reconfigure Docker to use a different IP range](https://support.skyformation.com/hc/en-us/articles/360009195759-How-To-Change-the-Docker-IP-address-space). A recommended range can be `172.31.248.0/21` which is rarely used by other networks.
There are no transactions going from Tap to Tab The delay job may not be running. You can start it using:
sudo -u tap RAILS_ENV=production /home/tap/production/current/bin/delayed_job start

Licensing

This software is distributed under the terms of the MIT. A copy of this license can be found in the LICENSE file.

Copyright Β© 2014-2025 Zeus WPI bestuur@zeus.gent

About

🍺 Yes. We have to drink. But we also have to pay. This does the drinking part.

Topics

Resources

License

Stars

Watchers

Forks

Packages

Contributors 27

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /