Skip to content

Commit

Permalink
ENG-623
Browse files Browse the repository at this point in the history
  • Loading branch information
aecook committed Apr 30, 2018
2 parents 95aab26 + 2304848 commit 6bbf7a7
Show file tree
Hide file tree
Showing 101 changed files with 12,184 additions and 14,521 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ module.exports = {
"browser": true,
"commonjs": true
},
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": ["node_modules", "./"]
}
}
},
"extends": "standard",
"globals": {
"$$PREBID_GLOBAL$$": false
Expand Down
35 changes: 22 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
sudo: required

dist: trusty

language: node_js

node_js:
- "7.0"

# See https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-the-Chrome-addon-in-the-headless-mode
- '7.0'
env:
- BROWSERSTACK_USERNAME=info184
addons:
chrome: stable

chrome: stable,
browserstack:
username: info184
access_key:
secure: Ru286R4pMcEIRKwb2AoaaJY6lEKIzeZraxY7CtbOP4ykNk7uqsnyitk4QwxpCCh0n35b71m30okW6ZmZnl0lJXhOMdYoSOYBAnUw2Vn7Y93oMSKIC5dc2/qmtF1t2b1qX65/Ont2iJUj+UY8VQw5Hk2vIT4/5wifYPBnV5ILK4AI7SVk/ma7OzK4rkp3WThlouddctAd7tx4O3YIyJKDi9lkfcMA0pnH4OZSOlDClRLIy50Q1NE+iyqHtWFZK1TwJ+IhQbSsCLbuyQJBRnyJJEftNmtrs5MCZt/9pwFDj7c8+o11F6HCsTBYFkehFRfbKnmhCc1G+bsNXY8OxIWwEHeuVmSGK7TDPYcPPQBc03mcQ1fY/IPNQOdsVJ/n8RsG2u0IU2CF2hhkuNFzeov7dOHljanc45NKOrLdjwzP1aZCAUvLquOTzvmdF23nJhMs8UO+Du4kTK5VfmKyz1MC91E40a0Q15+O4qmS39rNOlwhxPJSfuxxL1jKVPJ7PsFbTkGM8M/XPJ6dyGLufy225HjdLdJTAOa5BZ4st+nXH/AzqHzy6a2I5vTmAz1j4gHLgVU+iNxAkX8znb25s3Rs1ZuFVj+aBSBmNoQA1FA5f/uXWeruTdDig7ksp+XdjsjLm9Md8cWwYaEn04FYj1ztJrylrEMfnc0Kcs6zQ3fll1g=
before_install:
- npm install -g gulp
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &

script:
- gulp run-tests
- npm install -g gulp
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
script: |-
if [[ ${TRAVIS_PULL_REQUEST} == "false" ]]; then
gulp test --browserstack
else
gulp run-tests
fi
notifications:
slack:
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=
148 changes: 14 additions & 134 deletions browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,94 +15,38 @@
"device": null,
"os": "Windows"
},
"bs_firefox_56_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "firefox",
"browser_version": "56.0",
"device": null,
"os": "Windows"
},
"bs_chrome_62_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "chrome",
"browser_version": "51.0",
"device": null,
"os": "Windows"
},
"bs_ie_11_windows_8.1": {
"base": "BrowserStack",
"os_version": "8.1",
"browser": "ie",
"browser_version": "11.0",
"device": null,
"os": "Windows"
},
"bs_firefox_56_windows_8.1": {
"base": "BrowserStack",
"os_version": "8.1",
"browser": "firefox",
"browser_version": "56.0",
"device": null,
"os": "Windows"
},
"bs_chrome_62_windows_8.1": {
"base": "BrowserStack",
"os_version": "8.1",
"browser": "chrome",
"browser_version": "62.0",
"device": null,
"os": "Windows"
},
"bs_firefox_56_windows_8": {
"base": "BrowserStack",
"os_version": "8",
"browser": "firefox",
"browser_version": "56.0",
"device": null,
"os": "Windows"
},
"bs_chrome_62_windows_8": {
"bs_chrome_61_windows_10": {
"base": "BrowserStack",
"os_version": "8",
"os_version": "10",
"browser": "chrome",
"browser_version": "62.0",
"device": null,
"os": "Windows"
},
"bs_ie_11_windows_7": {
"base": "BrowserStack",
"os_version": "7",
"browser": "ie",
"browser_version": "11.0",
"browser_version": "61.0",
"device": null,
"os": "Windows"
},
"bs_firefox_56_windows_7": {
"bs_firefox_58_windows_10": {
"base": "BrowserStack",
"os_version": "7",
"os_version": "10",
"browser": "firefox",
"browser_version": "56.0",
"browser_version": "58.0",
"device": null,
"os": "Windows"
},
"bs_chrome_62_windows_7": {
"bs_firefox_57_windows_10": {
"base": "BrowserStack",
"os_version": "7",
"browser": "chrome",
"browser_version": "62.0",
"os_version": "10",
"browser": "firefox",
"browser_version": "57.0",
"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 All @@ -111,22 +55,6 @@
"device": null,
"os": "OS X"
},
"bs_firefox_56_mac_elcapitan": {
"base": "BrowserStack",
"os_version": "El Capitan",
"browser": "firefox",
"browser_version": "56.0",
"device": null,
"os": "OS X"
},
"bs_chrome_62_mac_elcapitan": {
"base": "BrowserStack",
"os_version": "El Capitan",
"browser": "chrome",
"browser_version": "62.0",
"device": null,
"os": "OS X"
},
"bs_safari_8_mac_yosemite": {
"base": "BrowserStack",
"os_version": "Yosemite",
Expand All @@ -135,52 +63,12 @@
"device": null,
"os": "OS X"
},
"bs_firefox_56_mac_yosemite": {
"base": "BrowserStack",
"os_version": "Yosemite",
"browser": "firefox",
"browser_version": "56.0",
"device": null,
"os": "OS X"
},
"bs_chrome_62_mac_yosemite": {
"base": "BrowserStack",
"os_version": "Yosemite",
"browser": "chrome",
"browser_version": "51.0",
"device": null,
"os": "OS X"
},
"bs_safari_7.1_mac_mavericks": {
"base": "BrowserStack",
"os_version": "Mavericks",
"browser": "safari",
"browser_version": "7.1",
"device": null,
"os": "OS X"
},
"bs_firefox_56_mac_mavericks": {
"base": "BrowserStack",
"os_version": "Mavericks",
"browser": "firefox",
"browser_version": "56.0",
"device": null,
"os": "OS X"
},
"bs_chrome_49_mac_mavericks": {
"base": "BrowserStack",
"os_version": "Mavericks",
"browser": "chrome",
"browser_version": "49.0",
"device": null,
"os": "OS X"
},
"bs_ios_7": {
"bs_ios_9": {
"base": "BrowserStack",
"os": "ios",
"os_version": "7.0",
"os_version": "9.1",
"browser": "iphone",
"device": "iPhone 5S",
"device": "iPhone 6S",
"browser_version": null
},
"bs_ios_8": {
Expand All @@ -190,13 +78,5 @@
"browser": "iphone",
"device": "iPhone 6",
"browser_version": null
},
"bs_ios_9": {
"base": "BrowserStack",
"os": "ios",
"os_version": "9.1",
"browser": "iphone",
"device": "iPhone 6S",
"browser_version": null
}
}
}
6 changes: 5 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ function newKarmaCallback(done) {
if (exitCode) {
done(new Error('Karma tests failed with exit code ' + exitCode));
} else {
done();
if (argv.browserstack) {
process.exit(0);
} else {
done();
}
}
}
}
Expand Down
120 changes: 120 additions & 0 deletions integrationExamples/gpt/unruly_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<!DOCTYPE html>
<html>
<head>
<!-- Prebid Config Section START -->
<!-- Make sure this is inserted before your GPT tag -->
<script>
var PREBID_TIMEOUT = 3000;

var adUnits = [{
code: 'ad-slot',
sizes: [[728, 90], [300, 250]],
mediaTypes: {
video: {
context: 'outstream'
}
},
bids: [{
bidder: 'unruly',
params: {
targetingUUID: '6f15e139-5f18-49a1-b52f-87e5e69ee65e',
siteId: 1081534
}
}
]
}];
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

(function() {
var pbjsEl = document.createElement("script");
pbjsEl.type = "text/javascript";
pbjsEl.async = true;
pbjsEl.src = '/build/dev/prebid.js';
var pbjsTargetEl = document.getElementsByTagName("head")[0];
pbjsTargetEl.insertBefore(pbjsEl, pbjsTargetEl.firstChild);
})();

</script>
<!-- Prebid Config Section END -->

<!-- Prebid Boilerplate Section START. No Need to Edit. -->
<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});


pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest
});
pbjs.setConfig({
"currency": {
"adServerCurrency": "USD",
}
});
});

function sendAdserverRequest() {
if (pbjs.adserverRequestSent)
return;
pbjs.adserverRequestSent = true;
googletag.cmd.push(function () {
pbjs.que.push(function () {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}
;

setTimeout(function () {
sendAdserverRequest();
}, PREBID_TIMEOUT);

</script>
<!-- Prebid Boilerplate Section END -->

<script>
(function () {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>

<script>
googletag.cmd.push(function () {
googletag.defineSlot('/19968336/header-bid-tag1', [[728, 90], [300, 250]], 'ad-slot').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>

<style>
body {
margin: 0;
padding: 0;
}
</style>
<title>test</title>
</head>

<body>
<div id='ad-slot'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('ad-slot'); });
</script>
</div>

</body>
</html>
Loading

0 comments on commit 6bbf7a7

Please sign in to comment.