https://github.com/kylewelsby/crash-reporting-code-challenge
Code Challenge completed for an issue tracking SaaS
https://github.com/kylewelsby/crash-reporting-code-challenge
code-challenge
Last synced: 5 months ago
JSON representation
Code Challenge completed for an issue tracking SaaS
- Host: GitHub
- URL: https://github.com/kylewelsby/crash-reporting-code-challenge
- Owner: kylewelsby
- License: mit
- Created: 2021-01-28T18:57:20.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-29T00:23:29.000Z (almost 5 years ago)
- Last Synced: 2025-03-13T19:45:10.023Z (11 months ago)
- Topics: code-challenge
- Language: Ruby
- Homepage:
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README

[](https://github.com/testdouble/standard)
# Crash Notifier Code Challenge
Code Challenge completed by [Kyle Welsby](https://github.com/kylewelsby).
In this code challenge, I am tasked to produce a Application Crash notification processing API endpoint as setout in [CHALLENGE.md](./CHALLENGE.md)
Useful notes and todos througout the development can be found in [TODO](./blame/main/TODO)
## ⚡️ System Dependencies
This project expects Ruby 2.7.2, PostgreSQL, and Redis installed on your system.
_At time of writing Ruby 3.0 has recently been released, but 2.7.2 is the current stable version_
## 🎲 Installation
Clone the project to your local system and run bundler in the project directory
```
git clone https://github.com/kylewelsby/crash-reporting-code-challenge.git
cd crash-reporting-code-challenge
bundle install
```
Setup the database
```
bundle exec rails db:setup db:migrate
```
## 🎯 Usage
Start the application instance and workers using foreman
```
bundle exec foreman start
```
You can make requests such as:
#### Notify
Notify of a application crash
```
curl -X POST \
'http://localhost:5000/notify' \
-H 'access-control-allow-origin: *' \
-H 'Content-Type: application/json; charset=utf-8' \
-d '{
"project_id": "1",
"severity": "error",
"message": "a error message"
}'
```
#### Stats
Show counters of crashes
```
curl http://localhost:5000/projects/1/stats
```
## 🤖 Testing
Run RSpec tests suite
```
bundle exec rspec
```
## 🚨 Linting
This project uses [`standardrb`](https://github.com/testdouble/standard).
```
bundle exec standardrb .
```
🎓 License
MIT: https://kylewelsby.mit-license.org