-
Ruby Version 2.7.2
-
Rails Version 6.0.3
- Install
ruby-2.7.2 - Install
Node.js,yarnandpostgres
- Clone the git repository
- Run the commands
bundle installandyarn install - Create
database.ymlby referring todatabase.example.ymland updating theusername/password - Setup the database using the command
bundle exec rails db:setup - Run the test suite using
bundle exec rspecto confirm if the setup is successful. - Start the rails server using
bundle exec rails s - Visit
http://localhost:3000to view the home page of the application. - Optionally you can also run
bin/webpack-dev-serverin a separate console for hot recompiling of assets.
| Server Software: | |||
|---|---|---|---|
| Server Hostname: | localhost | ||
| Server Port: | 3000 | ||
| Document Path: | / | ||
| Document Length: | Variable | ||
| Concurrency Level: | 10 | ||
| Time taken for tests: | 59.061 seconds | ||
| Complete requests: | 1000 | ||
| Failed requests: | 0 | ||
| Total transferred: | 3339886 bytes | ||
| HTML transferred: | 2478200 bytes | ||
| Requests per second: | 16.93 | ||
| Transfer rate: | 55.22 kb/s received | ||
| Connnection Times (ms) | |||
| min | avg | max | |
| Connect: | 0 | 0 | 3 |
| Processing: | 217 | 586 | 1377 |
| Total: | 217 | 586 | 1380 |
- Application to view commit history of github repository
- Filter results by changing the page number, owner, repo and branch/sha of commits.
- Control the number of results by passing commits per page as parameter.
- Currently the rate limit is 60 requests per hour.
Github REST API: https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#list-commits
- Feature specs to test the UI level functionality can be added for checking the functionality using libs such as capybara, cucumber, siteprism.
- Fetched results can be stored in the database/cache to reduce number of API calls.
- Sidekiq workers and cron jobs which run at specific intervals can be used to watch the repository and update the records in the database.
- Formatted errors logging and notifying using services such as rollbar can be introduced.
- Other filters can be introduced to filter commits by author, date, etc.