Skip to content

yaroslavrick/github_searcher_by_nickname

Repository files navigation

README

Screenshot of the app:

screenshot_of_app.png

Link to deployed app:

https://githubsearcherbynickname-production.up.railway.app/

Requirements

Make sure you have the following installed on your system:

  • Ruby version 3.2.2
  • Bundler

Installation

  1. Clone the repository:
git clone [email protected]:yaroslavrick/github_searcher_by_nickname.git
  1. Move into the project directory:
cd github_searcher_by_nickname
  1. Install dependencies using Bundler an Yarn:
bundle install && yarn install
  1. Create .env and .database.yml file from examples and update the values:
cp .env.example .env
cp config/database.example.yml config/database.yml
  1. Setup Docker services (PostgreSQL and Redis):
docker-compose up

Ensure that the ports configured in .env do not conflict with your running services.

  1. Create the database:
bundle exec rails db:create
  1. Run database migrations:
bundle exec rails db:migrate
  1. (Optional) Run seed data to create some sample data:
bundle exec rails db:seed

Usage

To start the app, run the following command:

bin/dev

or:

bundle exec rails server

Once the server is running, open your web browser and go to http://localhost:3000 to access the app.

Testing

To run the test suite, use the following command:

bundle exec rspec

Linting

To run the rubocop linter, use the following command:

bundle exec rubocop

To run json eslint, use the following command:

yarn lint

Task

The main task is to make a form in Rails that search in github by username. The result must be "full name" and list of user's repos.

Example:

user: dhh

Result:

David Heinemeier Hansson
- asset-hosting-with-minimum-ssl
- conductor
- textmate-rails-bundle

Done:

  • Searching by username in github.com, Task was to parse with GraphQL, but I make it with gem 'faraday'...

    Display search results:

  • Name of author
  • List of repositories

Todo: