Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream #1

Merged
merged 48 commits into from
Mar 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b45a9c5
Prebid 0.19.0-pre
Feb 1, 2017
da10d6b
rhythmone: reset auctionEnded and requestCompleted on new call to cal…
kitwestneat Feb 1, 2017
e9be4fe
PubMatic to execute tracker pixel in iframe. (#937)
pm-harshad-mane Feb 1, 2017
c9e0eed
Support for MANTIS Ad Network (#911)
parisholley Feb 1, 2017
6edab89
Gumgum throttle (#944)
davidmh Feb 2, 2017
9960860
Use new key descriptionUrl instead of vastUrl (#967)
jaiminpanchal27 Feb 2, 2017
9dcfb4e
Brightcom Adapter - Add encoding to request (#956)
matan-ybrant Feb 3, 2017
98c8984
Add display none (#925)
AlexStanovsky Feb 3, 2017
8dc5a88
Rubicon video support (#950)
snapwich Feb 6, 2017
1b4eaf0
add Vertamedia video adpater (#959)
Gorokhov Feb 6, 2017
2f4bb60
Correct Adform adapter bid response adId value (#947)
braizhas Feb 7, 2017
fcf50e7
Add Twenga adapter (#936)
twenga-rtb Feb 7, 2017
22f1fad
Rewrite groupByPlacement to avoid multiple scans of array (#918)
kitwestneat Feb 7, 2017
522ed99
Added Lifestreet adapter. (#965)
Lifestreet Feb 7, 2017
316fdfa
Rubicon adapter: add a floor variable (#964)
benjaminclot Feb 7, 2017
48db793
added usersync for adkernel adapter (#951)
ckbo3hrk Feb 8, 2017
eb10289
Make x-domain safe frame example work out of the box (#955)
brondsem Feb 8, 2017
22cdd6f
Use package dependencies for ES6 Array shims (#962)
outoftime Feb 8, 2017
74f21fb
OpenX Adapter: Handles fallback ads correctly as a no fill (#39) (#963)
lntho Feb 8, 2017
76e98b8
Added 152Media Appnexus Alias (#952)
bozghiyy Feb 8, 2017
48fbd15
added matomy as an alias for appnexus (#850)
francoroy Feb 8, 2017
7621658
Stronger xdomain checks (#971)
brondsem Feb 8, 2017
82fd5a5
Add StickyAdsTV Bidder adapter (#916)
Feb 9, 2017
7cbe60b
Integrate Browserstack tests into Travis CI build (#839)
matthewlane Feb 9, 2017
8f0a7a6
Fix issue with appnexusAst sending `user` object in the wrong place. …
Feb 9, 2017
0c483fa
Revert to running browser tests in Travis (#983)
matthewlane Feb 10, 2017
4ae8023
Use stable version of Chrome (#984)
matthewlane Feb 10, 2017
fc92dae
Updating Komoona adapter to support future Prebid requirements (#974)
itayo155 Feb 13, 2017
282804e
Stub pixel drop to prevent network request in test (#988)
matthewlane Feb 13, 2017
e2b4836
fixed exception when refreshing individual Ad Units and bidder respon…
Feb 13, 2017
78bc8a3
check truthiness of adUnitCode (#990)
Feb 13, 2017
522b45b
Prebid 0.19.0 Release
Feb 13, 2017
3f7211c
Increment Pre Version
Feb 13, 2017
9721812
Add ThoughtLeadr adapter (#894)
ilya-pirogov Feb 16, 2017
cf21bf6
E2etest concurrency (#982)
jaiminpanchal27 Feb 17, 2017
feceeec
Skip test causing build failures (#997)
matthewlane Feb 17, 2017
dac424b
Deal support for SmartAdServer adapter (#978)
adesmoules Feb 21, 2017
73e16e2
Currency support for SmartAdServer adapter (#979)
adesmoules Feb 21, 2017
e953c1e
Support Video for GetIntent adapter (#987)
dmart28 Feb 21, 2017
57d66ed
Added referrer parameter (#966)
bjorn-wo Feb 23, 2017
eea9914
Fix bug with supporting non-cpm dealId bids. (#1006)
Feb 26, 2017
0c2617e
adbund adapter (#932)
Feb 28, 2017
00e673c
Fixes for Centro adapter (#992)
Niksok Feb 28, 2017
32cb89d
Use optimize js to improve parse time (https://github.com/nolanlawson…
Mar 1, 2017
ae1cfec
Create bids for requests without mutating ad units (#1019)
Mar 1, 2017
3e50de1
Remove test that intermittently fails unit tests (#1020)
Mar 1, 2017
6b6fbf1
Prebid 0.20.0 Release
matthewlane Mar 3, 2017
6b6f83e
Increment pre version
matthewlane Mar 3, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
sudo: required
dist: trusty

language: node_js

node_js:
- "5.1"

addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable

before_install:
- npm install -g gulp
- export CHROME_BIN=chromium-browser
- export CHROME_BIN=google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

Expand Down
31 changes: 29 additions & 2 deletions adapters.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
[
"aardvark",
"adblade",
"adbund",
"adbutler",
"adequant",
"adform",
"adkernel",
"admedia",
"vertamedia",
"aol",
"appnexus",
"appnexusAst",
"conversant",
"districtmDMX",
"fidelity",
"getintent",
"gumgum",
"hiromedia",
"indexExchange",
"kruxlink",
"getintent",
"komoona",
"lifestreet",
"mantis",
"openx",
"piximedia",
"pubmatic",
Expand All @@ -30,7 +34,10 @@
"sonobi",
"sovrn",
"springserve",
"thoughtleadr",
"stickyadstv",
"triplelift",
"twenga",
"yieldbot",
"nginad",
"brightcom",
Expand Down Expand Up @@ -65,21 +72,41 @@
"appnexusAst": {
"supportedMediaTypes": ["video"]
}
}, {
"vertamedia": {
"supportedMediaTypes": ["video"]
}
},
{
"appnexus": {
"alias": "matomy"
}
},
{
"rubicon": {
"alias": "rubiconLite"
"alias": "rubiconLite",
"supportedMediaTypes": ["video"]
}
},
{
"appnexus": {
"alias": "featureforward"
}
},
{
"appnexus": {
"alias": "oftmedia"
}
},
{
"adkernel": {
"alias": "headbidding"
}
},
{
"getintent": {
"supportedMediaTypes" : ["video"]
}
}

]
8 changes: 8 additions & 0 deletions browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@
"device": null,
"os": "Windows"
},
"bs_chrome_56_mac_sierra": {
"base": "BrowserStack",
"os": "OS X",
"os_version": "Sierra",
"browser": "chrome",
"device": null,
"browser_version": "56.0"
},
"bs_safari_9.1_mac_elcapitan": {
"base": "BrowserStack",
"os_version": "El Capitan",
Expand Down
4 changes: 2 additions & 2 deletions gulpHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ module.exports = {

createEnd2EndTestReport : function(targetDestinationDir) {
var browsers = require('./browsers.json');
var env = ['default'];
var env = [];
var input = 'bs';
for(var key in browsers) {
if(key.substring(0, input.length) === input) {
if(key.substring(0, input.length) === input && browsers[key].browser !== 'iphone') {
env.push(key);
}
}
Expand Down
43 changes: 23 additions & 20 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var header = require('gulp-header');
var zip = require('gulp-zip');
var replace = require('gulp-replace');
var shell = require('gulp-shell');
var optimizejs = require('gulp-optimize-js');

var CI_MODE = process.env.NODE_ENV === 'ci';
var prebid = require('./package.json');
Expand Down Expand Up @@ -73,6 +74,7 @@ gulp.task('webpack', function () {
.pipe(replace('$prebid.version$', prebid.version))
.pipe(uglify())
.pipe(header(banner, { prebid: prebid }))
.pipe(optimizejs())
.pipe(gulp.dest('build/dist'))
.pipe(connect.reload());
});
Expand Down Expand Up @@ -219,45 +221,46 @@ gulp.task('docs', ['clean-docs'], function () {
});

gulp.task('e2etest', function() {
var cmd = '--env default';
var cmdQueue = [];
if(argv.browserstack) {
var browsers = require('./browsers.json');
var env = [];
var input = 'bs';
for(var key in browsers) {
if(key.substring(0, input.length) === input) {
env.push(key);
}
delete browsers['bs_ie_9_windows_7'];

var cmdStr = ' --config nightwatch.conf.js';
if (argv.group) {
cmdStr = cmdStr + ' --group ' + argv.group;
}
cmd = '--env default,' + env.join(',');
}
cmdStr = cmdStr + ' --reporter ./test/spec/e2e/custom-reporter/pbjs-html-reporter.js';

if(argv.browserstack) {
cmd = cmd + ' --config nightwatch.conf.js';
} else {
cmd = cmd + ' --config nightwatch.json';
}
var startWith = 'bs';

if (argv.group) {
cmd = cmd + ' --group ' + argv.group;
Object.keys(browsers).filter(function(v){
return v.substring(0, startWith.length) === startWith && browsers[v].browser !== 'iphone';
}).map(function(v,i,arr) {
var newArr = (i%2 === 0) ? arr.slice(i,i+2) : null;
if(newArr) {
var cmd = 'nightwatch --env ' + newArr.join(',') + cmdStr;
cmdQueue.push(cmd);
}
});
}

cmd = cmd + ' --reporter ./test/spec/e2e/custom-reporter/pbjs-html-reporter.js';
return gulp.src('')
.pipe(shell('nightwatch ' + cmd));
.pipe(shell(cmdQueue.join(';')));
});

gulp.task('e2etest-report', function() {
var reportPort = 9010;
var targetDestinationDir = './e2etest-report';
helpers.createEnd2EndTestReport(targetDestinationDir);
connect.server({
port: port,
port: reportPort,
root: './',
livereload: true
});

setTimeout(function() {
opens('http://localhost:' + port + '/' + targetDestinationDir.slice(2) + '/results.html');
opens('http://localhost:' + reportPort + '/' + targetDestinationDir.slice(2) + '/results.html');
}, 5000);

});
27 changes: 17 additions & 10 deletions integrationExamples/gpt/pbjs_example_gpt.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@
{
bidder: 'memeglobal',
params: {
tagid: 007, // REQUIRED int. To get one, contact http://www.memeglobal.com
tagid: 007, // REQUIRED int. To get one, contact http://www.memeglobal.com
}
},
{
bidder: 'adblade',
params: {
partnerId: 42980,
bidfloor: 0.01 // OPTIONAL float bid floor in $ CPM
bidfloor: 0.01 // OPTIONAL float bid floor in $ CPM
}
},
{
Expand All @@ -231,6 +231,13 @@
cur: 'EUR'
}
},
{
bidder: 'adbund',
params: {
sid: '110238', // REQUIRED int. To get one, sign up http://www.adbund.com
bidfloor: 0.036 // OPTIONAL float bid floor in $ CPM
}
},
{
bidder: 'smartyads',
params: {
Expand Down Expand Up @@ -326,22 +333,22 @@
}
},
{
bidder: 'wideorbit',
bidder: 'memeglobal',
params: {
pbId: 123, // REQUIRED Publisher Id,
pId: 123456 // REQUIRED Placement Id
tagid: 007, // REQUIRED int. To get one, contact http://www.memeglobal.com
}
},
{
bidder: 'memeglobal',
bidder: 'gumgum',
params: {
tagid: 007, // REQUIRED int. To get one, contact http://www.memeglobal.com
inScreen: 'ggumtest' // REQUIRED str Tracking Id
}
},
{
bidder: 'gumgum',
bidder: 'wideorbit',
params: {
inScreen: 'ggumtest' // REQUIRED str Tracking Id
pbId: 123, // REQUIRED Publisher Id,
pId: 123456 // REQUIRED Placement Id
}
}
]
Expand All @@ -352,7 +359,7 @@
$$PREBID_GLOBAL$$.addAdUnits(adUnits);

//register a callback handler
$$PREBID_GLOBAL$$.addCallback('adUnitBidsBack', function (adUnitCode) {
$$PREBID_GLOBAL$$.addCallback('adUnitBidsBack', function (adUnitCode) {
console.debug('ad unit bids back for:', adUnitCode);
});

Expand Down
72 changes: 72 additions & 0 deletions integrationExamples/gpt/x-domain/creative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<script>
// this script can be returned by an ad server delivering a cross domain iframe, into which the
// creative will be rendered, e.g. DFP delivering a SafeFrame

var urlParser = document.createElement('a');
urlParser.href = '%%PATTERN:url%%';
var publisherDomain = urlParser.protocol + '//' + urlParser.hostname;
var adServerDomain = 'https://tpc.googlesyndication.com';

function renderAd(ev) {
var key = ev.message ? 'message' : 'data';
var adObject = {};
try {
adObject = JSON.parse(ev[key]);
} catch (e) {
return;
}

var origin = ev.origin || ev.originalEvent.origin;
if (adObject.message && adObject.message === 'Prebid Response' &&
publisherDomain === origin &&
adObject.adId === '%%PATTERN:hb_adid%%' &&
(adObject.ad || adObject.adUrl)) {
var body = window.document.body;
var ad = adObject.ad;
var url = adObject.adUrl;
var width = adObject.width;
var height = adObject.height;

if (adObject.mediaType === 'video') {
console.log('Error trying to write ad.');
} else

if (ad) {
var frame = document.createElement('iframe');
frame.setAttribute('FRAMEBORDER', 0);
frame.setAttribute('SCROLLING', 'no');
frame.setAttribute('MARGINHEIGHT', 0);
frame.setAttribute('MARGINWIDTH', 0);
frame.setAttribute('TOPMARGIN', 0);
frame.setAttribute('LEFTMARGIN', 0);
frame.setAttribute('ALLOWTRANSPARENCY', 'true');
frame.setAttribute('width', width);
frame.setAttribute('height', height);
body.appendChild(frame);
frame.contentDocument.open();
frame.contentDocument.write(ad);
frame.contentDocument.close();
} else if (url) {
body.insertAdjacentHTML('beforeend', '<IFRAME SRC="' + url + '" FRAMEBORDER="0" SCROLLING="no" MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0" ALLOWTRANSPARENCY="true" WIDTH="' + width + '" HEIGHT="' + height + '"></IFRAME>');
} else {
console.log('Error trying to write ad. No ad for bid response id: ' + id);
}
}
}

function requestAdFromPrebid() {
var message = JSON.stringify({
message: 'Prebid Request',
adId: '%%PATTERN:hb_adid%%',
adServerDomain: adServerDomain
});
window.parent.postMessage(message, publisherDomain);
}

function listenAdFromPrebid() {
window.addEventListener('message', renderAd, false);
}

listenAdFromPrebid();
requestAdFromPrebid();
</script>
Loading