Skip to content

Commit

Permalink
Merge branch 'master' into userSync_changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnellbaker committed May 31, 2018
2 parents 47a34e2 + 476cad8 commit 73828f5
Show file tree
Hide file tree
Showing 149 changed files with 15,932 additions and 10,772 deletions.
19 changes: 15 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
{
"presets": ["es2015"],
"presets": [
["env", {
"targets": {
"browsers": [
"chrome >= 61",
"safari >=8",
"edge >= 14",
"ff >= 57",
"ie >= 10",
"ios >= 8"
]
}
}]
],
"plugins": [
"transform-object-assign",
"transform-es3-property-literals",
"transform-es3-member-expression-literals"
"transform-object-assign"
]
}
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ notifications:
on_success: never
on_failure: always
on_pull_requests: false
secure: C4O77VtABLE5DiPDeKGqUcsBdTBMNjQRLc8iBfSp231e95K1rA/JXJJEQN/lVhhiFJyPhxueE0i6cR0zD8uAMC8HRShGGfPjEZ7f6glawPzap2wFwjAyVkknYV+BMKcX0jvn7CiSKBj+zTbHQfn/Uj3nMSbDZQIdbNDiFGh4NuDr3/Yd/efhsw/miExlSPSWqGVCKV3WPpTrU3BRpLNDq4sZMXP9ORZxGK7ER3tsMiD2z05YpvC+mibESJxaY0qsuQu1y1Gu65QLPe5ocw405btJwqYn+b4YFpUd2GbLNhjtLzsc+OKrD0DWuEI0bxePQUYDga5wR6g4cdZaXU3ixDjee7sJbDeVJAuykGlfZ4A1k+fQIgPs3s9XMHaeG9AfDhFiZ/UoNdonzos1iSa/Y1TzHIXp1wnbHKT5HUWWPFNb5PzJxHEtHbm3jwOH4iK8VAq94ec16M2aqUAj7muiqcrTlYa5rs6jRlXo/TRymFnbQRdBT7eLmLNDQD35yR1Y+4mxHqKi+3189yG9RE+uwIlB+9HZFgNbioOApB+jarKC6M0qEgn0bHxkpJBP8JmNCA84U0ZUzyPvuMGsRbisAmKoUsU8C6cq59QDfBTcCTvKXK6r+6f23iRGieoGSbTxYQj46QkykpbWU0WstQDQsZL3L316uZecOVZmWKBRxPs=
rooms:
- secure: C4O77VtABLE5DiPDeKGqUcsBdTBMNjQRLc8iBfSp231e95K1rA/JXJJEQN/lVhhiFJyPhxueE0i6cR0zD8uAMC8HRShGGfPjEZ7f6glawPzap2wFwjAyVkknYV+BMKcX0jvn7CiSKBj+zTbHQfn/Uj3nMSbDZQIdbNDiFGh4NuDr3/Yd/efhsw/miExlSPSWqGVCKV3WPpTrU3BRpLNDq4sZMXP9ORZxGK7ER3tsMiD2z05YpvC+mibESJxaY0qsuQu1y1Gu65QLPe5ocw405btJwqYn+b4YFpUd2GbLNhjtLzsc+OKrD0DWuEI0bxePQUYDga5wR6g4cdZaXU3ixDjee7sJbDeVJAuykGlfZ4A1k+fQIgPs3s9XMHaeG9AfDhFiZ/UoNdonzos1iSa/Y1TzHIXp1wnbHKT5HUWWPFNb5PzJxHEtHbm3jwOH4iK8VAq94ec16M2aqUAj7muiqcrTlYa5rs6jRlXo/TRymFnbQRdBT7eLmLNDQD35yR1Y+4mxHqKi+3189yG9RE+uwIlB+9HZFgNbioOApB+jarKC6M0qEgn0bHxkpJBP8JmNCA84U0ZUzyPvuMGsRbisAmKoUsU8C6cq59QDfBTcCTvKXK6r+6f23iRGieoGSbTxYQj46QkykpbWU0WstQDQsZL3L316uZecOVZmWKBRxPs=
1 change: 1 addition & 0 deletions PR_REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ For modules and core platform updates, the initial reviewer should request an ad
- Adapters may not use the $$PREBID_GLOBAL$$ variable
- All adapters must support the creation of multiple concurrent instances. This means, for example, that adapters cannot rely on mutable global variables.
- Adapters may not globally override or default the standard ad server targeting values: hb_adid, hb_bidder, hb_pb, hb_deal, or hb_size, hb_source, hb_format.
- After a new adapter is approved, let the submitter know they may open a PR in the [headerbid-expert repository](https://github.com/prebid/headerbid-expert) to have their adapter recognized by the [Headerbid Expert extension](https://chrome.google.com/webstore/detail/headerbid-expert/cgfkddgbnfplidghapbbnngaogeldmop). The PR should be to the [bidder patterns file](https://github.com/prebid/headerbid-expert/blob/master/bidderPatterns.js), adding an entry with their adapter's name and the url the adapter uses to send and receive bid responses.

## Ticket Coordinator

Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,6 @@ To run the unit tests:
```bash
gulp test
```
To run tests for a single file:

```bash
gulp test --file "path/to/spec/file.js"
```

To generate and view the code coverage reports:

Expand Down
87 changes: 85 additions & 2 deletions RELEASE_SCHEDULE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Release Schedule
**Table of Contents**
- [Release Schedule](#release-schedule)
- [Release Process](#release-process)
- [FAQs](#faqs)

## Release Schedule

We push a new release of Prebid.js every other week on Tuesday. During the adoption phase for 1.x, we are releasing updates for 1.x and 0.x at the same time.

Expand All @@ -9,7 +14,85 @@ You can determine what is in a given build using the [releases page](https://git

Announcements regarding releases will be made to the #headerbidding-dev channel in subredditadops.slack.com.

# FAQs
## 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.

In case of failure do following,
- Try to fix the failing tests.
- If you are not able to fix tests in time. Skip the test, create issue and tag contributor.

#### How to run tests in browserstack

Set the environment variables. You may want to add these to your `~/.bashrc` for convenience.

```
export BROWSERSTACK_USERNAME="my browserstack username"
export BROWSERSTACK_ACCESS_KEY="my browserstack access key"
```

```
gulp test --browserstack >> prebid_test.log
vim prebid_test.log // Will show the test results
```


2. Prepare Prebid Code

Update the package.json version to become the current release. Then commit your changes.

```
git commit -m "Prebid 1.x.x Release"
git push
```

3. Verify Release

Make sure your there are no more merges to master branch. Prebid code is clean and up to date.

4. Create a GitHub release

Edit the most recent [release notes](https://github.com/prebid/Prebid.js/releases) draft and make sure the correct tag is in the dropdown. Click `Publish`. GitHub will create release tag.

Pull these changes locally by running command
```
git pull
```

and verify the tag.

5. Update coveralls

We use https://coveralls.io/ to show parts of code covered by unit tests.

Set the environment variables. You may want to add these to your `~/.bashrc` for convenience.
```
export COVERALLS_SERVICE_NAME="travis-ci"
export COVERALLS_REPO_TOKEN="talk to Matt Kendall"
```

Run `gulp coveralls` to update code coverage history.

6. Distribute the code

Reach out to any of the Appnexus folks to trigger the jenkins job.

// TODO
Jenkins job is moving files to appnexus cdn, pushing prebid.js to npm, purging cache and sending notification to slack.
Move all the files from Appnexus CDN to jsDelivr and create bash script to do above tasks.

7. Post Release Steps

Update the version
Manually edit Prebid's package.json to become "1.x.x-pre" (using the values for the next release). Then commit your changes.
```
git commit -m "Increment pre version"
git push
```


## FAQs

**1. Is there flexibility in the 2-week schedule?**

Expand Down
78 changes: 76 additions & 2 deletions integrationExamples/gpt/gdpr_hello_world.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,81 @@
<html>
<head>
<script>window.__cmp = {config: {logging: 'debug'}}</script>
<script src="//acdn.adnxs.com/cmp/cmp.complete.bundle.js" async></script>
<script>
(function(window, document) {
if (!window.__cmp) {
window.__cmp = (function() {
var listen = window.attachEvent || window.addEventListener;
listen('message', function(event) {
window.__cmp.receiveMessage(event);
}, false);

function addLocatorFrame() {
if (!window.frames['__cmpLocator']) {
if (document.body) {
var frame = document.createElement('iframe');
frame.style.display = 'none';
frame.name = '__cmpLocator';
document.body.appendChild(frame);
} else {
setTimeout(addLocatorFrame, 5);
}
}
}
addLocatorFrame();

var commandQueue = [];
var cmp = function(command, parameter, callback) {
if (command === 'ping') {
if (callback) {
callback({
gdprAppliesGlobally: !!(window.__cmp && window.__cmp.config && window.__cmp.config.storeConsentGlobally),
cmpLoaded: false
});
}
} else {
commandQueue.push({
command: command,
parameter: parameter,
callback: callback
});
}
}
cmp.commandQueue = commandQueue;
cmp.receiveMessage = function(event) {
var data = event && event.data && event.data.__cmpCall;
if (data) {
commandQueue.push({
callId: data.callId,
command: data.command,
parameter: data.parameter,
event: event
});
}
};
cmp.config = {
//
// Modify config values here
//
// globalVendorListLocation: 'https://vendorlist.consensu.org/vendorlist.json',
// customPurposeListLocation: './purposes.json',
// globalConsentLocation: './portal.html',
// storeConsentGlobally: false,
// storePublisherData: false,
logging: 'debug',
// localization: {},
// forceLocale: 'en-us'
}
return cmp;
}());
var t = document.createElement('script');
t.async = false;
t.src = 'http://acdn.adnxs.com/cmp/cmp.bundle.js';
var tag = document.getElementsByTagName('head')[0];
tag.appendChild(t);
}
})(window, document);
window.__cmp('showConsentTool');
</script>

<script>
var PREBID_TIMEOUT = 700;
Expand Down
3 changes: 2 additions & 1 deletion karma.conf.maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ module.exports = function(codeCoverage, browserstack, watchMode, file) {

reporters: ['mocha'],
mochaReporter: {
showDiff: true
showDiff: true,
output: 'minimal'
},

// Continuous Integration mode
Expand Down
25 changes: 17 additions & 8 deletions modules/a4gBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const spec = {
return bid.params && !!bid.params.zoneId;
},

buildRequests: function(validBidRequests) {
buildRequests: function(validBidRequests, bidderRequest) {
let deliveryUrl = '';
const idParams = [];
const sizeParams = [];
Expand All @@ -41,16 +41,25 @@ export const spec = {
deliveryUrl = A4G_DEFAULT_BID_URL;
}

let data = {
[IFRAME_PARAM_NAME]: 0,
[LOCATION_PARAM_NAME]: utils.getTopWindowUrl(),
[SIZE_PARAM_NAME]: sizeParams.join(ARRAY_PARAM_SEPARATOR),
[ID_PARAM_NAME]: idParams.join(ARRAY_PARAM_SEPARATOR),
[ZONE_ID_PARAM_NAME]: zoneIds.join(ARRAY_PARAM_SEPARATOR)
};

if (bidderRequest && bidderRequest.gdprConsent) {
data.gdpr = {
applies: bidderRequest.gdprConsent.gdprApplies,
consent: bidderRequest.gdprConsent.consentString
};
}

return {
method: 'GET',
url: deliveryUrl,
data: {
[IFRAME_PARAM_NAME]: 0,
[LOCATION_PARAM_NAME]: utils.getTopWindowUrl(),
[SIZE_PARAM_NAME]: sizeParams.join(ARRAY_PARAM_SEPARATOR),
[ID_PARAM_NAME]: idParams.join(ARRAY_PARAM_SEPARATOR),
[ZONE_ID_PARAM_NAME]: zoneIds.join(ARRAY_PARAM_SEPARATOR)
}
data: data
};
},

Expand Down
Loading

0 comments on commit 73828f5

Please sign in to comment.