Skip to content
Case Study for comparing data.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
spec
.gitignore
.reek.yml
.rspec
.rubocop.yml
.ruby-gemset
.ruby-version
.travis.yml
Gemfile
README.md
Rakefile
thinker.gemspec

README.md

Build Status

Thinker

Thinker is a tool that finds discrepancies between Campaign entity result set and remote ad service data.

Requirements

ruby >= 2.3

Installation

  • $ git clone git@github.com:zeitnot/thinker.git
  • $ bundle install
  • $ rake

RDocs

You can view the Devise documentation in RDoc format here: https://www.rubydoc.info/github/zeitnot/thinker/

Usage

Got to $ bin/console and then type FindDiscrepancy.call. This will produce something like:

[
  { 
      remote_reference: "1",
      remote_existence: true,
      discrepancies: [
          { remote: "Description for campaign 11", local: "Campaign Description", field: "ad_description" }, 
          { remote: "enabled", local: "paused", field: "status" }
      ]
  },
  { remote_reference: "4", remote_existence: false, discrepancies: [] },
  { remote_reference: "5", remote_existence: false, discrepancies: [] },
  { remote_reference: "6", remote_existence: false, discrepancies: [] }
]

Important

If there is exceptions such as connection timeout or parsing malformed JSON data FindDiscrepancy.call will return empty array. This means that FindDiscrepancy.call is fault tolerant for known exceptions.

You can’t perform that action at this time.