Skip to content

kalpana0795/github-api-demo

Repository files navigation

README

  • Ruby Version 2.7.2

  • Rails Version 6.0.3

System Dependencies

  • Install ruby-2.7.2
  • Install Node.js, yarn and postgres

Instructions

  • Clone the git repository
  • Run the commands bundle install and yarn install
  • Create database.yml by referring to database.example.yml and updating the username/password
  • Setup the database using the command bundle exec rails db:setup
  • Run the test suite using bundle exec rspec to confirm if the setup is successful.
  • Start the rails server using bundle exec rails s
  • Visit http://localhost:3000 to view the home page of the application.
  • Optionally you can also run bin/webpack-dev-server in a separate console for hot recompiling of assets.

ApacheBench Report

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

Details

  • 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.

References

Github REST API: https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#list-commits

Future Enhancements

  • 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.

About

Application to view commit history of github repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published