A simple electronic punch clock to track hours spent on projects.
Ruby 2.7
Rails 7.0
Postgres >= 9.1
Node 16.13.1
$ git clone [email protected]:Codeminer42/Punchclock.git
$ cd Punchclock
$ cp .env.example .env
$ Install Postgres
$ Install Redis
$ bin/setup
After installation steps the following admin users will be created in database
- Super Admin User
E-mail: [email protected]
Password: password
- A Admin User
E-mail: [email protected]
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
To enable guard-livereload
, you need to install the LiveReload extension on your browser.
In another terminal, start Guard:
$ bundle exec guard
After that, start the extension on your browser. You'll see a browser connection browser on the terminal.
Freely make your changes and the page will be refreshed after you save it.
$ 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:create
If you want to run tests:
$ docker-compose run --rm runner_tests bundle exec rspec
Now run the servers:
$ docker-compose up
This app uses RSpec, Factory Girl, Forgery and Faker to fake reality. Please read betterspecs.org.
At first time:
$ bundle exec rake db:migrate
Running tests:
$ bundle exec rake spec
Running with Guard:
$ bundle exec guard
To 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_pry
Run you application, the app should stop at the point that you added binding.remote_pry
.
In you terminal, run:
$ bundle exec pry-remote
Now you will get the piece of code where you can debug.
At the point of code that you want to debug, add:
binding.pry
Run 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.pry
In you terminal, run:
$ bundle exec rspec <PATH_TO_FILE>
To exit the pry
console, type:
To hard exit:
-> !!!
To soft exit:
-> exit
Copyright 2013-2021, Codeminer 42.
Punchclock is made available under the Affero GPL license version 3, see LICENSE.txt.