This repository contains a Ruby on Rails API for managing user schedules. There are two possible paths for your technical interview:
If you're doing the pair programming session, you only need to:
- Get the application and its specs running on your machine
- Familiarize yourself with the basic code structure
- Optional: Install VS Code Live Share extension for collaborative coding (https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare)
If you're doing the code challenge, you'll need to implement new features and submit your work. Follow the complete instructions below.
You will not clone or fork this repository directly. Instead, you should create a new repository from this one using a mirror. This ensures there are no links between your repository and the original.
- Clone the repository as a bare repository:
git clone --bare https://github.com/easyPEP/staffomatic-code-challenge staffomatic-code-challenge
-
Create a new repository on your GitHub account (e.g.,
staffomatic-code-challenge
), but do not initialize it with a README, license, or.gitignore
. -
Mirror-push the bare repository to your new repository:
cd staffomatic-code-challenge
git push --mirror https://github.com/[YOUR_USERNAME]/staffomatic-code-challenge.git
- Remove the temporary local mirror repository:
cd ..
rm -rf staffomatic-code-challenge
- Clone the new repository to your local machine:
git clone https://github.com/fluxsaas/staffomatic-code-challenge.git staffomatic-code-challenge
cd staffomatic-code-challenge
You need Docker (including Docker Compose), please install this first.
After that start the app using:
docker compose up --build
Afterwards run the following steps (only needed on the first startup):
# start a shell in the running Docker container:
docker compose exec backend bash
# inside that shell:
echo "ebeb5c739426e455d429f3d011384b77" > config/master.key
bin/setup --skip-server
The app is reachable at: http://localhost:3000
To stop the app, press CTRL-C in the shell where docker compose up
is running.
To run the specs:
docker compose exec backend bundle exec rspec
To use guard
:
docker compose exec backend bundle exec guard
install gems with:
bundle install
add the "super secret" master key to the config folder:
echo "ebeb5c739426e455d429f3d011384b77" > config/master.key
to setup the app and run the server you can use:
bin/setup
to run the specs:
bin/rails db:test:prepare
bundle exec rspec
or use guard to run tests automatically:
guard
Now, you should have a new repository on your GitHub account without any connection to the original repository.
Once the repository is mirrored, create a new branch (e.g., feature/user-allocation
) to work on your solution:
git checkout -b feature/user-allocation
Proceed to implement the required features, tests, and configurations for the challenge, following the provided specifications.
Once your changes are complete:
-
Push your changes to your remote repository:
git push origin feature/user-allocation
-
Create a pull request (PR) from your feature branch (
feature/user-allocation
) to thedevelop
branch in your repository.
After creating the PR, invite me ([your GitHub username]
) as a collaborator on your repository. You can do this by going to your repository's Settings → Manage Access → Invite Collaborator.
please invite the following:
Please leave a note on the PR inviting me to review the work.