GithubHelp home page GithubHelp logo

webmotors-api-test's Introduction

Webmotors API - Example

Description

Example of use of external API using Ruby on Rails where the data is synced and persisted locally but not dependent on the original API.
The logic needed to update and persist the Webmotors API information has being moved to a Service Object in order to keep controllers and models clean and DRY following Ruby/Rails best practices.

To decrease the server/database workload and still keep in sync with Webmotors API when the client makes a request(page load) the application sends just one first request to check if the amount of items in its database is equal to the items in the external API and updates it just if new items have been added.

In addition, if the Webmotors API is not available for some reason the application logs the connection failure but don't stop working and keep serving pages using its previously persisted data.

Tests

RSpec features and unit tests covering nearly every aspect of the application are available via rspec/rake commands:

    $ rake  

Deployment

This application can be deployed in a Vagrant instance and provisioned by Ansible playbooks using the code available in another repo.

The virtual machine to be built is based on Ubuntu 14.04 LTS, brings a Ruby on Rails isolated test/development/production environment and deploy this application in an automated fashion.

Clone the specified repo and follow the instructions on its README file:

    $ git clone [email protected]:havk64/Webmotors-API-test.git

webmotors-api-test's People

Contributors

havk64 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.