Skip to content

Commit

Permalink
Merge pull request #13 from PubMatic-OpenWrap/Prebid-master
Browse files Browse the repository at this point in the history
Prebid master
  • Loading branch information
PubMatic-OpenWrap authored Mar 6, 2018
2 parents d1ceacb + 51decab commit 371e758
Show file tree
Hide file tree
Showing 244 changed files with 39,572 additions and 11,212 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ module.exports = {
// See Issue #1111.
"camelcase": "off",
"eqeqeq": "off",
"no-control-regex": "off",
"no-return-assign": "off",
"no-throw-literal": "off",
"no-undef": "off",
"no-use-before-define": "off",
"no-useless-escape": "off",
"standard/no-callback-literal": "off",
}
};
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Thank you for your pull request. Please make sure this PR is scoped to one chang
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Does this change affect user-facing APIs or examples documented on http://prebid.org?
- [ ] Other

## Description of change
Expand All @@ -32,6 +33,9 @@ Be sure to test the integration with your adserver using the [Hello World](/inte
- contact email of the adapter’s maintainer
- [ ] official adapter submission

For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide:

- A link to a PR on the docs repo at https://github.com/prebid/prebid.github.io/

## Other information
<!-- References to related PR or issue #s, @mentions of the person or team responsible for reviewing changes, etc. -->
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
sudo: required

dist: trusty

language: node_js
Expand Down
3 changes: 0 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ When you are adding code to Prebid.js, or modifying code that isn't covered by a
- _Assert_: check that the expected results have occurred
- e.g., use Chai assertions to check that the expected output is equal to the actual output
- Test the public interface, not the internal implementation
- If using global `pbjs` data structures in your test, take care to not completely overwrite them with your own data as that may affect other tests relying on those structures, e.g.:
- **OK**: `pbjs._bidsRequested.push(bidderRequestObject);`
- **NOT OK**: `pbjs._bidsRequested = [bidderRequestObject];`
- If you need to check `adloader.loadScript` in a test, use a `stub` rather than a `spy`. `spy`s trigger a network call which can result in a `script error` and cause unrelated unit tests to fail. `stub`s will let you gather information about the `adloader.loadScript` call without affecting external resources
- When writing tests you may use ES2015 syntax if desired

Expand Down
46 changes: 46 additions & 0 deletions PR_REVIEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## Summary
We take PR review seriously. Please read https://medium.com/@mrjoelkemp/giving-better-code-reviews-16109e0fdd36#.xa8lc4i23 to understand how a PR review should be conducted. Be rational and strict in your review, make sure you understand exactly what the submitter's intent is. Anyone in the community can review a PR, but a Prebid Org member is also required. A Prebid Org member should take ownership of a PR and do the initial review.

If the PR is for a standard bid adapter or a standard analytics adapter, just the one review from a core member is sufficient. The reviewer will check against [required conventions](http://prebid.org/dev-docs/bidder-adaptor.html#required-adapter-conventions) and may merge the PR after approving and confirming that the documentation PR against prebid.org is open and linked to the issue.

For modules and core platform updates, the initial reviewer should request an additional team member to review as a sanity check. Merge should only happen when the PR has 2 `LGTM` from the core team and a documentation PR if required.

### General PR review Process
- Checkout the branch (these instructions are available on the github PR page as well).
- Verify PR is a single change type. Example, refactor OR bugfix. If more than 1 type, ask submitter to break out requests.
- Verify code under review has at least 80% unit test coverage. If legacy code has no unit test coverage, ask for unit tests to be included in the PR.
- Verify tests are green in Travis-ci + local build by running `gulp serve` | `gulp test`
- Verify no code quality violations are present from linting (should be reported in terminal)
- Review for obvious errors or bad coding practice / use best judgement here.
- If the change is a new feature / change to core prebid.js - review the change with a Tech Lead on the project and make sure they agree with the nature of change.
- If the change results in needing updates to docs (such as public API change, module interface etc), add a label for "needs docs" and inform the submitter they must submit a docs PR to update the appropriate area of Prebid.org **before the PR can merge**. Help them with finding where the docs are located on prebid.org if needed.
- If all above is good, add a `LGTM` comment and request 1 additional core member to review.
- Once there is 2 `LGTM` on the PR, merge to master
- Ask the submitter to add a PR for documentation if applicable.
- Add a line into the [draft release](https://github.com/prebid/Prebid.js/releases) notes for this submission. If no draft release is available, create one using [this template]( https://gist.github.com/mkendall07/c3af6f4691bed8a46738b3675cb5a479)

### New Adapter or updates to adapter process
- Follow steps above for general review process. In addition, please verify the following:
- Verify that bidder has submitted valid bid params and that bids are being received.
- Verify that bidder is not manipulating the prebid.js auction in any way or doing things that go against the principles of the project. If unsure check with the Tech Lead.
- Verify that the bidder is being as efficient as possible, ideally not loading an external library, however if they do load a library it should be cached.
- Verify that code re-use is being done properly and that changes introduced by a bidder don't impact other bidders.
- If the adapter being submitted is an alias type, check with the bidder contact that is being aliased to make sure it's allowed.
- If the adapter is triggering any user syncs make sure they are using the user sync module in the Prebid.js core.
- Requests to the bidder should support HTTPS
- Responses from the bidder should be compressed (such as gzip, compress, deflate)
- Bid responses may not use JSONP: All requests must be AJAX with JSON responses
- All user-sync (aka pixel) activity must be registered via the provided functions
- 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.

## Ticket Coordinator

Each week, Prebid Org assigns one person to keep an eye on incoming issues and PRs. That person should:
- Review issues and PRs at least once per weekday for new items.
- For PRs: assign PRs to individuals on the PR review list. Try to be equitable -- not all PRs are created equally. Use the "Assigned" field and add the "Needs Review" label.
- For Issues: try to address questions and troubleshooting requests on your own, assigning them to others as needed.
- Issues that are questions or troubleshooting requests may be closed if the originator doesn't respond within a week to requests for confirmation or details.
- Issues that are bug reports should be left open and assigned to someone in PR rotation to confirm or deny the bug status.
- It's polite to check with others before assigning them large tasks.
- If possible, check in on older items and see if they can be unstuck.
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ Working examples can be found in [the developer docs](http://prebid.org/dev-docs

$ git clone https://github.com/prebid/Prebid.js.git
$ cd Prebid.js
$ yarn install

Prebid supports the `yarn` npm client. This is an alternative to using `npm` for package management, though `npm install` will continue to work as before.

For more info, see [the Yarn documentation](https://yarnpkg.com).
$ npm install

*Note:* You need to have `NodeJS` 4.x or greater installed.

Expand Down Expand Up @@ -60,11 +56,8 @@ For example, when running the serve command: `gulp serve --modules=openxBidAdapt
Building with just these adapters will result in a smaller bundle which should allow your pages to load faster.

**Build standalone prebid.js**
Prebid now supports the `yarn` npm client. This is an alternative to using `npm` for package management, though `npm` will continue to work as before.

For more info about yarn see https://yarnpkg.com

- Clone the repo, run `yarn install`
- Clone the repo, run `npm install`
- Then run the build:

$ gulp build --modules=openxBidAdapter,rubiconBidAdapter,sovrnBidAdapter
Expand All @@ -82,11 +75,11 @@ With `modules.json` containing the following
]
```

**Build prebid.js using Yarn for bundling**
**Build prebid.js using npm for bundling**

In case you'd like to explicitly show that your project uses `prebid.js` and want a reproducible build, consider adding it as an `yarn` dependency.
In case you'd like to explicitly show that your project uses `prebid.js` and want a reproducible build, consider adding it as an `npm` dependency.

- Add `prebid.js` as a `yarn` dependency of your project: `yarn add prebid.js`
- Add `prebid.js` as a `npm` dependency of your project: `npm install prebid.js`
- Run the `prebid.js` build under the `node_modules/prebid.js/` folder

$ gulp build --modules=path/to/your/list-of-modules.json
Expand Down
68 changes: 26 additions & 42 deletions browsers.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"bs_ie_13_windows_10": {
"bs_ie_14_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "edge",
"browser_version": "13.0",
"browser_version": "14.0",
"device": null,
"os": "Windows"
},
Expand All @@ -15,15 +15,15 @@
"device": null,
"os": "Windows"
},
"bs_firefox_46_windows_10": {
"bs_firefox_56_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "firefox",
"browser_version": "46.0",
"browser_version": "56.0",
"device": null,
"os": "Windows"
},
"bs_chrome_51_windows_10": {
"bs_chrome_62_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "chrome",
Expand All @@ -39,43 +39,35 @@
"device": null,
"os": "Windows"
},
"bs_firefox_46_windows_8.1": {
"bs_firefox_56_windows_8.1": {
"base": "BrowserStack",
"os_version": "8.1",
"browser": "firefox",
"browser_version": "46.0",
"browser_version": "56.0",
"device": null,
"os": "Windows"
},
"bs_chrome_51_windows_8.1": {
"bs_chrome_62_windows_8.1": {
"base": "BrowserStack",
"os_version": "8.1",
"browser": "chrome",
"browser_version": "51.0",
"device": null,
"os": "Windows"
},
"bs_ie_10_windows_8": {
"base": "BrowserStack",
"os_version": "8",
"browser": "ie",
"browser_version": "10.0",
"browser_version": "62.0",
"device": null,
"os": "Windows"
},
"bs_firefox_46_windows_8": {
"bs_firefox_56_windows_8": {
"base": "BrowserStack",
"os_version": "8",
"browser": "firefox",
"browser_version": "46.0",
"browser_version": "56.0",
"device": null,
"os": "Windows"
},
"bs_chrome_51_windows_8": {
"bs_chrome_62_windows_8": {
"base": "BrowserStack",
"os_version": "8",
"browser": "chrome",
"browser_version": "51.0",
"browser_version": "62.0",
"device": null,
"os": "Windows"
},
Expand All @@ -87,27 +79,19 @@
"device": null,
"os": "Windows"
},
"bs_ie_10_windows_7": {
"base": "BrowserStack",
"os_version": "7",
"browser": "ie",
"browser_version": "10.0",
"device": null,
"os": "Windows"
},
"bs_firefox_46_windows_7": {
"bs_firefox_56_windows_7": {
"base": "BrowserStack",
"os_version": "7",
"browser": "firefox",
"browser_version": "46.0",
"browser_version": "56.0",
"device": null,
"os": "Windows"
},
"bs_chrome_51_windows_7": {
"bs_chrome_62_windows_7": {
"base": "BrowserStack",
"os_version": "7",
"browser": "chrome",
"browser_version": "51.0",
"browser_version": "62.0",
"device": null,
"os": "Windows"
},
Expand All @@ -127,19 +111,19 @@
"device": null,
"os": "OS X"
},
"bs_firefox_46_mac_elcapitan": {
"bs_firefox_56_mac_elcapitan": {
"base": "BrowserStack",
"os_version": "El Capitan",
"browser": "firefox",
"browser_version": "46.0",
"browser_version": "56.0",
"device": null,
"os": "OS X"
},
"bs_chrome_51_mac_elcapitan": {
"bs_chrome_62_mac_elcapitan": {
"base": "BrowserStack",
"os_version": "El Capitan",
"browser": "chrome",
"browser_version": "51.0",
"browser_version": "62.0",
"device": null,
"os": "OS X"
},
Expand All @@ -151,15 +135,15 @@
"device": null,
"os": "OS X"
},
"bs_firefox_46_mac_yosemite": {
"bs_firefox_56_mac_yosemite": {
"base": "BrowserStack",
"os_version": "Yosemite",
"browser": "firefox",
"browser_version": "46.0",
"browser_version": "56.0",
"device": null,
"os": "OS X"
},
"bs_chrome_51_mac_yosemite": {
"bs_chrome_62_mac_yosemite": {
"base": "BrowserStack",
"os_version": "Yosemite",
"browser": "chrome",
Expand All @@ -175,11 +159,11 @@
"device": null,
"os": "OS X"
},
"bs_firefox_46_mac_mavericks": {
"bs_firefox_56_mac_mavericks": {
"base": "BrowserStack",
"os_version": "Mavericks",
"browser": "firefox",
"browser_version": "46.0",
"browser_version": "56.0",
"device": null,
"os": "OS X"
},
Expand Down
7 changes: 6 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,17 @@ function nodeBundle(modules) {
});
}

// these modules must be explicitly listed in --modules to be included in the build, won't be part of "all" modules
var explicitModules = [
'pre1api'
];

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

if(modules.length === 0) {
modules = allModules;
modules = allModules.filter(module => !explicitModules.includes(module));
} else {
var diff = _.difference(modules, allModules);
if(diff.length !== 0) {
Expand Down
7 changes: 7 additions & 0 deletions integrationExamples/gpt/amp/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
##WARNING
The below documented method of deploying prebid on AMP requires remote.html
This is being deprecated on March 29th. A new method the requires Prebid Server
is being developed, see [Prebid Server](http://github.com/prebid/prebid-server).

## Old method:

This README provides steps to run amp example page.

Add following entries to your hosts file
Expand Down
4 changes: 0 additions & 4 deletions integrationExamples/gpt/hello_world.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<!--
This page calls a single bidder for a single ad slot. It can be considered a "hello world" example for using
Prebid with the Google Publisher Tag.
It also makes a good test page for new adapter PR submissions. Simply set your server's Bid Params object in the
bids array inside the adUnits, and it will use your adapter to load an ad.
NOTE that many ad servers won't send back an ad if the URL is localhost... so you might need to
set an alias in your /etc/hosts file so that you can load this page from a different domain.
-->

<html>
Expand Down
2 changes: 1 addition & 1 deletion integrationExamples/gpt/pbjs_example_gpt.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
},
{
bidder: 'adform',
// available params: [ 'mid', 'inv', 'pdom', 'mname', 'mkw', 'mkv', 'cat', 'bcat', 'bcatrt', 'adv', 'advt', 'cntr', 'cntrt', 'maxp', 'minp', 'sminp', 'w', 'h', 'pb', 'pos', 'cturl', 'iturl', 'cttype', 'hidedomain', 'cdims', 'test' ]
// available params: [ 'mid', 'inv', 'pdom', 'mname', 'mkw', 'mkv', 'cat', 'bcat', 'bcatrt', 'adv', 'advt', 'cntr', 'cntrt', 'maxp', 'minp', 'sminp', 'w', 'h', 'pb', 'pos', 'cturl', 'iturl', 'cttype', 'hidedomain', 'cdims', 'test', priceType ]
params: {
adxDomain: 'adx.adform.net', //optional
mid: 158989,
Expand Down
Loading

0 comments on commit 371e758

Please sign in to comment.