https://github.com/tejasbubane/repo_search
Simple sinatra app to show github repos by search term
https://github.com/tejasbubane/repo_search
Last synced: 7 days ago
JSON representation
Simple sinatra app to show github repos by search term
- Host: GitHub
- URL: https://github.com/tejasbubane/repo_search
- Owner: tejasbubane
- Created: 2020-03-30T13:30:15.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-30T13:37:41.000Z (about 6 years ago)
- Last Synced: 2025-03-25T09:51:26.534Z (about 1 year ago)
- Language: Ruby
- Homepage: https://evening-meadow-90548.herokuapp.com/
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Repo Search
Try it out: https://evening-meadow-90548.herokuapp.com/
### Problem Statement
Make a simple web app where you can display public repositories from github based on search term provided. Super simple page with input search field and result right under it.
### Setup
Install dependencies:
```sh
bundle install
```
[Create github access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) & add to `.env` file. Refer [.env-example](./.env-example).
Run the app:
```sh
bundle exec puma -C config/puma.rb
```
Run all tests:
```sh
bundle exec rspec
```
**Sidenote:** This project uses `Ruby 2.7` which [emits deprecation warnings with many libraries](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/). Prefix all above commands with `RUBYOPT='-W:no-deprecated -W:no-experimental'` to silence them.
### Decisions
* Keep the app as minimal as possible.
* Scope of given problem statement does not require database, so don't use one.
* Use sinatra since there are only couple of routes.
* Bootstrap from CDN to reduce hassle of management of static assets within repo.
* Github search API supports pagination & returns only 30 results per page by default, did not implement pagination to limit scope & complete in minimal time.
* `rspec` for basic testing of routes & rendering.