/star_wars_swapi

Star Wars project based on Swapi API.

Primary LanguageRuby

README

This is a project made with Star Wars SWAPI API!

App

Setup

Prerequisites

The setups steps expect following tools installed on the system.

  • Git
  • Ruby 3.0.2
  • Rails 6.1.4.1
  • PostgreSQL

Steps to run project

  1. Clone this the repository:
    $ git clone git@github.com:CaioFML/star_wars_swapi.git
  1. Go to the folder and bundle install:
    $ cd star_wars_swapi
    $ bundle install
  1. Run yarn:
    $ yarn
  1. Create and setup the database:
    $ rails db:setup
    $ rails db:migrate
  1. Running tests:
    $ rails db:test:prepare
    $ bundle exec rspec

The coverage of tests can be verified opening: ./coverage/index.html

  1. Running rubocop:
    $ bundle exec rubocop

6.Running reek:

    $ bundle exec reek
  1. Import all content from SWAPI API to populate database:
    $ rails import_star_wars_data:all
  1. Run server and webpacker:
    $ rails s
    $ bin/webpack-dev-server