项目作者: RuanAyram

项目描述 :
Assessment for L.G.
高级语言: Ruby
项目地址: git://github.com/RuanAyram/search_address_api.git
创建时间: 2021-01-17T21:48:29Z
项目社区:https://github.com/RuanAyram/search_address_api

开源协议:

下载


README

Tools

Tool Purpose
Postman Requests in the api

Gems

Gems Purpose
Rspec Default tests
Rubocop Static code analyzer and formatter
factory_bot_rails Setting up Ruby objects as test data
shoulda-matchers Simple one-liner tests
General Version
Ruby 2.7.1
Rails 6.0.3.2

Getting started

Clone the repository

  1. git clone git@github.com:RuanAyram/search_address_api.git

Edit config/database.yml, if necessary

Enter in the folder, then run these commands to install gems, create a database and populate, then run api locally

  1. cd search_address_api
  2. bundle install
  3. rails db:create && rails db:migrate && rails db:seed
  4. rails s

My API Endpoints

Address

Method + url Output
GET {base_url}/api/v1/addresses?cep={cep} Returns a list params according API ‘http://cep.la/

For test, run:

  1. $ bundle exec rspec