Skip to content

Repository containing projects to get hands on Ruby and Rails

Notifications You must be signed in to change notification settings

chikara1608/Ruby-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

A server written in Ruby that can generate random api keys, assign them for usage and release them after sometime. It has multiple endpoints such as :

  1. An endpoint to generate keys. Once a key is generated it has an expiry of 5 minutes, after which the key is no longer available.
  2. An endpoint to get an available key. On hitting this endpoint server serves a random key which is already not being used. This key is then blocked and not served again by E2 while it is in this state. If there are no keys available, server serves 404.
  3. An endpoint to unblock a key. Unblocked keys then further can be served again via E2. Once a key becomes unblocked it's expiry is updated to having new expiry 5 mins from when it was unblocked.
  4. An endpoint to delete a key. Deleted keys then are purged.
  5. An endpoint to keep a key alive that client needs to call every 5 minutes. If a particular key has not received a keep alive in last five minutes then it is deleted and never used again.

The codebase also includes Rspecs to provide coverage for logic of business requirements.

About

Repository containing projects to get hands on Ruby and Rails

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages