A simple electronic punch clock to track hours spent on projects.
Ruby 2.7.5
Rails 6.0.3
Postgres >= 9.1
$ git clone git@github.com:Codeminer42/Punchclock.git
$ cd Punchclock
$ cp .env.example .env
$ Install Postgres
$ Install Redis
$ Install NodeJS
$ bin/setupAfter installation steps the following admin users will be created in database
- Super Admin User
E-mail: super@codeminer42.com
Password: password
- A Admin User
E-mail: admin@codeminer42.com
Password: password
Javascript with ES6 syntax should be compiled by webpack instead of sprockets as of now. The Javascript may work in development mode in modern browsers, but it will break in production mode, be aware.
Run it on development mode using thin
$ foreman start -f Procfile.dev$ cp .env.example .env
$ docker-compose build
$ docker-compose run --rm runner bundle install
$ docker-compose run --rm runner yarn install --frozen-lockfile
$ docker-compose run --rm runner bundle exec rake db:reset
$ docker-compose run --rm runner_tests bundle exec rake db:createIf you want to run tests:
$ docker-compose run --rm runner_tests bundle exec rspecNow run the servers:
$ docker-compose upThis app uses RSpec, Factory Girl, Forgery and Faker to fake reality. Please read betterspecs.org.
At first time:
$ bundle exec rake db:migrateRunning tests:
$ bundle exec rake specRunning with Guard:
$ bundle exec guardTo debug this app, follow the following steps, for more details about debugging with pry, read the official documentation here: https://pry.github.io/ .
At the point of code that you want to debug, add:
binding.remote_pryRun you application, the app should stop at the point that you added binding.remote_pry.
In you terminal, run:
$ bundle exec pry-remoteNow you will get the piece of code where you can debug.
At the point of code that you want to debug, add:
binding.pryRun you application, the app should stop at the point that you added binding.pry and you will get the piece of code where you can debug.
At the point of code that you want to debug, add:
binding.pryIn you terminal, run:
$ bundle exec rspec <PATH_TO_FILE>To exit the pry console, type:
To hard exit:
-> !!!To soft exit:
-> exitCopyright 2013-2021, Codeminer 42.
Punchclock is made available under the Affero GPL license version 3, see LICENSE.txt.