Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request prebid#58 in AOLP_ADS_JS/prebid.js from release/1.…
Browse files Browse the repository at this point in the history
…8.0 to master

* commit '997aa5bce17aafd6b215d335551e89757f92bf3e': (37 commits)
  CHANGELOG.
  CHANGELOG
  Add new adapters for AOL analytics.
  Prebid 0.15.2 Release
  Fix issue with building prebid from npm install. Babel loader was being skipped because of the project residing in /node_modules/ directory. (prebid#820)
  Increment pre version
  Prebid 0.15.1 Release
  Update bidFloor->bidfloor to match other bidders + updated conversant docs (prebid#818)
  Correct 'bidloor' typo in Conversant adapter (prebid#815)
  Increment pre version
  0.15.0 release
  support IE userLanguage Navigator property (prebid#807)
  exclude node_modules from babel-loader as to prevent strict mode errors (prebid#806)
  PulsePoint Adapter - Support for additional parameters. (prebid#784)
  Fix 'skippable' targeting typo (prebid#804)
  Adding adKernel adapter (prebid#739)
  Babel plugin fixes to make the generated code syntax valid in ie8 (prebid#799)
  Vertoz Adapter (prebid#789)
  RubiconLite is now just Rubicon and "rubicon" aliases "rubiconLite" (prebid#783)
  add version to global namespace (prebid#794)
  ...
  • Loading branch information
Pereira, Marcio committed Dec 16, 2016
2 parents a3ee191 + 997aa5b commit c0b731f
Show file tree
Hide file tree
Showing 41 changed files with 2,656 additions and 1,535 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["es2015"],
"plugins": ["transform-object-assign"]
"plugins": ["transform-object-assign", "transform-es3-property-literals", "transform-es3-member-expression-literals"]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build
# Test Files
test/app
gpt.html
gpt-mlane.html
gpt-each-bidder3.html

# Selenium files
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
AOL Prebid 1.8.0
----------------
Updated to Prebid 0.15.2


AOL Prebid 1.7.0
----------------
Updated to Prebid 0.14.0
Expand Down
10 changes: 9 additions & 1 deletion adapters.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
"adbutler",
"adequant",
"adform",
"adkernel",
"admedia",
"aol",
"appnexus",
"appnexusAst",
"conversant",
"getintent",
"hiromedia",
"indexExchange",
Expand All @@ -17,8 +19,8 @@
"piximedia",
"pubmatic",
"pulsepoint",
"rhythmone",
"rubicon",
"rubiconLite",
"sonobi",
"sovrn",
"springserve",
Expand All @@ -32,6 +34,7 @@
"memeglobal",
"centro",
"roxot",
"vertoz",
{
"appnexus": {
"alias": "brealtime"
Expand All @@ -51,5 +54,10 @@
"appnexusAst": {
"supportedMediaTypes": ["video"]
}
},
{
"rubicon": {
"alias": "rubiconLite"
}
}
]
4 changes: 3 additions & 1 deletion integrationExamples/gpt/amp/amp_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ <h1>Welcome to the mobile web</h1>
height="250"
layout="fixed"
type="doubleclick"
json='{"prebid":{"requestBidsDuration":1000,"adUnits":[{"code":"/19968336/header-bid-tag-1","sizes":[[300,250],[300,600],[300,250],[100,100]],"bids":[{"bidder":"appnexusAst","params":{"placementId":"4799418","dealId":"some deal!"}},{"bidder":"aol","params":{"network":"10077.1","placement":3671670}},{"bidder":"sovrn","params":{"tagid":"315045"}}]},{"code":"/19968336/header-bid-tag-2","sizes":[[300,250],[300,600],[300,250],[100,100]],"bids":[{"bidder":"appnexusAst","params":{"placementId":"4799418","dealId":"some deal!"}},{"bidder":"aol","params":{"network":"10077.1","placement":3671670}},{"bidder":"sovrn","params":{"tagid":"315045"}}]}]}}'
data-slot="/19968336/header-bid-tag-1">
</amp-ad>

<amp-ad
<amp-ad
width="300"
height="250"
layout="fixed"
type="doubleclick"
json='{"prebid":{"requestBidsDuration":1000,"adUnits":[{"code":"/19968336/header-bid-tag-1","sizes":[[300,250],[300,600],[300,250],[100,100]],"bids":[{"bidder":"appnexusAst","params":{"placementId":"4799418","dealId":"some deal!"}},{"bidder":"aol","params":{"network":"10077.1","placement":3671670}},{"bidder":"sovrn","params":{"tagid":"315045"}}]},{"code":"/19968336/header-bid-tag-2","sizes":[[300,250],[300,600],[300,250],[100,100]],"bids":[{"bidder":"appnexusAst","params":{"placementId":"4799418","dealId":"some deal!"}},{"bidder":"aol","params":{"network":"10077.1","placement":3671670}},{"bidder":"sovrn","params":{"tagid":"315045"}}]}]}}'
data-slot="/19968336/header-bid-tag-2">
</amp-ad>

Expand Down
65 changes: 7 additions & 58 deletions integrationExamples/gpt/amp/remote.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,61 +28,8 @@
// The Prebid global must match Prebid.js setting
var $$PREBID_GLOBAL$$ = pbjs;
var prebidSrc = 'https://publisher.com:9999/build/dev/prebid.js';
var rightSlotSizes = [[300, 250], [300, 600], [300, 250], [100, 100]];
var adUnits = [
{
code: '/19968336/header-bid-tag-1',
sizes: rightSlotSizes,
bids: [
{
bidder: 'appnexusAst',
params: {
placementId: '4799418',
dealId: 'some deal!'
}
},
{
bidder: 'aol',
params: {
network: '10077.1',
placement: 3671670
}
},
{
bidder: 'sovrn',
params: {
tagid: "315045"
}
}
]
},
{
code: '/19968336/header-bid-tag-2',
sizes: rightSlotSizes,
bids: [
{
bidder: 'appnexusAst',
params: {
placementId: '4799418',
dealId: 'some deal!'
}
},
{
bidder: 'aol',
params: {
network: '10077.1',
placement: 3671670
}
},
{
bidder: 'sovrn',
params: {
tagid: "315045"
}
}
]
}
];
var adUnits;
var requestBidsDuration;

// load Prebid.js
(function () {
Expand All @@ -95,7 +42,6 @@

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var PREBID_TIMEOUT = 3000;

var date = new Date().getTime();

Expand All @@ -114,7 +60,7 @@
initAdserver();
console.log('bidsBackHandler responses: ', bidResponses);
},
timeout: 3000
timeout: requestBidsDuration
});
});
}
Expand Down Expand Up @@ -185,7 +131,10 @@
if (typeof window.context.master.adCalls === 'undefined') {
window.context.master.adCalls = [];
}
if (window.context && window.context.isMaster) {
if (window.context && window.context.isMaster && config.prebid) {
var prebid = config.prebid;
adUnits = prebid.adUnits;
requestBidsDuration = prebid.requestBidsDuration;
loadPrebidJS();
}
window.context.master.adCalls.push(setTargeting.bind(null, config, done));
Expand Down
15 changes: 14 additions & 1 deletion integrationExamples/gpt/pbjs_example_gpt.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,22 @@
{
bidder: 'adblade',
params: {
partnerId: 39875,
partnerId: 42980,
bidfloor: 0.01 // OPTIONAL float bid floor in $ CPM
}
},
{
bidder: 'vertoz',
params:{
placementId:'VZH123' //REQUIRED AD unit id
}
},
{
bidder: 'adkernel',
params: {
zoneId : '30164',
host : 'cpm.metaadserving.com'
}
}
]
}, {
Expand Down
5 changes: 2 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = function (config) {
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: CI_MODE ? ['junit', 'coverage'] : ['progress', 'html', 'nyan', 'coverage'],
reporters: CI_MODE ? ['junit', 'coverage'] : ['progress', 'html', 'coverage'],

// junit reporter config
junitReporter: {
Expand Down Expand Up @@ -115,12 +115,11 @@ module.exports = function (config) {
plugins: [
'karma-browserstack-launcher',
'karma-phantomjs-launcher',
'karma-nyan-reporter',
'karma-coverage',
'karma-es5-shim',
'karma-mocha',
'karma-expect',
'karma-sinon',
'karma-sinon-ie',
'karma-webpack',
'karma-junit-reporter',
'karma-html-reporter',
Expand Down
11 changes: 1 addition & 10 deletions loaders/adapterLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function insertAdapters() {
return '/*!ADAPTER REGISTER DELIMITER*/' + inserts.map(name => {

return `var ${adapterName(name)} = require('./adapters/${name}.js');
exports.registerBidAdapter(new ${adapterName(name)}${useCreateNew(name)}(), '${name}');\n`;
exports.registerBidAdapter(new ${adapterName(name)}(), '${name}');\n`;

})
.concat(customAdapters.map(adapter => {
Expand Down Expand Up @@ -90,15 +90,6 @@ function adapterName(adapter) {
return '';
}

/**
* Some adapters export an object with a `createNew` constructor so accommodate this pattern
* @param adapter
* @returns {string}
*/
function useCreateNew(adapter) {
return ['appnexus', 'appnexusAst'].includes(adapter) ? '.createNew' : '';
}

/**
* Filter an array to return unique values
* @param value current array element value
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prebid.js",
"version": "0.14.0",
"version": "0.15.2",
"description": "Header Bidding Management Library",
"main": "src/prebid.js",
"scripts": {
Expand Down Expand Up @@ -28,6 +28,8 @@
"babel-core": "^6.5.2",
"babel-loader": "^6.2.3",
"babel-plugin-transform-object-assign": "^6.8.0",
"babel-plugin-transform-es3-property-literals": "^6.8.0",
"babel-plugin-transform-es3-member-expression-literals": "^6.8.0",
"babel-preset-es2015": "^6.5.0",
"block-loader": "^2.1.0",
"chai": "^3.3.0",
Expand Down Expand Up @@ -71,14 +73,13 @@
"karma-ie-launcher": "^0.1.5",
"karma-junit-reporter": "^0.3.8",
"karma-mocha": "^0.2.0",
"karma-nyan-reporter": "0.2.2",
"karma-opera-launcher": "^0.1.0",
"karma-phantomjs-launcher": "^0.2.1",
"karma-requirejs": "^0.2.2",
"karma-safari-launcher": "^0.1.1",
"karma-sauce-launcher": "^0.2.10",
"karma-script-launcher": "^0.1.0",
"karma-sinon": "^1.0.4",
"karma-sinon-ie": "^2.0.0-rc10",
"karma-webpack": "^1.5.1",
"localtunnel": "^1.3.0",
"mkpath": "^1.0.0",
Expand Down
4 changes: 4 additions & 0 deletions src/adapters/adblade.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ var AdbladeAdapter = function AdbladeAdapter() {
}

utils._each(bids, function(bid) {
// make sure the "sizes" are an array of arrays
if (!(bid.sizes[0] instanceof Array)) {
bid.sizes = [bid.sizes];
}
utils._each(bid.sizes, function(size) {
let key = size[0] + 'x' + size[1];

Expand Down
Loading

0 comments on commit c0b731f

Please sign in to comment.