https://githubsearcherbynickname-production.up.railway.app/
Make sure you have the following installed on your system:
- Ruby version 3.2.2
- Bundler
- Clone the repository:
git clone git@github.com:yaroslavrick/github_searcher_by_nickname.git
- Move into the project directory:
cd github_searcher_by_nickname
- Install dependencies using Bundler an Yarn:
bundle install && yarn install
- Create .env and .database.yml file from examples and update the values:
cp .env.example .env
cp config/database.example.yml config/database.yml
- Setup Docker services (PostgreSQL and Redis):
docker-compose up
Ensure that the ports configured in .env
do not conflict with your running services.
- Create the database:
bundle exec rails db:create
- Run database migrations:
bundle exec rails db:migrate
- (Optional) Run seed data to create some sample data:
bundle exec rails db:seed
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.
To run the test suite, use the following command:
bundle exec rspec
To run the rubocop linter, use the following command:
bundle exec rubocop
To run json eslint, use the following command:
yarn lint
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.
user: dhh
Result:
David Heinemeier Hansson
- asset-hosting-with-minimum-ssl
- conductor
- textmate-rails-bundle
-
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
- Use GitHub flow (https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/github-flow#following-the-github-flow)
- Deploy app: (https://yaroslav-yenkala-gitsearcher.herokuapp.com/)
- Add linter rubocop (https://github.com/rubocop/rubocop)
- RSpec-rails tests (https://github.com/rspec/rspec-rails)
- Use vcr for requests to external API in rspec (https://github.com/vcr/vcr)
- Learn GraphQL and make a task with it (https://github.com/rmosolgo/graphql-ruby)