kinyodan / danbooks

Ruby on rails Application utilizing the new york times developers API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README


Danbooks App

About The Project

Ruby on rails Application utilizing the new york times developers API

Getting Started

This is are instructions on setting up your project locally. To get a local copy up and running follow these simple steps.

Kindly read the "Task Documentation.pdf" file present at the root folder of this repository, to get a good view of everything.

Prerequisites

  • Ruby . Version used "ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x86_64-linux]"

  • Ruby on rails . Version used "Rails 7.0.4"

Installation

  1. Clone master git repo
    git clone https://github.com/kinyodan/danbooks.git
  2. cd into directory and run
    bundle install

(if all is well it should be done and installed )

  1. Run Migrations

    rake db:migrate 
  2. Run below command to create the config/application.yml file where ENV variables will be added in this case the API keys

    bundle exec figaro install 
  3. Copy the contents of the file config/loaded_application.yml(found inside the config folder) into the generated application.yml file also inside the config folder

  4. Start rails server

    rails s  

Installation Using docker

Prerequisites

must have docker installed https://docs.docker.com/get-docker/

Installation

  1. cd into the root of the cloned repository if not already there and run below command to create the config/application.yml file where ENV variables will be added in this case the API keys

    bundle exec figaro install 
  2. Copy the contents of the file config/loaded_application.yml(found inside the config folder) into the generated application.yml file also inside the config folder

  3. Run below command

    docker-compose run web rake db:create
  4. Then and run below command

    docker compose up

This should run docker composer and start the rails server and application will be available at localhost:3000 when process is complete.

Running test

Prerequisites

To run test you need to have the following installed

  • Rspec

Running the tests

  1. You have run bundle install to install gems
    bundle install 
  2. Run Migrations
    rake db:migrate 
  3. to run test run below commands separately on the command line so as to run the full set of tests for full test coverage
    rspec 
    rails test 

(if all is well it should be done and running )

(back to top)

About

Ruby on rails Application utilizing the new york times developers API


Languages

Language:Ruby 56.0%Language:HTML 24.2%Language:SCSS 17.9%Language:JavaScript 1.0%Language:CSS 0.5%Language:Dockerfile 0.4%