From d6365ac51aaa3b52b71daaa8b9bc77d21dc92ef5 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 5 Sep 2019 10:02:44 -0300 Subject: [PATCH 01/50] Outcon bid adapter. --- modules/outconAdapter.md | 21 +++++++ modules/outconBidAdapter.js | 41 ++++++++++++++ test/spec/outconSpec.js | 107 ++++++++++++++++++++++++++++++++++++ 3 files changed, 169 insertions(+) create mode 100644 modules/outconAdapter.md create mode 100644 modules/outconBidAdapter.js create mode 100644 test/spec/outconSpec.js diff --git a/modules/outconAdapter.md b/modules/outconAdapter.md new file mode 100644 index 00000000000..f3cbd48ce1e --- /dev/null +++ b/modules/outconAdapter.md @@ -0,0 +1,21 @@ +# Overview + +``` +Module Name: outconAdapter +Module Type: Bidder Adapter +Maintainer: mfolmer@dokkogroup.com.ar +``` + +# Description + +Module that connects to Outcon demand sources + +# Test Parameters +``` + var adUnits = [ + { + pod: "5beeb24a306ea47660632043", + internalId: "12345678", + publisher: "5beeb1fd306ea4779e464532" + ]; +``` \ No newline at end of file diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js new file mode 100644 index 00000000000..ab50403cda7 --- /dev/null +++ b/modules/outconBidAdapter.js @@ -0,0 +1,41 @@ +import * as utils from '../src/utils'; +import {config} from '../src/config'; +import {registerBidder} from 'src/adapters/bidderFactory'; +const BIDDER_CODE = 'outcom'; +export const spec = { + code: BIDDER_CODE, + aliases: ['outcom'], + isBidRequestValid: function(bid) { + return !!(bid.params.pod || (bid.params.internalId && bid.params.publisher)); + }, + + buildRequests: function(validBidRequests) { + let par ={}; + if (validBidRequests.params.pod != undefined) par = {pod: validBidRequests.params.pod}; + else par = {internalId: validBidRequests.params.internalId, publisher: validBidRequests.params.publisher} + return { + method: 'GET', + url: "http://outcon.dokkogroup.com.ar:8048/ad/", + data: par + }; + }, + + interpretResponse: function(serverResponse, bidRequest) { + const bidResponses = []; + const bidResponse = { + requestId: serverResponse.body.id, + cpm: serverResponse.body.cpm, + width: serverResponse.body.creatives[0].width, + height: serverResponse.body.creatives[0].height, + creativeId: serverResponse.body.id, + currency: serverResponse.body.cur, + netRevenue: true, + ttl: serverResponse.body.exp, + ad: serverResponse.body.creatives[0].url, + vastImpUrl: serverResponse.body.trackingURL + }; + bidResponses.push(bidResponse); + return bidResponses; + }, +} +registerBidder(spec); \ No newline at end of file diff --git a/test/spec/outconSpec.js b/test/spec/outconSpec.js new file mode 100644 index 00000000000..804ae5d5dc0 --- /dev/null +++ b/test/spec/outconSpec.js @@ -0,0 +1,107 @@ +import { expect } from 'chai'; +import { spec } from '../modules/outconBidAdapter'; + +describe('outconBidAdapter', function () { + ////////////////////////////////////////////////// + describe('bidRequestValidity', function () { + it('Check the bidRequest with pod param', function () { + expect(spec.isBidRequestValid({ + bidder: 'outcom', + params: { + pod: "5d6e6abc22063e392bf7f563", + } + })).to.equal(true); + }); + it('Check the bidRequest with internalID and publisherID params', function () { + expect(spec.isBidRequestValid({ + bidder: 'outcom', + params: { + internalId: "12345", + publisher: "5beeb1fd306ea4779e464532", + } + })).to.equal(true); + }); + }); + ///////////////////////////////////////////////// + describe('buildRequests', function () { + it('Build requests with pod param', function () { + expect(spec.buildRequests({ + bidder: 'outcom', + params: { + pod: "5d6e6abc22063e392bf7f563", + } + })).to.eql({ + method: 'GET', + url: 'http://outcon.dokkogroup.com.ar:8048/ad/', + data: {pod: '5d6e6abc22063e392bf7f563'} + }); + }); + it('Build requests with internalID and publisherID params', function () { + expect(spec.buildRequests({ + bidder: 'outcom', + params: { + internalId: "12345678", + publisher: "5beeb1fd306ea4779e464532", + } + })).to.eql({ + method: 'GET', + url: 'http://outcon.dokkogroup.com.ar:8048/ad/', + data: { + internalId: '12345678', + publisher: '5beeb1fd306ea4779e464532' + } + }); + }); + }); + ///////////////////////////////////////////////// + //('cpm', 'creatives', 'width', 'height', 'id', 'cur', 'exp', 'url', 'trackingURL') + describe('interpretResponse', function () { + const bidRequest = { + method: 'GET', + url: 'http://outcon.dokkogroup.com.ar:8048/ad/', + data: {pod: '5d6e6abc22063e392bf7f563'} + }; + + const bidResponse = { + body: { + cpm: 0.10, + cur: 'USD', + exp: 10, + creatives:[ + { + url: "http://outcon.dokkogroup.com.ar/uploads/5d42e7a7306ea4689b67c122/frutas.mp4", + size: 3, + width: 1920, + height: 1080, + codec: "video/mp4" + } + ], + id: '5d6e6aef22063e392bf7f564', + type: 'video', + campaign: '5d42e44b306ea469593c76a2', + trackingURL: 'http://outcon.dokkogroup.com.ar:8048/ad/track?track=5d6e6aef22063e392bf7f564' + }, + }; + + it('check all the keys that are needed to interpret the response', function () { + const result = spec.interpretResponse(bidResponse, bidRequest); + + let requiredKeys = [ + 'requestId', + 'cpm', + 'width', + 'height', + 'creativeId', + 'currency', + 'netRevenue', + 'ttl', + 'ad', + 'vastImpUrl' + ]; + let resultKeys = Object.keys(result[0]); + resultKeys.forEach(function(key) { + expect(requiredKeys.indexOf(key) !== -1).to.equal(true); + }); + }) + }); +}); \ No newline at end of file From 61ad7d08a57de94d37be02a5c3c1c82727dce55a Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 5 Sep 2019 10:14:24 -0300 Subject: [PATCH 02/50] Fix identation --- modules/outconBidAdapter.js | 66 ++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index ab50403cda7..f3b0a6a1543 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -1,41 +1,39 @@ -import * as utils from '../src/utils'; -import {config} from '../src/config'; import {registerBidder} from 'src/adapters/bidderFactory'; const BIDDER_CODE = 'outcom'; export const spec = { - code: BIDDER_CODE, - aliases: ['outcom'], - isBidRequestValid: function(bid) { - return !!(bid.params.pod || (bid.params.internalId && bid.params.publisher)); - }, + code: BIDDER_CODE, + aliases: ['outcom'], + isBidRequestValid: function(bid) { + return !!(bid.params.pod || (bid.params.internalId && bid.params.publisher)); + }, - buildRequests: function(validBidRequests) { - let par ={}; - if (validBidRequests.params.pod != undefined) par = {pod: validBidRequests.params.pod}; - else par = {internalId: validBidRequests.params.internalId, publisher: validBidRequests.params.publisher} - return { - method: 'GET', - url: "http://outcon.dokkogroup.com.ar:8048/ad/", - data: par - }; - }, + buildRequests: function(validBidRequests) { + let par ={}; + if (validBidRequests.params.pod != undefined) par = {pod: validBidRequests.params.pod}; + else par = {internalId: validBidRequests.params.internalId, publisher: validBidRequests.params.publisher} + return { + method: 'GET', + url: "http://outcon.dokkogroup.com.ar:8048/ad/", + data: par + }; + }, - interpretResponse: function(serverResponse, bidRequest) { - const bidResponses = []; - const bidResponse = { - requestId: serverResponse.body.id, - cpm: serverResponse.body.cpm, - width: serverResponse.body.creatives[0].width, - height: serverResponse.body.creatives[0].height, - creativeId: serverResponse.body.id, - currency: serverResponse.body.cur, - netRevenue: true, - ttl: serverResponse.body.exp, - ad: serverResponse.body.creatives[0].url, - vastImpUrl: serverResponse.body.trackingURL - }; - bidResponses.push(bidResponse); - return bidResponses; - }, + interpretResponse: function(serverResponse, bidRequest) { + const bidResponses = []; + const bidResponse = { + requestId: serverResponse.body.id, + cpm: serverResponse.body.cpm, + width: serverResponse.body.creatives[0].width, + height: serverResponse.body.creatives[0].height, + creativeId: serverResponse.body.id, + currency: serverResponse.body.cur, + netRevenue: true, + ttl: serverResponse.body.exp, + ad: serverResponse.body.creatives[0].url, + vastImpUrl: serverResponse.body.trackingURL + }; + bidResponses.push(bidResponse); + return bidResponses; + }, } registerBidder(spec); \ No newline at end of file From fce10aca791de9628ecbe2a1e5b3c9dc85eceace Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 5 Sep 2019 10:23:47 -0300 Subject: [PATCH 03/50] Fixes --- modules/outconBidAdapter.js | 68 ++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index f3b0a6a1543..aef9bb369f1 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -1,39 +1,39 @@ -import {registerBidder} from 'src/adapters/bidderFactory'; +import {registerBidder} from 'src/adapters/bidfactory'; const BIDDER_CODE = 'outcom'; export const spec = { - code: BIDDER_CODE, - aliases: ['outcom'], - isBidRequestValid: function(bid) { - return !!(bid.params.pod || (bid.params.internalId && bid.params.publisher)); - }, + code: BIDDER_CODE, + aliases: ['outcom'], + isBidRequestValid: function(bid) { + return !!(bid.params.pod || (bid.params.internalId && bid.params.publisher)); + }, - buildRequests: function(validBidRequests) { - let par ={}; - if (validBidRequests.params.pod != undefined) par = {pod: validBidRequests.params.pod}; - else par = {internalId: validBidRequests.params.internalId, publisher: validBidRequests.params.publisher} - return { - method: 'GET', - url: "http://outcon.dokkogroup.com.ar:8048/ad/", - data: par - }; - }, + buildRequests: function(validBidRequests) { + let par = {}; + if (validBidRequests.params.pod != undefined) par = {pod: validBidRequests.params.pod}; + else par = {internalId: validBidRequests.params.internalId, publisher: validBidRequests.params.publisher} + return { + method: 'GET', + url: 'http://outcon.dokkogroup.com.ar:8048/ad/', + data: par + }; + }, - interpretResponse: function(serverResponse, bidRequest) { - const bidResponses = []; - const bidResponse = { - requestId: serverResponse.body.id, - cpm: serverResponse.body.cpm, - width: serverResponse.body.creatives[0].width, - height: serverResponse.body.creatives[0].height, - creativeId: serverResponse.body.id, - currency: serverResponse.body.cur, - netRevenue: true, - ttl: serverResponse.body.exp, - ad: serverResponse.body.creatives[0].url, - vastImpUrl: serverResponse.body.trackingURL - }; - bidResponses.push(bidResponse); - return bidResponses; - }, + interpretResponse: function(serverResponse, bidRequest) { + const bidResponses = []; + const bidResponse = { + requestId: serverResponse.body.id, + cpm: serverResponse.body.cpm, + width: serverResponse.body.creatives[0].width, + height: serverResponse.body.creatives[0].height, + creativeId: serverResponse.body.id, + currency: serverResponse.body.cur, + netRevenue: true, + ttl: serverResponse.body.exp, + ad: serverResponse.body.creatives[0].url, + vastImpUrl: serverResponse.body.trackingURL + }; + bidResponses.push(bidResponse); + return bidResponses; + }, } -registerBidder(spec); \ No newline at end of file +registerBidder(spec); From ea3c8193028639c2b828dd975e36ca0706148788 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 5 Sep 2019 11:23:11 -0300 Subject: [PATCH 04/50] Fixes --- modules/outconBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index aef9bb369f1..d132f50b289 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -1,4 +1,4 @@ -import {registerBidder} from 'src/adapters/bidfactory'; +import {registerBidder} from '../src/adapters/bidfactory'; const BIDDER_CODE = 'outcom'; export const spec = { code: BIDDER_CODE, From a14793714d0285330b7f53dc067522a5b149a2ca Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 5 Sep 2019 11:30:03 -0300 Subject: [PATCH 05/50] Fixes --- modules/outconBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index d132f50b289..b0a66f14cf3 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -1,4 +1,4 @@ -import {registerBidder} from '../src/adapters/bidfactory'; +import {registerBidder} from '../src/adapters/bidderFactory'; const BIDDER_CODE = 'outcom'; export const spec = { code: BIDDER_CODE, From b67849be63eca0752fbc9e19f344e379d82e8253 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 5 Sep 2019 11:41:04 -0300 Subject: [PATCH 06/50] Spec fixes --- test/spec/outconSpec.js | 196 ++++++++++++++++++++-------------------- 1 file changed, 96 insertions(+), 100 deletions(-) diff --git a/test/spec/outconSpec.js b/test/spec/outconSpec.js index 804ae5d5dc0..2c9949c1293 100644 --- a/test/spec/outconSpec.js +++ b/test/spec/outconSpec.js @@ -2,106 +2,102 @@ import { expect } from 'chai'; import { spec } from '../modules/outconBidAdapter'; describe('outconBidAdapter', function () { - ////////////////////////////////////////////////// - describe('bidRequestValidity', function () { - it('Check the bidRequest with pod param', function () { - expect(spec.isBidRequestValid({ - bidder: 'outcom', - params: { - pod: "5d6e6abc22063e392bf7f563", - } - })).to.equal(true); - }); - it('Check the bidRequest with internalID and publisherID params', function () { - expect(spec.isBidRequestValid({ - bidder: 'outcom', - params: { - internalId: "12345", - publisher: "5beeb1fd306ea4779e464532", - } - })).to.equal(true); - }); - }); - ///////////////////////////////////////////////// - describe('buildRequests', function () { - it('Build requests with pod param', function () { - expect(spec.buildRequests({ - bidder: 'outcom', - params: { - pod: "5d6e6abc22063e392bf7f563", - } - })).to.eql({ - method: 'GET', - url: 'http://outcon.dokkogroup.com.ar:8048/ad/', - data: {pod: '5d6e6abc22063e392bf7f563'} - }); - }); - it('Build requests with internalID and publisherID params', function () { - expect(spec.buildRequests({ - bidder: 'outcom', - params: { - internalId: "12345678", - publisher: "5beeb1fd306ea4779e464532", - } - })).to.eql({ - method: 'GET', - url: 'http://outcon.dokkogroup.com.ar:8048/ad/', - data: { - internalId: '12345678', - publisher: '5beeb1fd306ea4779e464532' - } - }); - }); - }); - ///////////////////////////////////////////////// - //('cpm', 'creatives', 'width', 'height', 'id', 'cur', 'exp', 'url', 'trackingURL') - describe('interpretResponse', function () { - const bidRequest = { - method: 'GET', - url: 'http://outcon.dokkogroup.com.ar:8048/ad/', - data: {pod: '5d6e6abc22063e392bf7f563'} - }; + describe('bidRequestValidity', function () { + it('Check the bidRequest with pod param', function () { + expect(spec.isBidRequestValid({ + bidder: 'outcom', + params: { + pod: '5d6e6abc22063e392bf7f563', + } + })).to.equal(true); + }); + it('Check the bidRequest with internalID and publisherID params', function () { + expect(spec.isBidRequestValid({ + bidder: 'outcom', + params: { + internalId: "12345", + publisher: "5beeb1fd306ea4779e464532", + } + })).to.equal(true); + }); + }); + describe('buildRequests', function () { + it('Build requests with pod param', function () { + expect(spec.buildRequests({ + bidder: 'outcom', + params: { + pod: '5d6e6abc22063e392bf7f563', + } + })).to.eql({ + method: 'GET', + url: 'http://outcon.dokkogroup.com.ar:8048/ad/', + data: {pod: '5d6e6abc22063e392bf7f563'} + }); + }); + it('Build requests with internalID and publisherID params', function () { + expect(spec.buildRequests({ + bidder: 'outcom', + params: { + internalId: "12345678", + publisher: "5beeb1fd306ea4779e464532", + } + })).to.eql({ + method: 'GET', + url: 'http://outcon.dokkogroup.com.ar:8048/ad/', + data: { + internalId: '12345678', + publisher: '5beeb1fd306ea4779e464532' + } + }); + }); + }); + describe('interpretResponse', function () { + const bidRequest = { + method: 'GET', + url: 'http://outcon.dokkogroup.com.ar:8048/ad/', + data: {pod: '5d6e6abc22063e392bf7f563'} + }; - const bidResponse = { - body: { - cpm: 0.10, - cur: 'USD', - exp: 10, - creatives:[ - { - url: "http://outcon.dokkogroup.com.ar/uploads/5d42e7a7306ea4689b67c122/frutas.mp4", - size: 3, - width: 1920, - height: 1080, - codec: "video/mp4" - } - ], - id: '5d6e6aef22063e392bf7f564', - type: 'video', - campaign: '5d42e44b306ea469593c76a2', - trackingURL: 'http://outcon.dokkogroup.com.ar:8048/ad/track?track=5d6e6aef22063e392bf7f564' - }, - }; + const bidResponse = { + body: { + cpm: 0.10, + cur: 'USD', + exp: 10, + creatives: [ + { + url: 'http://outcon.dokkogroup.com.ar/uploads/5d42e7a7306ea4689b67c122/frutas.mp4', + size: 3, + width: 1920, + height: 1080, + codec: "video/mp4" + } + ], + id: '5d6e6aef22063e392bf7f564', + type: 'video', + campaign: '5d42e44b306ea469593c76a2', + trackingURL: 'http://outcon.dokkogroup.com.ar:8048/ad/track?track=5d6e6aef22063e392bf7f564' + }, + }; - it('check all the keys that are needed to interpret the response', function () { - const result = spec.interpretResponse(bidResponse, bidRequest); + it('check all the keys that are needed to interpret the response', function () { + const result = spec.interpretResponse(bidResponse, bidRequest); - let requiredKeys = [ - 'requestId', - 'cpm', - 'width', - 'height', - 'creativeId', - 'currency', - 'netRevenue', - 'ttl', - 'ad', - 'vastImpUrl' - ]; - let resultKeys = Object.keys(result[0]); - resultKeys.forEach(function(key) { - expect(requiredKeys.indexOf(key) !== -1).to.equal(true); - }); - }) - }); -}); \ No newline at end of file + let requiredKeys = [ + 'requestId', + 'cpm', + 'width', + 'height', + 'creativeId', + 'currency', + 'netRevenue', + 'ttl', + 'ad', + 'vastImpUrl' + ]; + let resultKeys = Object.keys(result[0]); + resultKeys.forEach(function(key) { + expect(requiredKeys.indexOf(key) !== -1).to.equal(true); + }); + }) + }); +}); From b3d73a4da9d365a6d9a03ba5975c7292a2680f8e Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 5 Sep 2019 11:45:10 -0300 Subject: [PATCH 07/50] Fixes --- test/spec/outconSpec.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/test/spec/outconSpec.js b/test/spec/outconSpec.js index 2c9949c1293..d4efed0913e 100644 --- a/test/spec/outconSpec.js +++ b/test/spec/outconSpec.js @@ -15,8 +15,8 @@ describe('outconBidAdapter', function () { expect(spec.isBidRequestValid({ bidder: 'outcom', params: { - internalId: "12345", - publisher: "5beeb1fd306ea4779e464532", + internalId: '12345', + publisher: '5beeb1fd306ea4779e464532', } })).to.equal(true); }); @@ -38,8 +38,8 @@ describe('outconBidAdapter', function () { expect(spec.buildRequests({ bidder: 'outcom', params: { - internalId: "12345678", - publisher: "5beeb1fd306ea4779e464532", + internalId: '12345678', + publisher: '5beeb1fd306ea4779e464532', } })).to.eql({ method: 'GET', @@ -69,7 +69,7 @@ describe('outconBidAdapter', function () { size: 3, width: 1920, height: 1080, - codec: "video/mp4" + codec: 'video/mp4' } ], id: '5d6e6aef22063e392bf7f564', @@ -82,18 +82,18 @@ describe('outconBidAdapter', function () { it('check all the keys that are needed to interpret the response', function () { const result = spec.interpretResponse(bidResponse, bidRequest); - let requiredKeys = [ - 'requestId', - 'cpm', - 'width', - 'height', - 'creativeId', - 'currency', - 'netRevenue', - 'ttl', - 'ad', - 'vastImpUrl' - ]; + let requiredKeys = [ + 'requestId', + 'cpm', + 'width', + 'height', + 'creativeId', + 'currency', + 'netRevenue', + 'ttl', + 'ad', + 'vastImpUrl' + ]; let resultKeys = Object.keys(result[0]); resultKeys.forEach(function(key) { expect(requiredKeys.indexOf(key) !== -1).to.equal(true); From 70358d6bf9dd0ad38395dd0ff9fb51cb0e424bbc Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 5 Sep 2019 14:44:57 -0300 Subject: [PATCH 08/50] Fix urls --- modules/outconBidAdapter.js | 6 +++--- test/spec/outconSpec.js | 25 ++++++++++++++++++------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index b0a66f14cf3..dad64d43cc7 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -9,11 +9,11 @@ export const spec = { buildRequests: function(validBidRequests) { let par = {}; - if (validBidRequests.params.pod != undefined) par = {pod: validBidRequests.params.pod}; - else par = {internalId: validBidRequests.params.internalId, publisher: validBidRequests.params.publisher} + if (validBidRequests.params.pod != undefined) par = {pod: validBidRequests.params.pod, demo: true}; + else par = {internalId: validBidRequests.params.internalId, publisher: validBidRequests.params.publisher, demo: true} return { method: 'GET', - url: 'http://outcon.dokkogroup.com.ar:8048/ad/', + url: 'http://test.outcondigital.com:8048/ad/', data: par }; }, diff --git a/test/spec/outconSpec.js b/test/spec/outconSpec.js index d4efed0913e..d9060698a5a 100644 --- a/test/spec/outconSpec.js +++ b/test/spec/outconSpec.js @@ -8,6 +8,7 @@ describe('outconBidAdapter', function () { bidder: 'outcom', params: { pod: '5d6e6abc22063e392bf7f563', + demo: true } })).to.equal(true); }); @@ -17,6 +18,7 @@ describe('outconBidAdapter', function () { params: { internalId: '12345', publisher: '5beeb1fd306ea4779e464532', + demo: true } })).to.equal(true); }); @@ -27,11 +29,15 @@ describe('outconBidAdapter', function () { bidder: 'outcom', params: { pod: '5d6e6abc22063e392bf7f563', + demo: true } })).to.eql({ method: 'GET', - url: 'http://outcon.dokkogroup.com.ar:8048/ad/', - data: {pod: '5d6e6abc22063e392bf7f563'} + url: 'http://test.outcondigital.com:8048/ad/', + data: { + pod: '5d6e6abc22063e392bf7f563', + demo: true + } }); }); it('Build requests with internalID and publisherID params', function () { @@ -40,13 +46,15 @@ describe('outconBidAdapter', function () { params: { internalId: '12345678', publisher: '5beeb1fd306ea4779e464532', + demo: true } })).to.eql({ method: 'GET', - url: 'http://outcon.dokkogroup.com.ar:8048/ad/', + url: 'http://test.outcondigital.com:8048/ad/', data: { internalId: '12345678', publisher: '5beeb1fd306ea4779e464532' + demo: true } }); }); @@ -54,8 +62,11 @@ describe('outconBidAdapter', function () { describe('interpretResponse', function () { const bidRequest = { method: 'GET', - url: 'http://outcon.dokkogroup.com.ar:8048/ad/', - data: {pod: '5d6e6abc22063e392bf7f563'} + url: 'http://test.outcondigital.com:8048/ad/', + data: { + pod: '5d6e6abc22063e392bf7f563', + demo: true + } }; const bidResponse = { @@ -65,7 +76,7 @@ describe('outconBidAdapter', function () { exp: 10, creatives: [ { - url: 'http://outcon.dokkogroup.com.ar/uploads/5d42e7a7306ea4689b67c122/frutas.mp4', + url: 'http://test.outcondigital.com/uploads/5d42e7a7306ea4689b67c122/frutas.mp4', size: 3, width: 1920, height: 1080, @@ -75,7 +86,7 @@ describe('outconBidAdapter', function () { id: '5d6e6aef22063e392bf7f564', type: 'video', campaign: '5d42e44b306ea469593c76a2', - trackingURL: 'http://outcon.dokkogroup.com.ar:8048/ad/track?track=5d6e6aef22063e392bf7f564' + trackingURL: 'http://test.outcondigital.com:8048/ad/track?track=5d6e6aef22063e392bf7f564' }, }; From 46b3f8871ba400cb97dd6f5725f2fc0b2b9a1168 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 5 Sep 2019 15:01:28 -0300 Subject: [PATCH 09/50] Fix --- test/spec/outconSpec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/outconSpec.js b/test/spec/outconSpec.js index d9060698a5a..9d0d89ed08f 100644 --- a/test/spec/outconSpec.js +++ b/test/spec/outconSpec.js @@ -53,7 +53,7 @@ describe('outconBidAdapter', function () { url: 'http://test.outcondigital.com:8048/ad/', data: { internalId: '12345678', - publisher: '5beeb1fd306ea4779e464532' + publisher: '5beeb1fd306ea4779e464532', demo: true } }); From 45b38904e8f377124d3aa212f4c2a6682293a38e Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 5 Sep 2019 15:25:29 -0300 Subject: [PATCH 10/50] Fix parameters --- modules/outconBidAdapter.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index dad64d43cc7..9d5397b716d 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -8,13 +8,13 @@ export const spec = { }, buildRequests: function(validBidRequests) { - let par = {}; - if (validBidRequests.params.pod != undefined) par = {pod: validBidRequests.params.pod, demo: true}; - else par = {internalId: validBidRequests.params.internalId, publisher: validBidRequests.params.publisher, demo: true} + let par = ''; + if (validBidRequests.params.pod != undefined) par = 'get?pod='+validBidRequests.params.pod+'&demo=true'; + else par = 'get?demo=true'+'&internalId='+validBidRequests.params.internalId+'&publisher='+validBidRequests.params.publisher; return { method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: par + url: 'http://test.outcondigital.com:8048/ad/'+par, + data: {} }; }, From a78be96e90ad8340a1286fbf598611e57bc0aad0 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 5 Sep 2019 15:29:27 -0300 Subject: [PATCH 11/50] Fix space operators --- modules/outconBidAdapter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 9d5397b716d..ec0cc0ef70a 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -9,11 +9,11 @@ export const spec = { buildRequests: function(validBidRequests) { let par = ''; - if (validBidRequests.params.pod != undefined) par = 'get?pod='+validBidRequests.params.pod+'&demo=true'; - else par = 'get?demo=true'+'&internalId='+validBidRequests.params.internalId+'&publisher='+validBidRequests.params.publisher; + if (validBidRequests.params.pod != undefined) par = 'get?pod=' + validBidRequests.params.pod + '&demo=true'; + else par = 'get?demo=true' + '&internalId=' + validBidRequests.params.internalId + '&publisher=' + validBidRequests.params.publisher; return { method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/'+par, + url: 'http://test.outcondigital.com:8048/ad/' + par, data: {} }; }, From 1ecdbc5bf4d3d3aceb825fd4a5407151348dcfbe Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Fri, 6 Sep 2019 16:22:05 -0300 Subject: [PATCH 12/50] Fix bidder timeout --- modules/outconBidAdapter.js | 3 +- test/spec/outconSpec.js | 114 ------------------------------------ 2 files changed, 2 insertions(+), 115 deletions(-) delete mode 100644 test/spec/outconSpec.js diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index ec0cc0ef70a..0c10132f3fe 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -1,4 +1,5 @@ import {registerBidder} from '../src/adapters/bidderFactory'; +import {config} from '../src/config'; const BIDDER_CODE = 'outcom'; export const spec = { code: BIDDER_CODE, @@ -28,7 +29,7 @@ export const spec = { creativeId: serverResponse.body.id, currency: serverResponse.body.cur, netRevenue: true, - ttl: serverResponse.body.exp, + ttl: config.getConfig('_bidderTimeout'), ad: serverResponse.body.creatives[0].url, vastImpUrl: serverResponse.body.trackingURL }; diff --git a/test/spec/outconSpec.js b/test/spec/outconSpec.js deleted file mode 100644 index 9d0d89ed08f..00000000000 --- a/test/spec/outconSpec.js +++ /dev/null @@ -1,114 +0,0 @@ -import { expect } from 'chai'; -import { spec } from '../modules/outconBidAdapter'; - -describe('outconBidAdapter', function () { - describe('bidRequestValidity', function () { - it('Check the bidRequest with pod param', function () { - expect(spec.isBidRequestValid({ - bidder: 'outcom', - params: { - pod: '5d6e6abc22063e392bf7f563', - demo: true - } - })).to.equal(true); - }); - it('Check the bidRequest with internalID and publisherID params', function () { - expect(spec.isBidRequestValid({ - bidder: 'outcom', - params: { - internalId: '12345', - publisher: '5beeb1fd306ea4779e464532', - demo: true - } - })).to.equal(true); - }); - }); - describe('buildRequests', function () { - it('Build requests with pod param', function () { - expect(spec.buildRequests({ - bidder: 'outcom', - params: { - pod: '5d6e6abc22063e392bf7f563', - demo: true - } - })).to.eql({ - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: { - pod: '5d6e6abc22063e392bf7f563', - demo: true - } - }); - }); - it('Build requests with internalID and publisherID params', function () { - expect(spec.buildRequests({ - bidder: 'outcom', - params: { - internalId: '12345678', - publisher: '5beeb1fd306ea4779e464532', - demo: true - } - })).to.eql({ - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: { - internalId: '12345678', - publisher: '5beeb1fd306ea4779e464532', - demo: true - } - }); - }); - }); - describe('interpretResponse', function () { - const bidRequest = { - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: { - pod: '5d6e6abc22063e392bf7f563', - demo: true - } - }; - - const bidResponse = { - body: { - cpm: 0.10, - cur: 'USD', - exp: 10, - creatives: [ - { - url: 'http://test.outcondigital.com/uploads/5d42e7a7306ea4689b67c122/frutas.mp4', - size: 3, - width: 1920, - height: 1080, - codec: 'video/mp4' - } - ], - id: '5d6e6aef22063e392bf7f564', - type: 'video', - campaign: '5d42e44b306ea469593c76a2', - trackingURL: 'http://test.outcondigital.com:8048/ad/track?track=5d6e6aef22063e392bf7f564' - }, - }; - - it('check all the keys that are needed to interpret the response', function () { - const result = spec.interpretResponse(bidResponse, bidRequest); - - let requiredKeys = [ - 'requestId', - 'cpm', - 'width', - 'height', - 'creativeId', - 'currency', - 'netRevenue', - 'ttl', - 'ad', - 'vastImpUrl' - ]; - let resultKeys = Object.keys(result[0]); - resultKeys.forEach(function(key) { - expect(requiredKeys.indexOf(key) !== -1).to.equal(true); - }); - }) - }); -}); From 7dde757f5940396de1a4fecf1d64dcbfe54f0225 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Fri, 6 Sep 2019 19:07:51 -0300 Subject: [PATCH 13/50] Update --- modules/outconBidAdapter.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 0c10132f3fe..e6d2b78b6b3 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -10,8 +10,9 @@ export const spec = { buildRequests: function(validBidRequests) { let par = ''; - if (validBidRequests.params.pod != undefined) par = 'get?pod=' + validBidRequests.params.pod + '&demo=true'; - else par = 'get?demo=true' + '&internalId=' + validBidRequests.params.internalId + '&publisher=' + validBidRequests.params.publisher; + if (validBidRequests.params.pod != undefined) par = 'get?pod=' + validBidRequests.params.pod ; + else par = 'get?internalId=' + validBidRequests.params.internalId + '&publisher=' + validBidRequests.params.publisher; + if (validBidRequests.params.demo == true) par += '&demo=true'; return { method: 'GET', url: 'http://test.outcondigital.com:8048/ad/' + par, From 631b9a9758e8f643dfaf57e3714fb7dedd6e7780 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Fri, 6 Sep 2019 19:10:12 -0300 Subject: [PATCH 14/50] Fix whitespace --- modules/outconBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index e6d2b78b6b3..731bf3e471e 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -10,7 +10,7 @@ export const spec = { buildRequests: function(validBidRequests) { let par = ''; - if (validBidRequests.params.pod != undefined) par = 'get?pod=' + validBidRequests.params.pod ; + if (validBidRequests.params.pod != undefined) par = 'get?pod=' + validBidRequests.params.pod; else par = 'get?internalId=' + validBidRequests.params.internalId + '&publisher=' + validBidRequests.params.publisher; if (validBidRequests.params.demo == true) par += '&demo=true'; return { From fc4415ddd72b9d6431ee51c6260e3fa1541191af Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Fri, 6 Sep 2019 19:18:42 -0300 Subject: [PATCH 15/50] no message --- modules/outconBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 731bf3e471e..d8959730494 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -12,7 +12,7 @@ export const spec = { let par = ''; if (validBidRequests.params.pod != undefined) par = 'get?pod=' + validBidRequests.params.pod; else par = 'get?internalId=' + validBidRequests.params.internalId + '&publisher=' + validBidRequests.params.publisher; - if (validBidRequests.params.demo == true) par += '&demo=true'; + if (validBidRequests.params.demo == true) par = par + '&demo=true'; return { method: 'GET', url: 'http://test.outcondigital.com:8048/ad/' + par, From 4f8bf32644027d3f3b8a2742f9d614a701a24123 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Wed, 11 Sep 2019 09:29:09 -0300 Subject: [PATCH 16/50] Outcon unit test --- test/spec/modules/outconBidAdapter_spec.js | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 test/spec/modules/outconBidAdapter_spec.js diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js new file mode 100644 index 00000000000..60f24583811 --- /dev/null +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -0,0 +1,113 @@ +import { expect } from 'chai'; +import { spec } from '../modules/outconBidAdapter'; + +describe('outconBidAdapter', function () { + describe('bidRequestValidity', function () { + it('Check the bidRequest with pod param', function () { + expect(spec.isBidRequestValid({ + bidder: 'outcom', + params: { + pod: '5d603538eba7192ae14e39a4', + demo: true + } + })).to.equal(true); + }); + it('Check the bidRequest with internalID and publisherID params', function () { + expect(spec.isBidRequestValid({ + bidder: 'outcom', + params: { + internalId: '12345678', + publisher: '5d5d66f2306ea4114a37c7c2', + demo: true + } + })).to.equal(true); + }); + }); + describe('buildRequests', function () { + it('Build requests with pod param', function () { + expect(spec.buildRequests({ + bidder: 'outcom', + params: { + pod: "5d603538eba7192ae14e39a4", + demo: true + } + })).to.eql({ + method: 'GET', + url: 'http://test.outcondigital.com:8048/ad/', + data: { + pod: '5d603538eba7192ae14e39a4', + demo: true + } + }); + }); + it('Build requests with internalID and publisherID params', function () { + expect(spec.buildRequests({ + bidder: 'outcom', + params: { + internalId: '12345678', + publisher: '5d5d66f2306ea4114a37c7c2', + } + })).to.eql({ + method: 'GET', + url: 'http://test.outcondigital.com:8048/ad/', + data: { + internalId: '12345678', + publisher: '5d5d66f2306ea4114a37c7c2', + demo: true + } + }); + }); + }); + describe('interpretResponse', function () { + const bidRequest = { + method: 'GET', + url: 'http://test.outcondigital.com:8048/ad/', + data: { + pod: '5d603538eba7192ae14e39a4', + demo: true + } + }; + + const bidResponse = { + body: { + cpm: 0.10, + cur: 'USD', + exp: 10, + creatives:[ + { + url: "http://test.outcondigital.com/uploads/5d42e7a7306ea4689b67c122/frutas.mp4", + size: 3, + width: 1920, + height: 1080, + codec: 'video/mp4' + } + ], + id: '5d6e6aef22063e392bf7f564', + type: 'video', + campaign: '5d42e44b306ea469593c76a2', + trackingURL: 'http://test.outcondigital.com:8048/ad/track?track=5d6e6aef22063e392bf7f564' + }, + }; + + it('check all the keys that are needed to interpret the response', function () { + const result = spec.interpretResponse(bidResponse, bidRequest); + + let requiredKeys = [ + 'requestId', + 'cpm', + 'width', + 'height', + 'creativeId', + 'currency', + 'netRevenue', + 'ttl', + 'ad', + 'vastImpUrl' + ]; + let resultKeys = Object.keys(result[0]); + resultKeys.forEach(function(key) { + expect(requiredKeys.indexOf(key) !== -1).to.equal(true); + }); + }) + }); +}); From b3eb6ba81a3ed50ccb18374ad0ee857995108e75 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 12 Sep 2019 13:45:44 -0300 Subject: [PATCH 17/50] no message --- test/spec/modules/outconBidAdapter_spec.js | 210 ++++++++++----------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index 60f24583811..2549165ddaf 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -2,112 +2,112 @@ import { expect } from 'chai'; import { spec } from '../modules/outconBidAdapter'; describe('outconBidAdapter', function () { - describe('bidRequestValidity', function () { - it('Check the bidRequest with pod param', function () { - expect(spec.isBidRequestValid({ - bidder: 'outcom', - params: { - pod: '5d603538eba7192ae14e39a4', - demo: true - } - })).to.equal(true); - }); - it('Check the bidRequest with internalID and publisherID params', function () { - expect(spec.isBidRequestValid({ - bidder: 'outcom', - params: { - internalId: '12345678', - publisher: '5d5d66f2306ea4114a37c7c2', - demo: true - } - })).to.equal(true); - }); - }); - describe('buildRequests', function () { - it('Build requests with pod param', function () { - expect(spec.buildRequests({ - bidder: 'outcom', - params: { - pod: "5d603538eba7192ae14e39a4", - demo: true - } - })).to.eql({ - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: { - pod: '5d603538eba7192ae14e39a4', - demo: true - } - }); - }); - it('Build requests with internalID and publisherID params', function () { - expect(spec.buildRequests({ - bidder: 'outcom', - params: { - internalId: '12345678', - publisher: '5d5d66f2306ea4114a37c7c2', - } - })).to.eql({ - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: { - internalId: '12345678', - publisher: '5d5d66f2306ea4114a37c7c2', - demo: true - } - }); - }); - }); - describe('interpretResponse', function () { - const bidRequest = { - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: { - pod: '5d603538eba7192ae14e39a4', - demo: true - } - }; + describe('bidRequestValidity', function () { + it('Check the bidRequest with pod param', function () { + expect(spec.isBidRequestValid({ + bidder: 'outcom', + params: { + pod: '5d603538eba7192ae14e39a4', + demo: true + } + })).to.equal(true); + }); + it('Check the bidRequest with internalID and publisherID params', function () { + expect(spec.isBidRequestValid({ + bidder: 'outcom', + params: { + internalId: '12345678', + publisher: '5d5d66f2306ea4114a37c7c2', + demo: true + } + })).to.equal(true); + }); + }); + describe('buildRequests', function () { + it('Build requests with pod param', function () { + expect(spec.buildRequests({ + bidder: 'outcom', + params: { + pod: '5d603538eba7192ae14e39a4', + demo: true + } + })).to.eql({ + method: 'GET', + url: 'http://test.outcondigital.com:8048/ad/', + data: { + pod: '5d603538eba7192ae14e39a4', + demo: true + } + }); + }); + it('Build requests with internalID and publisherID params', function () { + expect(spec.buildRequests({ + bidder: 'outcom', + params: { + internalId: '12345678', + publisher: '5d5d66f2306ea4114a37c7c2', + } + })).to.eql({ + method: 'GET', + url: 'http://test.outcondigital.com:8048/ad/', + data: { + internalId: '12345678', + publisher: '5d5d66f2306ea4114a37c7c2', + demo: true + } + }); + }); + }); + describe('interpretResponse', function () { + const bidRequest = { + method: 'GET', + url: 'http://test.outcondigital.com:8048/ad/', + data: { + pod: '5d603538eba7192ae14e39a4', + demo: true + } + }; - const bidResponse = { - body: { - cpm: 0.10, - cur: 'USD', - exp: 10, - creatives:[ - { - url: "http://test.outcondigital.com/uploads/5d42e7a7306ea4689b67c122/frutas.mp4", - size: 3, - width: 1920, - height: 1080, - codec: 'video/mp4' - } - ], - id: '5d6e6aef22063e392bf7f564', - type: 'video', - campaign: '5d42e44b306ea469593c76a2', - trackingURL: 'http://test.outcondigital.com:8048/ad/track?track=5d6e6aef22063e392bf7f564' - }, - }; + const bidResponse = { + body: { + cpm: 0.10, + cur: 'USD', + exp: 10, + creatives: [ + { + url: 'http://test.outcondigital.com/uploads/5d42e7a7306ea4689b67c122/frutas.mp4', + size: 3, + width: 1920, + height: 1080, + codec: 'video/mp4' + } + ], + id: '5d6e6aef22063e392bf7f564', + type: 'video', + campaign: '5d42e44b306ea469593c76a2', + trackingURL: 'http://test.outcondigital.com:8048/ad/track?track=5d6e6aef22063e392bf7f564' + }, + }; - it('check all the keys that are needed to interpret the response', function () { - const result = spec.interpretResponse(bidResponse, bidRequest); + it('check all the keys that are needed to interpret the response', function () { + const result = spec.interpretResponse(bidResponse, bidRequest); - let requiredKeys = [ - 'requestId', - 'cpm', - 'width', - 'height', - 'creativeId', - 'currency', - 'netRevenue', - 'ttl', - 'ad', - 'vastImpUrl' - ]; - let resultKeys = Object.keys(result[0]); - resultKeys.forEach(function(key) { - expect(requiredKeys.indexOf(key) !== -1).to.equal(true); - }); - }) - }); + let requiredKeys = [ + 'requestId', + 'cpm', + 'width', + 'height', + 'creativeId', + 'currency', + 'netRevenue', + 'ttl', + 'ad', + 'vastImpUrl' + ]; + let resultKeys = Object.keys(result[0]); + resultKeys.forEach(function(key) { + expect(requiredKeys.indexOf(key) !== -1).to.equal(true); + }); + }) + }); }); From b80296f7fa399b938d41603015659032aee61430 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 12 Sep 2019 14:10:03 -0300 Subject: [PATCH 18/50] no message --- test/spec/modules/outconBidAdapter_spec.js | 207 ++++++++++----------- 1 file changed, 102 insertions(+), 105 deletions(-) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index 2549165ddaf..0b0c58f954c 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -2,112 +2,109 @@ import { expect } from 'chai'; import { spec } from '../modules/outconBidAdapter'; describe('outconBidAdapter', function () { - describe('bidRequestValidity', function () { - it('Check the bidRequest with pod param', function () { - expect(spec.isBidRequestValid({ - bidder: 'outcom', - params: { - pod: '5d603538eba7192ae14e39a4', - demo: true - } - })).to.equal(true); - }); - it('Check the bidRequest with internalID and publisherID params', function () { - expect(spec.isBidRequestValid({ - bidder: 'outcom', - params: { - internalId: '12345678', - publisher: '5d5d66f2306ea4114a37c7c2', - demo: true - } - })).to.equal(true); - }); + describe('bidRequestValidity', function () { + it('Check the bidRequest with pod param', function () { + expect(spec.isBidRequestValid({ + bidder: 'outcom', + params: { + pod: '5d603538eba7192ae14e39a4', + demo: true + } + })).to.equal(true); }); - describe('buildRequests', function () { - it('Build requests with pod param', function () { - expect(spec.buildRequests({ - bidder: 'outcom', - params: { - pod: '5d603538eba7192ae14e39a4', - demo: true - } - })).to.eql({ - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: { - pod: '5d603538eba7192ae14e39a4', - demo: true - } - }); - }); - it('Build requests with internalID and publisherID params', function () { - expect(spec.buildRequests({ - bidder: 'outcom', - params: { - internalId: '12345678', - publisher: '5d5d66f2306ea4114a37c7c2', - } - })).to.eql({ - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: { - internalId: '12345678', - publisher: '5d5d66f2306ea4114a37c7c2', - demo: true - } - }); - }); + it('Check the bidRequest with internalID and publisherID params', function () { + expect(spec.isBidRequestValid({ + bidder: 'outcom', + params: { + internalId: '12345678', + publisher: '5d5d66f2306ea4114a37c7c2', + demo: true + } + })).to.equal(true); }); - describe('interpretResponse', function () { - const bidRequest = { - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: { - pod: '5d603538eba7192ae14e39a4', - demo: true - } - }; - - const bidResponse = { - body: { - cpm: 0.10, - cur: 'USD', - exp: 10, - creatives: [ - { - url: 'http://test.outcondigital.com/uploads/5d42e7a7306ea4689b67c122/frutas.mp4', - size: 3, - width: 1920, - height: 1080, - codec: 'video/mp4' - } - ], - id: '5d6e6aef22063e392bf7f564', - type: 'video', - campaign: '5d42e44b306ea469593c76a2', - trackingURL: 'http://test.outcondigital.com:8048/ad/track?track=5d6e6aef22063e392bf7f564' - }, - }; - - it('check all the keys that are needed to interpret the response', function () { - const result = spec.interpretResponse(bidResponse, bidRequest); - - let requiredKeys = [ - 'requestId', - 'cpm', - 'width', - 'height', - 'creativeId', - 'currency', - 'netRevenue', - 'ttl', - 'ad', - 'vastImpUrl' - ]; - let resultKeys = Object.keys(result[0]); - resultKeys.forEach(function(key) { - expect(requiredKeys.indexOf(key) !== -1).to.equal(true); - }); - }) + }); + describe('buildRequests', function () { + it('Build requests with pod param', function () { + expect(spec.buildRequests({ + bidder: 'outcom', + params: { + pod: '5d603538eba7192ae14e39a4', + demo: true + } + })).to.eql({ + method: 'GET', + url: 'http://test.outcondigital.com:8048/ad/', + data: { + pod: '5d603538eba7192ae14e39a4', + demo: true + } + }); + }); + it('Build requests with internalID and publisherID params', function () { + expect(spec.buildRequests({ + bidder: 'outcom', + params: { + internalId: '12345678', + publisher: '5d5d66f2306ea4114a37c7c2', + } + })).to.eql({ + method: 'GET', + url: 'http://test.outcondigital.com:8048/ad/', + data: { + internalId: '12345678', + publisher: '5d5d66f2306ea4114a37c7c2', + demo: true + } + }); }); + }); + describe('interpretResponse', function () { + const bidRequest = { + method: 'GET', + url: 'http://test.outcondigital.com:8048/ad/', + data: { + pod: '5d603538eba7192ae14e39a4', + demo: true + } + }; + const bidResponse = { + body: { + cpm: 0.10, + cur: 'USD', + exp: 10, + creatives: [ + { + url: 'http://test.outcondigital.com/uploads/5d42e7a7306ea4689b67c122/frutas.mp4', + size: 3, + width: 1920, + height: 1080, + codec: 'video/mp4' + } + ], + id: '5d6e6aef22063e392bf7f564', + type: 'video', + campaign: '5d42e44b306ea469593c76a2', + trackingURL: 'http://test.outcondigital.com:8048/ad/track?track=5d6e6aef22063e392bf7f564' + }, + }; + it('check all the keys that are needed to interpret the response', function () { + const result = spec.interpretResponse(bidResponse, bidRequest); + let requiredKeys = [ + 'requestId', + 'cpm', + 'width', + 'height', + 'creativeId', + 'currency', + 'netRevenue', + 'ttl', + 'ad', + 'vastImpUrl' + ]; + let resultKeys = Object.keys(result[0]); + resultKeys.forEach(function(key) { + expect(requiredKeys.indexOf(key) !== -1).to.equal(true); + }); + }) + }); }); From bff07a02427f3535e4f383cb42a2c8a675ff4951 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 12 Sep 2019 16:29:59 -0300 Subject: [PATCH 19/50] no message --- test/spec/modules/outconBidAdapter_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index 0b0c58f954c..a7667ef6bd8 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { spec } from '../modules/outconBidAdapter'; +import { spec } from '../../../modules/outconBidAdapter'; describe('outconBidAdapter', function () { describe('bidRequestValidity', function () { From f6418d70c6047fb85514511520eb3251897041f9 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 12 Sep 2019 18:02:25 -0300 Subject: [PATCH 20/50] no message --- test/spec/modules/outconBidAdapter_spec.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index a7667ef6bd8..284fcb504e4 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -33,11 +33,8 @@ describe('outconBidAdapter', function () { } })).to.eql({ method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: { - pod: '5d603538eba7192ae14e39a4', - demo: true - } + url: 'http://test.outcondigital.com:8048/ad/get?pod=5d603538eba7192ae14e39a4&demo=true', + data: {} }); }); it('Build requests with internalID and publisherID params', function () { @@ -46,15 +43,12 @@ describe('outconBidAdapter', function () { params: { internalId: '12345678', publisher: '5d5d66f2306ea4114a37c7c2', + demo: true } })).to.eql({ method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', - data: { - internalId: '12345678', - publisher: '5d5d66f2306ea4114a37c7c2', - demo: true - } + url: 'http://test.outcondigital.com:8048/ad/get?internalId=12345678&publisher=5d5d66f2306ea4114a37c7c2&demo=true', + data: {} }); }); }); From aa23fe0a2996c370235ddd48699b0ae36ad87c04 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Sat, 14 Sep 2019 11:42:26 -0300 Subject: [PATCH 21/50] Fixes --- modules/outconAdapter.md | 9 +++++--- modules/outconBidAdapter.js | 25 +++++++++++----------- test/spec/modules/outconBidAdapter_spec.js | 8 +++---- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/modules/outconAdapter.md b/modules/outconAdapter.md index f3cbd48ce1e..420646d90ac 100644 --- a/modules/outconAdapter.md +++ b/modules/outconAdapter.md @@ -14,8 +14,11 @@ Module that connects to Outcon demand sources ``` var adUnits = [ { - pod: "5beeb24a306ea47660632043", - internalId: "12345678", - publisher: "5beeb1fd306ea4779e464532" + bidder: 'outcom', + params: { + internalId: '12345678', + publisher: '5d5d66f2306ea4114a37c7c2', + demo: true + } ]; ``` \ No newline at end of file diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index d8959730494..76a091815f2 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -1,25 +1,24 @@ import {registerBidder} from '../src/adapters/bidderFactory'; import {config} from '../src/config'; -const BIDDER_CODE = 'outcom'; +const BIDDER_CODE = 'outcon'; export const spec = { code: BIDDER_CODE, - aliases: ['outcom'], isBidRequestValid: function(bid) { return !!(bid.params.pod || (bid.params.internalId && bid.params.publisher)); }, - buildRequests: function(validBidRequests) { - let par = ''; - if (validBidRequests.params.pod != undefined) par = 'get?pod=' + validBidRequests.params.pod; - else par = 'get?internalId=' + validBidRequests.params.internalId + '&publisher=' + validBidRequests.params.publisher; - if (validBidRequests.params.demo == true) par = par + '&demo=true'; - return { - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/' + par, - data: {} - }; + for (let i=0; i Date: Sat, 14 Sep 2019 11:45:32 -0300 Subject: [PATCH 22/50] Fixes --- modules/outconBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 76a091815f2..7656d18cbbe 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -7,7 +7,7 @@ export const spec = { return !!(bid.params.pod || (bid.params.internalId && bid.params.publisher)); }, buildRequests: function(validBidRequests) { - for (let i=0; i Date: Tue, 17 Sep 2019 15:32:01 -0300 Subject: [PATCH 24/50] no message --- modules/outconBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 8c8e1963432..572748afc7a 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -23,7 +23,7 @@ export const spec = { case 'stg': url = 'http://stg.outcondigital.com:8048/ad/' + par; break; - } + } return { method: 'GET', url: url, From f755375176c8a150a0efcad9e613eaac5a6b1d38 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Tue, 17 Sep 2019 15:44:34 -0300 Subject: [PATCH 25/50] no message --- test/spec/modules/outconBidAdapter_spec.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index efface56143..fad0fc5dcf7 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -1,6 +1,5 @@ import { expect } from 'chai'; import { spec } from '../../../modules/outconBidAdapter'; - describe('outconBidAdapter', function () { describe('bidRequestValidity', function () { it('Check the bidRequest with pod param', function () { From bbb6d5255ca4fca0a4f59d28f458bd78b286d93d Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Tue, 17 Sep 2019 15:50:23 -0300 Subject: [PATCH 26/50] no message --- modules/outconBidAdapter.js | 1 + test/spec/modules/outconBidAdapter_spec.js | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 572748afc7a..3fb94026206 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -1,5 +1,6 @@ import {registerBidder} from '../src/adapters/bidderFactory'; import {config} from '../src/config'; + const BIDDER_CODE = 'outcon'; export const spec = { code: BIDDER_CODE, diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index fad0fc5dcf7..efface56143 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -1,5 +1,6 @@ import { expect } from 'chai'; import { spec } from '../../../modules/outconBidAdapter'; + describe('outconBidAdapter', function () { describe('bidRequestValidity', function () { it('Check the bidRequest with pod param', function () { From fd5970ccdfab4f75b7db06fca6c5b16353f28a15 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Tue, 24 Sep 2019 11:45:05 -0300 Subject: [PATCH 27/50] Added bidId --- modules/outconBidAdapter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 3fb94026206..a57ba31000a 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -35,11 +35,11 @@ export const spec = { interpretResponse: function(serverResponse, bidRequest) { const bidResponses = []; const bidResponse = { - requestId: serverResponse.body.id, + requestId: serverResponse.body.bidID, cpm: serverResponse.body.cpm, width: serverResponse.body.creatives[0].width, height: serverResponse.body.creatives[0].height, - creativeId: serverResponse.body.id, + creativeId: serverResponse.body.creatives[0].id, currency: serverResponse.body.cur, netRevenue: true, ttl: config.getConfig('_bidderTimeout'), From 5db92a6f3ce27f2239351dc3b0bb786496f06f27 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Tue, 24 Sep 2019 18:05:33 -0300 Subject: [PATCH 28/50] no message --- modules/outconAdapter.md | 1 + modules/outconBidAdapter.js | 8 ++++---- test/spec/modules/outconBidAdapter_spec.js | 15 ++++++++++----- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/modules/outconAdapter.md b/modules/outconAdapter.md index 925ea7d2572..88ed45396bc 100644 --- a/modules/outconAdapter.md +++ b/modules/outconAdapter.md @@ -18,6 +18,7 @@ Module that connects to Outcon demand sources params: { internalId: '12345678', publisher: '5d5d66f2306ea4114a37c7c2', + bidId: '123456789', env: 'test' } } diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index a57ba31000a..60fa6073762 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -5,14 +5,14 @@ const BIDDER_CODE = 'outcon'; export const spec = { code: BIDDER_CODE, isBidRequestValid: function(bid) { - return !!((bid.params.pod || (bid.params.internalId && bid.params.publisher)) && bid.params.env); + return !!((bid.params.pod || (bid.params.internalId && bid.params.publisher)) && bid.params.env && bid.params.bidId); }, buildRequests: function(validBidRequests) { for (let i = 0; i < validBidRequests.length; i++) { let par = ''; let url = ''; - if (validBidRequests[i].params.pod != undefined) par = 'get?pod=' + validBidRequests[i].params.pod; - else par = 'get?internalId=' + validBidRequests[i].params.internalId + '&publisher=' + validBidRequests[i].params.publisher; + if (validBidRequests[i].params.pod != undefined) par = 'get?pod=' + validBidRequests[i].params.pod + '&bidId=' + validBidRequests[i].params.bidId; + else par = 'get?internalId=' + validBidRequests[i].params.internalId + '&publisher=' + validBidRequests[i].params.publisher + '&bidId=' + validBidRequests[i].params.bidId; switch (validBidRequests[i].params.env) { case 'test': par = par + '&demo=true'; @@ -35,7 +35,7 @@ export const spec = { interpretResponse: function(serverResponse, bidRequest) { const bidResponses = []; const bidResponse = { - requestId: serverResponse.body.bidID, + requestId: serverResponse.body.bidId, cpm: serverResponse.body.cpm, width: serverResponse.body.creatives[0].width, height: serverResponse.body.creatives[0].height, diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index efface56143..2f61beeb7c5 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -8,7 +8,8 @@ describe('outconBidAdapter', function () { bidder: 'outcon', params: { pod: '5d603538eba7192ae14e39a4', - env: 'test' + env: 'test', + bidId: '12345678' } })).to.equal(true); }); @@ -18,7 +19,8 @@ describe('outconBidAdapter', function () { params: { internalId: '12345678', publisher: '5d5d66f2306ea4114a37c7c2', - env: 'test' + env: 'test', + bidId: '12345678' } })).to.equal(true); }); @@ -29,7 +31,8 @@ describe('outconBidAdapter', function () { bidder: 'outcon', params: { pod: '5d603538eba7192ae14e39a4', - env: 'test' + env: 'test', + bidId: '12345678' } }])).to.eql({ method: 'GET', @@ -43,7 +46,8 @@ describe('outconBidAdapter', function () { params: { internalId: '12345678', publisher: '5d5d66f2306ea4114a37c7c2', - env: 'test' + env: 'test', + bidId: '12345678' } }])).to.eql({ method: 'GET', @@ -58,7 +62,8 @@ describe('outconBidAdapter', function () { url: 'http://test.outcondigital.com:8048/ad/', data: { pod: '5d603538eba7192ae14e39a4', - env: 'test' + env: 'test', + bidId: '12345678' } }; const bidResponse = { From ee9c89d9882ad65d22cb3c7d719eb29af3c194dc Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Tue, 24 Sep 2019 18:11:49 -0300 Subject: [PATCH 29/50] no message --- test/spec/modules/outconBidAdapter_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index 2f61beeb7c5..466c32e7a3d 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -36,7 +36,7 @@ describe('outconBidAdapter', function () { } }])).to.eql({ method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/get?pod=5d603538eba7192ae14e39a4&demo=true', + url: 'http://test.outcondigital.com:8048/ad/get?pod=5d603538eba7192ae14e39a4&demo=true&bidId=12345678', data: {} }); }); @@ -51,7 +51,7 @@ describe('outconBidAdapter', function () { } }])).to.eql({ method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/get?internalId=12345678&publisher=5d5d66f2306ea4114a37c7c2&demo=true', + url: 'http://test.outcondigital.com:8048/ad/get?internalId=12345678&publisher=5d5d66f2306ea4114a37c7c2&demo=true&bidId=12345678', data: {} }); }); From 7b749e02e5a3552f227fb0388aa0bc3ebfbc1dd3 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Tue, 24 Sep 2019 18:59:41 -0300 Subject: [PATCH 30/50] no message --- test/spec/modules/outconBidAdapter_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index 466c32e7a3d..ffb7e2aa9dd 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -36,7 +36,7 @@ describe('outconBidAdapter', function () { } }])).to.eql({ method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/get?pod=5d603538eba7192ae14e39a4&demo=true&bidId=12345678', + url: 'http://test.outcondigital.com:8048/ad/get?pod=5d603538eba7192ae14e39a4&bidId=12345678&demo=true', data: {} }); }); @@ -51,7 +51,7 @@ describe('outconBidAdapter', function () { } }])).to.eql({ method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/get?internalId=12345678&publisher=5d5d66f2306ea4114a37c7c2&demo=true&bidId=12345678', + url: 'http://test.outcondigital.com:8048/ad/get?internalId=12345678&publisher=5d5d66f2306ea4114a37c7c2&bidId=12345678&demo=true', data: {} }); }); From 936f94b39483ee94de0e729936d430c7326b9305 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 26 Sep 2019 11:25:45 -0300 Subject: [PATCH 31/50] no message --- modules/outconBidAdapter.js | 6 ++--- test/spec/modules/outconBidAdapter_spec.js | 29 +++++++--------------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 60fa6073762..9d516e20f28 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -5,14 +5,14 @@ const BIDDER_CODE = 'outcon'; export const spec = { code: BIDDER_CODE, isBidRequestValid: function(bid) { - return !!((bid.params.pod || (bid.params.internalId && bid.params.publisher)) && bid.params.env && bid.params.bidId); + return !!((bid.params.pod || (bid.params.internalId && bid.params.publisher)) && bid.params.env); }, buildRequests: function(validBidRequests) { for (let i = 0; i < validBidRequests.length; i++) { let par = ''; let url = ''; - if (validBidRequests[i].params.pod != undefined) par = 'get?pod=' + validBidRequests[i].params.pod + '&bidId=' + validBidRequests[i].params.bidId; - else par = 'get?internalId=' + validBidRequests[i].params.internalId + '&publisher=' + validBidRequests[i].params.publisher + '&bidId=' + validBidRequests[i].params.bidId; + if (validBidRequests[i].params.pod != undefined) par = 'get?pod=' + validBidRequests[i].params.pod + '&bidId=' + validBidRequests[i].bidId; + else par = 'get?internalId=' + validBidRequests[i].params.internalId + '&publisher=' + validBidRequests[i].params.publisher + '&bidId=' + validBidRequests[i].bidId; switch (validBidRequests[i].params.env) { case 'test': par = par + '&demo=true'; diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index ffb7e2aa9dd..dc9c96ed3a3 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -8,8 +8,7 @@ describe('outconBidAdapter', function () { bidder: 'outcon', params: { pod: '5d603538eba7192ae14e39a4', - env: 'test', - bidId: '12345678' + env: 'test' } })).to.equal(true); }); @@ -19,8 +18,7 @@ describe('outconBidAdapter', function () { params: { internalId: '12345678', publisher: '5d5d66f2306ea4114a37c7c2', - env: 'test', - bidId: '12345678' + env: 'test' } })).to.equal(true); }); @@ -31,39 +29,30 @@ describe('outconBidAdapter', function () { bidder: 'outcon', params: { pod: '5d603538eba7192ae14e39a4', - env: 'test', - bidId: '12345678' + env: 'test' } - }])).to.eql({ - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/get?pod=5d603538eba7192ae14e39a4&bidId=12345678&demo=true', - data: {} - }); + }])).to.have.keys('method', 'url', 'data'); }); + it('Build requests with internalID and publisherID params', function () { expect(spec.buildRequests([{ bidder: 'outcon', params: { internalId: '12345678', publisher: '5d5d66f2306ea4114a37c7c2', - env: 'test', - bidId: '12345678' + env: 'test' } - }])).to.eql({ - method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/get?internalId=12345678&publisher=5d5d66f2306ea4114a37c7c2&bidId=12345678&demo=true', - data: {} - }); + }])).to.have.keys('method', 'url', 'data'); }); }); + describe('interpretResponse', function () { const bidRequest = { method: 'GET', url: 'http://test.outcondigital.com:8048/ad/', data: { pod: '5d603538eba7192ae14e39a4', - env: 'test', - bidId: '12345678' + env: 'test' } }; const bidResponse = { From 820a61c7350d6dfcabb2aeff06ddabcf3e81255a Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Mon, 30 Sep 2019 11:51:59 -0300 Subject: [PATCH 32/50] Wrapping url with html --- modules/outconBidAdapter.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 9d516e20f28..18cb6d1f5a5 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -43,11 +43,15 @@ export const spec = { currency: serverResponse.body.cur, netRevenue: true, ttl: config.getConfig('_bidderTimeout'), - ad: serverResponse.body.creatives[0].url, + ad: wrapDisplayUrl(serverResponse.body.creatives[0].url, serverResponse.body.type), vastImpUrl: serverResponse.body.trackingURL }; bidResponses.push(bidResponse); return bidResponses; }, } +function wrapDisplayUrl(displayUrl, type) { + if(type == 'video') return `
`; + if(type == 'banner') return `
`; +} registerBidder(spec); From 26373d821465fae46fcf001de0ef55e1e7f2d5e7 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Mon, 30 Sep 2019 11:54:33 -0300 Subject: [PATCH 33/50] no message --- modules/outconBidAdapter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 18cb6d1f5a5..48190570b33 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -51,7 +51,7 @@ export const spec = { }, } function wrapDisplayUrl(displayUrl, type) { - if(type == 'video') return `
`; - if(type == 'banner') return `
`; + if (type == 'video') return `
`; + if (type == 'banner') return `
`; } registerBidder(spec); From 2de6d7b884299156cf37bd61eeb9f958b6f86abd Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Mon, 30 Sep 2019 12:17:15 -0300 Subject: [PATCH 34/50] no message --- modules/outconBidAdapter.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 48190570b33..cd444661645 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -49,9 +49,9 @@ export const spec = { bidResponses.push(bidResponse); return bidResponses; }, -} -function wrapDisplayUrl(displayUrl, type) { - if (type == 'video') return `
`; - if (type == 'banner') return `
`; + wrapDisplayUrl: function(displayUrl, type) { + if (type == 'video') return `
`; + if (type == 'banner') return `
`; + } } registerBidder(spec); From 48664ba2a782c5450540fc466123870fe3cec1d2 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Mon, 30 Sep 2019 12:19:30 -0300 Subject: [PATCH 35/50] no message --- modules/outconBidAdapter.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index cd444661645..d691e807059 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -49,9 +49,11 @@ export const spec = { bidResponses.push(bidResponse); return bidResponses; }, - wrapDisplayUrl: function(displayUrl, type) { - if (type == 'video') return `
`; - if (type == 'banner') return `
`; - } } + +function wrapDisplayUrl(displayUrl, type) { + if (type == 'video') return `
`; + if (type == 'banner') return `
`; +} + registerBidder(spec); From 62e42b8bfde537d3f8d5836a787f351226ac57e7 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 17 Oct 2019 12:57:24 -0300 Subject: [PATCH 36/50] Fix mediaTypes --- modules/outconBidAdapter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index d691e807059..daca3592342 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -44,7 +44,8 @@ export const spec = { netRevenue: true, ttl: config.getConfig('_bidderTimeout'), ad: wrapDisplayUrl(serverResponse.body.creatives[0].url, serverResponse.body.type), - vastImpUrl: serverResponse.body.trackingURL + vastImpUrl: serverResponse.body.trackingURL, + mediaType: serverResponse.body.type }; bidResponses.push(bidResponse); return bidResponses; From e0042cbdfb2ae7a82944e560b806ef14ae2faa08 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Thu, 17 Oct 2019 13:20:20 -0300 Subject: [PATCH 37/50] no message --- test/spec/modules/outconBidAdapter_spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index dc9c96ed3a3..eef87a10c95 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -87,7 +87,8 @@ describe('outconBidAdapter', function () { 'netRevenue', 'ttl', 'ad', - 'vastImpUrl' + 'vastImpUrl', + 'mediaType' ]; let resultKeys = Object.keys(result[0]); resultKeys.forEach(function(key) { From 1046ddcd9c12d5fea1f72b44d30dafc05a23b570 Mon Sep 17 00:00:00 2001 From: TinchoF <50110327+TinchoF@users.noreply.github.com> Date: Thu, 17 Oct 2019 15:01:13 -0300 Subject: [PATCH 38/50] Update outconBidAdapter_spec.js --- test/spec/modules/outconBidAdapter_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index eef87a10c95..155dd0f27c1 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -69,7 +69,7 @@ describe('outconBidAdapter', function () { codec: 'video/mp4' } ], - id: '5d6e6aef22063e392bf7f564', + ad: '5d6e6aef22063e392bf7f564', type: 'video', campaign: '5d42e44b306ea469593c76a2', trackingURL: 'http://test.outcondigital.com:8048/ad/track?track=5d6e6aef22063e392bf7f564' From c30ce94aec625c5047408cd4edaa1a5188c14ed4 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Fri, 18 Oct 2019 15:46:14 -0300 Subject: [PATCH 39/50] Adding VAS response --- modules/outconBidAdapter.js | 7 ++++--- test/spec/modules/outconBidAdapter_spec.js | 9 ++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index b431a90f963..d44165d980c 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -9,10 +9,11 @@ export const spec = { }, buildRequests: function(validBidRequests) { for (let i = 0; i < validBidRequests.length; i++) { - let par = ''; let url = ''; + let par = ''; if (validBidRequests[i].params.pod != undefined) par = 'get?pod=' + validBidRequests[i].params.pod + '&bidId=' + validBidRequests[i].bidId; else par = 'get?internalId=' + validBidRequests[i].params.internalId + '&publisher=' + validBidRequests[i].params.publisher + '&bidId=' + validBidRequests[i].bidId; + par = par + '&vast=true'; switch (validBidRequests[i].params.env) { case 'test': par = par + '&demo=true'; @@ -45,8 +46,8 @@ export const spec = { ttl: config.getConfig('_bidderTimeout'), ad: wrapDisplayUrl(serverResponse.body.creatives[0].url, serverResponse.body.type), vastImpUrl: serverResponse.body.trackingURL, - mediaType: serverResponse.body.type - + mediaType: serverResponse.body.type, + vastUrl: serverResponse.body.vastURL }; bidResponses.push(bidResponse); return bidResponses; diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index 155dd0f27c1..4d01b0b45b4 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -52,7 +52,8 @@ describe('outconBidAdapter', function () { url: 'http://test.outcondigital.com:8048/ad/', data: { pod: '5d603538eba7192ae14e39a4', - env: 'test' + env: 'test', + vast: 'true' } }; const bidResponse = { @@ -72,7 +73,8 @@ describe('outconBidAdapter', function () { ad: '5d6e6aef22063e392bf7f564', type: 'video', campaign: '5d42e44b306ea469593c76a2', - trackingURL: 'http://test.outcondigital.com:8048/ad/track?track=5d6e6aef22063e392bf7f564' + trackingURL: 'http://test.outcondigital.com:8048/ad/track?track=5d6e6aef22063e392bf7f564', + vastURL: 'http://test.outcondigital.com:8048/outcon.xml?impression=5d6e6aef22063e392bf7f564&demo=true' }, }; it('check all the keys that are needed to interpret the response', function () { @@ -88,7 +90,8 @@ describe('outconBidAdapter', function () { 'ttl', 'ad', 'vastImpUrl', - 'mediaType' + 'mediaType', + 'vastURL' ]; let resultKeys = Object.keys(result[0]); resultKeys.forEach(function(key) { From 51cb692496daa545d3d71e1228ce83168ac366a2 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Fri, 18 Oct 2019 15:57:13 -0300 Subject: [PATCH 40/50] no message --- test/spec/modules/outconBidAdapter_spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index 4d01b0b45b4..37faa7a31df 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -23,6 +23,7 @@ describe('outconBidAdapter', function () { })).to.equal(true); }); }); + describe('buildRequests', function () { it('Build requests with pod param', function () { expect(spec.buildRequests([{ From 69ccca3a43dbcab2ffd9838f7de37df7d961b98b Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Fri, 18 Oct 2019 16:11:45 -0300 Subject: [PATCH 41/50] no message --- test/spec/modules/outconBidAdapter_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index 37faa7a31df..a263bc9dbf9 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -23,7 +23,7 @@ describe('outconBidAdapter', function () { })).to.equal(true); }); }); - + describe('buildRequests', function () { it('Build requests with pod param', function () { expect(spec.buildRequests([{ @@ -92,7 +92,7 @@ describe('outconBidAdapter', function () { 'ad', 'vastImpUrl', 'mediaType', - 'vastURL' + 'vastUrl' ]; let resultKeys = Object.keys(result[0]); resultKeys.forEach(function(key) { From 637193ef166db2b169c474ccf70beca0233bf346 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Fri, 18 Oct 2019 16:45:26 -0300 Subject: [PATCH 42/50] no message --- modules/outconBidAdapter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index d44165d980c..5e0d9591947 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -2,6 +2,7 @@ import {registerBidder} from '../src/adapters/bidderFactory'; import {config} from '../src/config'; const BIDDER_CODE = 'outcon'; + export const spec = { code: BIDDER_CODE, isBidRequestValid: function(bid) { From 1af03b051dd62622cb37e6a2fd2ff0595e0b3352 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Fri, 18 Oct 2019 20:29:50 -0300 Subject: [PATCH 43/50] Fix --- modules/outconBidAdapter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 5e0d9591947..ac62c58b2e2 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -58,6 +58,7 @@ export const spec = { function wrapDisplayUrl(displayUrl, type) { if (type == 'video') return `
`; if (type == 'banner') return `
`; + return null; } registerBidder(spec); From ce1d632d89db171e1cbfe917bafb542e5e084717 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Fri, 18 Oct 2019 20:48:49 -0300 Subject: [PATCH 44/50] Changed ttl --- modules/outconBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index ac62c58b2e2..0fa31f3a278 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -44,7 +44,7 @@ export const spec = { creativeId: serverResponse.body.creatives[0].id, currency: serverResponse.body.cur, netRevenue: true, - ttl: config.getConfig('_bidderTimeout'), + ttl: 300, ad: wrapDisplayUrl(serverResponse.body.creatives[0].url, serverResponse.body.type), vastImpUrl: serverResponse.body.trackingURL, mediaType: serverResponse.body.type, From 6aef061bf215f564ab6708bf9b50265720a35591 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Sat, 19 Oct 2019 17:41:40 -0300 Subject: [PATCH 45/50] no message --- modules/outconBidAdapter.js | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 0fa31f3a278..5e40c0751f9 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -1,5 +1,4 @@ import {registerBidder} from '../src/adapters/bidderFactory'; -import {config} from '../src/config'; const BIDDER_CODE = 'outcon'; From 9421e74fa093bcc4dcff97ff62448a933671a0d6 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Mon, 21 Oct 2019 10:09:50 -0300 Subject: [PATCH 46/50] supportedMediaTypes --- modules/outconBidAdapter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 5e40c0751f9..ee068bd9fe3 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -4,6 +4,7 @@ const BIDDER_CODE = 'outcon'; export const spec = { code: BIDDER_CODE, + supportedMediaTypes: ['banner', 'video'], isBidRequestValid: function(bid) { return !!((bid.params.pod || (bid.params.internalId && bid.params.publisher)) && bid.params.env); }, From 9e7819b72bf4cfab6904c1fc4086be8139c3b310 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Mon, 21 Oct 2019 10:35:22 -0300 Subject: [PATCH 47/50] no message --- modules/outconBidAdapter.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index ee068bd9fe3..02f2ec66da9 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -50,6 +50,12 @@ export const spec = { mediaType: serverResponse.body.type, vastUrl: serverResponse.body.vastURL }; + if (serverResponse.body.type == 'video') { + Object.assign(bidResponse, { + vastUrl: serverResponse.body.vastURL, + ttl: 3600 + }); + } bidResponses.push(bidResponse); return bidResponses; }, From 3bc083938fb89f98617504e55a9283addde21529 Mon Sep 17 00:00:00 2001 From: Martin Folmer Date: Mon, 21 Oct 2019 11:33:41 -0300 Subject: [PATCH 48/50] no message --- modules/outconBidAdapter.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index 02f2ec66da9..ba0c1164279 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -47,8 +47,7 @@ export const spec = { ttl: 300, ad: wrapDisplayUrl(serverResponse.body.creatives[0].url, serverResponse.body.type), vastImpUrl: serverResponse.body.trackingURL, - mediaType: serverResponse.body.type, - vastUrl: serverResponse.body.vastURL + mediaType: serverResponse.body.type }; if (serverResponse.body.type == 'video') { Object.assign(bidResponse, { From eee95aeea5a7eae20beef7a4f96265087520adda Mon Sep 17 00:00:00 2001 From: Martin Folmer <> Date: Thu, 28 Nov 2019 17:23:26 -0300 Subject: [PATCH 49/50] Change protocol to https --- modules/outconBidAdapter.js | 6 +++--- test/spec/modules/outconBidAdapter_spec.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/outconBidAdapter.js b/modules/outconBidAdapter.js index ba0c1164279..b636c18cf88 100644 --- a/modules/outconBidAdapter.js +++ b/modules/outconBidAdapter.js @@ -18,13 +18,13 @@ export const spec = { switch (validBidRequests[i].params.env) { case 'test': par = par + '&demo=true'; - url = 'http://test.outcondigital.com:8048/ad/' + par; + url = 'https://test.outcondigital.com/ad/' + par; break; case 'api': - url = 'http://api.outcondigital.com:8048/ad/' + par; + url = 'https://api.outcondigital.com/ad/' + par; break; case 'stg': - url = 'http://stg.outcondigital.com:8048/ad/' + par; + url = 'https://stg.outcondigital.com/ad/' + par; break; } return { diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index a263bc9dbf9..ef96a291de8 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -50,7 +50,7 @@ describe('outconBidAdapter', function () { describe('interpretResponse', function () { const bidRequest = { method: 'GET', - url: 'http://test.outcondigital.com:8048/ad/', + url: 'https://test.outcondigital.com/ad/', data: { pod: '5d603538eba7192ae14e39a4', env: 'test', @@ -64,7 +64,7 @@ describe('outconBidAdapter', function () { exp: 10, creatives: [ { - url: 'http://test.outcondigital.com/uploads/5d42e7a7306ea4689b67c122/frutas.mp4', + url: 'https://test.outcondigital.com/uploads/5d42e7a7306ea4689b67c122/frutas.mp4', size: 3, width: 1920, height: 1080, @@ -74,8 +74,8 @@ describe('outconBidAdapter', function () { ad: '5d6e6aef22063e392bf7f564', type: 'video', campaign: '5d42e44b306ea469593c76a2', - trackingURL: 'http://test.outcondigital.com:8048/ad/track?track=5d6e6aef22063e392bf7f564', - vastURL: 'http://test.outcondigital.com:8048/outcon.xml?impression=5d6e6aef22063e392bf7f564&demo=true' + trackingURL: 'https://test.outcondigital.com/ad/track?track=5d6e6aef22063e392bf7f564', + vastURL: 'https://test.outcondigital.com/outcon.xml?impression=5d6e6aef22063e392bf7f564&demo=true' }, }; it('check all the keys that are needed to interpret the response', function () { From cff30f63daf2ed91d26b46303dd72610410af340 Mon Sep 17 00:00:00 2001 From: Martin Folmer <> Date: Thu, 28 Nov 2019 17:42:15 -0300 Subject: [PATCH 50/50] no message --- test/spec/modules/outconBidAdapter_spec.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/spec/modules/outconBidAdapter_spec.js b/test/spec/modules/outconBidAdapter_spec.js index ef96a291de8..d9e763b9df9 100644 --- a/test/spec/modules/outconBidAdapter_spec.js +++ b/test/spec/modules/outconBidAdapter_spec.js @@ -23,7 +23,6 @@ describe('outconBidAdapter', function () { })).to.equal(true); }); }); - describe('buildRequests', function () { it('Build requests with pod param', function () { expect(spec.buildRequests([{ @@ -34,7 +33,6 @@ describe('outconBidAdapter', function () { } }])).to.have.keys('method', 'url', 'data'); }); - it('Build requests with internalID and publisherID params', function () { expect(spec.buildRequests([{ bidder: 'outcon', @@ -46,7 +44,6 @@ describe('outconBidAdapter', function () { }])).to.have.keys('method', 'url', 'data'); }); }); - describe('interpretResponse', function () { const bidRequest = { method: 'GET',