Giter VIP home page Giter VIP logo

ruby-task's Introduction

Comments from Jacek

  • You can run this app using bin/run
  • Use rake command to run specs and rubocop tests

Introduction

First of all, thank you for taking the time to complete this test task! The purpose of the task is to get an idea of your development style: the way you structure code, automated tests you add etc.

Task background

We publish our jobs to different marketing sources. To keep track of where the particular job is published, we create Campaign entity in database. Campaigns are periodically synchronized with 3rd party Ad Service.

Campaign properties:

  • id
  • job_id
  • status: one of [active, paused, deleted]
  • external_reference: corresponds to Ad’s ‘reference’
  • ad_description: text description of an Ad

Due to various types of failures (Ad Service inavailability, errors in campaign details etc.) local Campaigns can fall out of sync with Ad Service. So we need a way to detect discrepancies between local and remote state.

TODOs

  1. Develop a Service(as in Service Object pattern), which would get campaigns from external JSON API(example link) and detect discrepancies between local and remote state.
  2. The purpose of the task is to work on business logic, so please don't create a Rails app. Rather stucture your project the following way:
|-- .ruby-version
|-- .ruby-gemset
|-- Gemfile
|-- lib
    |-- source files go here
|-- spec
    |-- specs go here

You're free to add gems you need(including those which are part of Rails).

  1. You don't have to put all your code into one class. Please use your best judgment to split the code up into separate components.
  2. Note Don't fork this repository. Create you own public repository and send us a link to it. You may describe some of the assumptions you had in the README file of your repository.

Service output format

You're free to choose the output format which makes sense to you, we suggest the following:

[
  {
    "remote_reference": "1",
    "discrepancies": [
      "status": {
        "remote": "disabled",
        "local": "active"
      },
      "description": {
        "remote": "Rails Engineer",
        "local": "Ruby on Rails Developer"
      }
    ]
  }
]

Have fun!

ruby-task's People

Contributors

jpietrzyk avatar

Watchers

James Cloos avatar

Forkers

c080609a

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.