Skip to content

Eng 1760 #39

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

Merged
merged 40 commits into from
Aug 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a2c29b2
Revert "Revert "Increment pre version""
snapwich Aug 7, 2018
7787ddc
remove alias from request URL as it's no longer needed (#2951)
naffis Aug 8, 2018
1f652e5
Updating core members
mkendall07 Aug 8, 2018
356a6bf
add a default ttl to undertone adapter (#2955)
omerko Aug 9, 2018
a2e5ac6
Fixed the prebid-server example page, and updated it to use openrtb. …
dbemiller Aug 13, 2018
970e863
update and refactor of consumable adapter (#2962)
naffis Aug 13, 2018
10b318a
returning tracking pixels (#2876)
nwlosinski Aug 13, 2018
bd60750
Fidelity Media fmxSSP. Adding GDPR Support (#2935)
onaydenov Aug 13, 2018
700d5f2
lint fix (#2972)
jaiminpanchal27 Aug 13, 2018
5b4e382
Fix safeFrame resize issue (#2947)
mkendall07 Aug 13, 2018
aa28600
kargo analytics adapter (#2939)
samuelhorwitz Aug 13, 2018
6f43b6b
Add wtimeout parameter in ad request for TrustX Bid Adapter (#2968)
PWyrembak Aug 13, 2018
8134b03
Add LGTM.com alert count badge (#2956)
sjvs Aug 14, 2018
e643997
modified console logging to include a Prebid label, and normalized th…
andyblackwell Aug 14, 2018
6cc84aa
Feature : Display counter at Adslot level (#2940)
vedantseta Aug 14, 2018
4ba1d45
Kargo adapter BidID support (#2958)
samuelhorwitz Aug 14, 2018
ba1671c
1.20.0 release.
mkendall07 Aug 14, 2018
caa9c0f
1.21.0-pre
mkendall07 Aug 14, 2018
5e430e3
Added render param in Sonobi adapter (#2970)
jeteve Aug 15, 2018
2fb1d95
AJA adapter (#2934)
yoshito0523 Aug 15, 2018
ee02e13
Add DivReach adapter (#2946)
AdmixerTech Aug 15, 2018
ab2d7fc
Add adUnitCode to LockerDome bid requests (#2979)
margsliu Aug 16, 2018
17f11da
AdForm Adapter - setting alias code in received bids (#2976)
Saigredan Aug 16, 2018
014fffe
changing rubicon endpoint to openrtb2 endpoint (#2996)
bretg Aug 20, 2018
db2fdfa
SomoAudience Adapter Enhancements (#2986)
SuprPhatAnon Aug 20, 2018
e36f10e
Audience Network: correct TTL, allow platform override (#2974)
lovell Aug 20, 2018
c09d9db
fix tests running in headless chrome inside a docker environment (#2965)
danielrussellLA Aug 20, 2018
18bf1a1
33Across: GDPR compliancy (#2985)
curlyblueeagle Aug 20, 2018
65df3bb
Appnexus adaptor - Added App parameters for hybrid apps. (#2973)
aneuway2 Aug 21, 2018
dc8c822
fix lint errors in 33across files (#3002)
jsnellbaker Aug 21, 2018
031943c
fix getHighestCpmBids function (#2990)
jaiminpanchal27 Aug 21, 2018
7546257
Update from travis to circle CI in release documentation
snapwich Aug 21, 2018
7442613
moved assignment of `bid.getCpmInNewCurrency` function for currency (…
snapwich Aug 21, 2018
40c368f
Prebid 1.21.0 Release
snapwich Aug 21, 2018
11ec22a
Increment pre version
snapwich Aug 21, 2018
e1e03db
update gulp test to include lint (#3003)
jsnellbaker Aug 22, 2018
322a7b8
AdOcean adapter: GDPR support (#2988)
jdrobiecki Aug 22, 2018
3838a8f
update appnexus md file with working examples (#3014)
jsnellbaker Aug 23, 2018
ab2c050
support gdpr for one video adapter (#2981)
ankur-modi Aug 23, 2018
d4006f1
Merge branch 'master' of https://github.com/prebid/Prebid.js into ENG…
nicgallardo Aug 24, 2018
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Code Climate](https://codeclimate.com/github/prebid/Prebid.js/badges/gpa.svg)](https://codeclimate.com/github/prebid/Prebid.js)
[![Coverage Status](https://coveralls.io/repos/github/prebid/Prebid.js/badge.svg)](https://coveralls.io/github/prebid/Prebid.js)
[![devDependencies Status](https://david-dm.org/prebid/Prebid.js/dev-status.svg)](https://david-dm.org/prebid/Prebid.js?type=dev)
[![Total Alerts](https://img.shields.io/lgtm/alerts/g/prebid/Prebid.js.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/prebid/Prebid.js/alerts/)

# Prebid.js 1.9

Expand Down
2 changes: 1 addition & 1 deletion RELEASE_SCHEDULE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Announcements regarding releases will be made to the #headerbidding-dev channel

## Release Process

1. Make Sure all browserstack tests are passing. On PR merge to master travis will run unit tests on browserstack. Checking the last travis build [here](https://travis-ci.org/prebid/Prebid.js/branches) for master branch will show you detailed results.
1. Make Sure all browserstack tests are passing. On PR merge to master CircleCI will run unit tests on browserstack. Checking the last CircleCI build [here](https://circleci.com/gh/prebid) for master branch will show you detailed results.

In case of failure do following,
- Try to fix the failing tests.
Expand Down
8 changes: 4 additions & 4 deletions governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

This document describes the governance model for the Prebid project. The Prebid project’s stated mission is to facilitate fair, transparent, and effective header bidding across the industry, and is responsible for creating and maintaining such projects as [Prebid.js](https://github.com/prebid/Prebid.js).

1. A single Tech Lead oversees the technical direction of the project and appoints Core Team members
1. A single Tech Lead (PMC Chair) oversees the technical direction of the project and appoints Core Team members
2. The Core Team members maintain the project on an ongoing basis with direction from the Tech Lead.
3. In the event of any disagreements, the Tech Lead will make a final decision.
4. If there is no Tech Lead available to perform his/her duties, AppNexus Inc. will appoint one.
4. If there is no Tech Lead available to perform his/her duties, Prebid.org will appoint one.

### Roles and Responsibilities:
- **User:** Any individual who consumes / uses the Prebid.js library.
Expand All @@ -15,9 +15,9 @@ This document describes the governance model for the Prebid project. The Prebid

### Current Prebid.js Core Team
- @mkendall07 (Tech Lead)
- @protonate
- @jsnellbaker
- @matthewlane
- @jaiminpanchal27
- @snapwich
- @harpere
- @dbemiller
- @mike-chowla
34 changes: 17 additions & 17 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var port = 9999;
// Tasks
gulp.task('default', ['webpack']);

gulp.task('serve', ['lint', 'build-bundle-dev', 'watch', 'test']);
gulp.task('serve', ['build-bundle-dev', 'watch', 'test']);

gulp.task('serve-nw', ['lint', 'watch', 'e2etest']);

Expand All @@ -49,8 +49,8 @@ gulp.task('build', ['build-bundle-prod']);

gulp.task('clean', function () {
return gulp.src(['build'], {
read: false
})
read: false
})
.pipe(clean());
});

Expand Down Expand Up @@ -78,13 +78,13 @@ var explicitModules = [

function bundle(dev, moduleArr) {
var modules = moduleArr || helpers.getArgModules(),
allModules = helpers.getModuleNames(modules);
allModules = helpers.getModuleNames(modules);

if(modules.length === 0) {
if (modules.length === 0) {
modules = allModules.filter(module => !explicitModules.includes(module));
} else {
var diff = _.difference(modules, allModules);
if(diff.length !== 0) {
if (diff.length !== 0) {
throw new gutil.PluginError({
plugin: 'bundle',
message: 'invalid modules: ' + diff.join(', ')
Expand All @@ -106,13 +106,13 @@ function bundle(dev, moduleArr) {
gutil.log('Generating bundle:', outputFileName);

return gulp.src(
entries
)
entries
)
.pipe(gulpif(dev, sourcemaps.init({loadMaps: true})))
.pipe(concat(outputFileName))
.pipe(gulpif(!argv.manualEnable, footer('\n<%= global %>.processQueue();', {
global: prebid.globalVarName
}
global: prebid.globalVarName
}
)))
.pipe(gulpif(dev, sourcemaps.write('.')));
}
Expand Down Expand Up @@ -186,7 +186,7 @@ gulp.task('webpack', ['clean'], function () {
// If --file "<path-to-test-file>" is given, the task will only run tests in the specified file.
// If --browserstack is given, it will run the full suite of currently supported browsers.
// If --browsers is given, browsers can be chosen explicitly. e.g. --browsers=chrome,firefox,ie9
gulp.task('test', ['clean'], function (done) {
gulp.task('test', ['clean', 'lint'], function (done) {
var karmaConf = karmaConfMaker(false, argv.browserstack, argv.watch, argv.file);

var browserOverride = helpers.parseBrowserArgs(argv).map(helpers.toCapitalCase);
Expand Down Expand Up @@ -229,7 +229,7 @@ gulp.task('watch', function () {
'modules/**/*.js',
'test/spec/**/*.js',
'!test/spec/loaders/**/*.js'
], ['lint', 'build-bundle-dev', 'test']);
], ['build-bundle-dev', 'test']);
gulp.watch([
'loaders/**/*.js',
'test/spec/loaders/**/*.js'
Expand Down Expand Up @@ -264,7 +264,7 @@ gulp.task('docs', ['clean-docs'], function () {

gulp.task('e2etest', ['devpack', 'webpack'], function() {
var cmdQueue = [];
if(argv.browserstack) {
if (argv.browserstack) {
var browsers = require('./browsers.json');
delete browsers['bs_ie_9_windows_7'];

Expand All @@ -276,11 +276,11 @@ gulp.task('e2etest', ['devpack', 'webpack'], function() {

var startWith = 'bs';

Object.keys(browsers).filter(function(v){
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) {
}).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);
}
Expand Down
9 changes: 4 additions & 5 deletions integrationExamples/gpt/prebidServer_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
var PREBID_TIMEOUT = 3000;

var googletag = googletag || {};
var sizes = [[728, 90],[300, 250], [300,600]];
googletag.cmd = googletag.cmd || [];

function initAdserver() {
Expand Down Expand Up @@ -37,12 +36,12 @@
pbjs.que.push(function() {
var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
sizes: [[300, 250], [300,600]],
sizes: [[300, 250]],
bids: [
{
bidder: 'appnexus',
params: {
placementId: '10433394'
placementId: '13144370'
}
}
]
Expand All @@ -56,7 +55,7 @@
bidders : ['appnexus'],
timeout : 1000, //default value is 1000
adapter : 'prebidServer', //if we have any other s2s adapter, default value is s2s
endpoint : 'https://prebid.adnxs.com/pbs/v1/auction?url_override=http%3A%2F%2Fwww.nytimes.com'
endpoint : 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction'
}
});

Expand All @@ -72,7 +71,7 @@

<script>
googletag.cmd.push(function() {
var rightSlot = googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());
var rightSlot = googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());

pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync();
Expand Down
14 changes: 13 additions & 1 deletion karma.conf.maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,19 @@ function setBrowsers(karmaConf, browserstack) {
karmaConf.customLaunchers = require('./browsers.json')
karmaConf.browsers = Object.keys(karmaConf.customLaunchers);
} else {
karmaConf.browsers = ['ChromeHeadless'];
var isDocker = require('is-docker')();
if (isDocker) {
karmaConf.customLaunchers = karmaConf.customLaunchers || {};
karmaConf.customLaunchers.ChromeCustom = {
base: 'ChromeHeadless',
// We must disable the Chrome sandbox when running Chrome inside Docker (Chrome's sandbox needs
// more permissions than Docker allows by default)
flags: ['--no-sandbox']
}
karmaConf.browsers = ['ChromeCustom'];
} else {
karmaConf.browsers = ['ChromeHeadless'];
}
}
}

Expand Down
39 changes: 32 additions & 7 deletions modules/33acrossBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ function _createBidResponse(response) {
}
}

// infer the necessary data from valid bid for a minimal ttxRequest and create HTTP request
function _createServerRequest(bidRequest) {
// Infer the necessary data from valid bid for a minimal ttxRequest and create HTTP request
// NOTE: At this point, TTX only accepts request for a single impression
function _createServerRequest(bidRequest, gdprConsent) {
const ttxRequest = {};
const params = bidRequest.params;

Expand All @@ -48,6 +49,18 @@ function _createServerRequest(bidRequest) {
// therefore in ad targetting process
ttxRequest.id = bidRequest.bidId;

// Set GDPR related fields
ttxRequest.user = {
ext: {
consent: gdprConsent.consentString
}
}
ttxRequest.regs = {
ext: {
gdpr: (gdprConsent.gdprApplies === true) ? 1 : 0
}
}

// Finally, set the openRTB 'test' param if this is to be a test bid
if (params.test === 1) {
ttxRequest.test = 1;
Expand Down Expand Up @@ -104,11 +117,18 @@ function isBidRequestValid(bid) {
return true;
}

// NOTE: At this point, TTX only accepts request for a single impression
function buildRequests(bidRequests) {
// NOTE: With regards to gdrp consent data,
// - the server independently infers gdpr applicability therefore, setting the default value to false
// - the server, at this point, also doesn't need the consent string to handle gdpr compliance. So passing
// value whether set or not, for the sake of future dev.
function buildRequests(bidRequests, bidderRequest) {
const gdprConsent = Object.assign({ consentString: undefined, gdprApplies: false }, bidderRequest && bidderRequest.gdprConsent)

adapterState.uniqueSiteIds = bidRequests.map(req => req.params.siteId).filter(uniques);

return bidRequests.map(_createServerRequest);
return bidRequests.map((req) => {
return _createServerRequest(req, gdprConsent);
});
}

// NOTE: At this point, the response from 33exchange will only ever contain one bid i.e. the highest bid
Expand All @@ -124,8 +144,13 @@ function interpretResponse(serverResponse, bidRequest) {
}

// Register one sync per unique guid
function getUserSyncs(syncOptions) {
return (syncOptions.iframeEnabled) ? adapterState.uniqueSiteIds.map(_createSync) : ([]);
// NOTE: If gdpr applies do not sync
function getUserSyncs(syncOptions, responses, gdprConsent) {
if (gdprConsent && gdprConsent.gdprApplies === true) {
return []
} else {
return (syncOptions.iframeEnabled) ? adapterState.uniqueSiteIds.map(_createSync) : ([]);
}
}

const spec = {
Expand Down
3 changes: 2 additions & 1 deletion modules/adformBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const spec = {
var request = [];
var globalParams = [ [ 'adxDomain', 'adx.adform.net' ], [ 'fd', 1 ], [ 'url', null ], [ 'tid', null ] ];
var bids = JSON.parse(JSON.stringify(validBidRequests));
var bidder = (bids[0] && bids[0].bidder) || BIDDER_CODE
for (i = 0, l = bids.length; i < l; i++) {
bid = bids[i];
if ((bid.params.priceType === 'net') || (bid.params.pt === 'net')) {
Expand Down Expand Up @@ -60,7 +61,7 @@ export const spec = {
url: request.join('&'),
bids: validBidRequests,
netRevenue: netRevenue,
bidder: 'adform',
bidder,
gdpr: gdprObject
};

Expand Down
16 changes: 10 additions & 6 deletions modules/adoceanBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ function buildEndpointUrl(emiter, payload) {
return 'https://' + emiter + '/ad.json?' + payloadString;
}

function buildRequest(masterBidRequests, masterId) {
function buildRequest(masterBidRequests, masterId, gdprConsent) {
const firstBid = masterBidRequests[0];
const payload = {
id: masterId,
};
if (gdprConsent) {
payload.gdpr_consent = gdprConsent.consentString || undefined;
payload.gdpr = gdprConsent.gdprApplies ? 1 : 0;
}

const bidIdMap = {};

Expand Down Expand Up @@ -72,15 +76,15 @@ export const spec = {
return !!(bid.params.slaveId && bid.params.masterId && bid.params.emiter);
},

buildRequests: function(validBidRequests) {
buildRequests: function(validBidRequests, bidderRequest) {
const bidRequestsByMaster = {};
let requests = [];

utils._each(validBidRequests, function(v) {
assignToMaster(v, bidRequestsByMaster);
utils._each(validBidRequests, function(bidRequest) {
assignToMaster(bidRequest, bidRequestsByMaster);
});
requests = utils._map(bidRequestsByMaster, function(v, k) {
return buildRequest(v, k);
requests = utils._map(bidRequestsByMaster, function(requests, masterId) {
return buildRequest(requests, masterId, bidderRequest.gdprConsent);
});

return requests;
Expand Down
Loading