This is an API that check and display the discrepencies between 2 web-services. Check the original spec.
Usage example:
curl -vv -H "Accept: application/json" -H "Content-type: application/json" -XPOST http://localhost:3000/ads/status --data '{"ads": [{"external_reference": "1", "status": "active", "description": "foo", "id": 42, "job_id": 2029}]}'
Returns
{
"enabled": [
{
"id": "1",
"ad_server_reference": 42,
"job_id": 2029,
"status": "enabled",
"description": "Description for campaign 11"
}
],
"deleted": [],
"disabled": [],
"discrepencies": [
{
"id": "2",
"ad_server_reference": 44,
"job_id": 2030,
"status": "disabled",
"description": "Description for campaign 12"
}
]
}
- Install ruby 2.4.2. For instance, using rvm:
rvm install 2.4.2
- Install gem bundler:
gem install bundler --no-ri --no-rdoc
- Install dependencies:
bundle install
- Start the webserver:
bin/rails s
On top of each commit, all tests must pass:
bundle exec rake
On top of each commit, no offenses must be detected
bundle exec rubocop -- .