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

Commit ea3bf0f

Browse files
committed
Merge pull request prebid#109 in AOLP_ADS_JS/prebid.js from release/1.23.0 to aolgithub-master
* commit '136fc37637749a764070c35c03e7e87a5c157947': (33 commits) Added changelog entry. Implemented passing key values feature. Update code to ESlint rules. Prebid 0.24.1 Release tests: drop ie9 browserstack test Audience Network: separate size from format (prebid#1218) Bugfix/target filtering api fix (prebid#1220) Map sponsor request param to endpoint param (prebid#1219) Increment pre version Probed 0.24.0 Release Beachfront adapter - add ad unit size (prebid#1183) Thoughtleadr adapter - fix postMessage (prebid#1207) When prebid server issues a no-bid response, call addBidResponse for every adUnit requested (prebid#1204) Improvement/timeout xhr (prebid#1172) Add native support (prebid#1072) Improvement/alias queue (prebid#1156) Updated documentaion (prebid#1160) Improvement/prebid iframes amp pages (prebid#1119) Fixes prebid#1114 possible xss issue (prebid#1186) Allowed setTargetingForGPTAsync() to target specific ad unit codes. (prebid#1158) ...
2 parents 5aa0d51 + 136fc37 commit ea3bf0f

File tree

208 files changed

+13706
-13687
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+13706
-13687
lines changed

.eslintrc

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"commonjs": true
5+
},
6+
"extends": "standard",
7+
"globals": {
8+
"$$PREBID_GLOBAL$$": false
9+
},
10+
"parserOptions": {
11+
"sourceType": "module"
12+
},
13+
"rules": {
14+
"comma-dangle": "off",
15+
"semi": "off",
16+
"space-before-function-paren": "off",
17+
18+
// Exceptions below this line are temporary, so that eslint can be added into the CI process.
19+
// Violations of these styles should be fixed, and the exceptions removed over time.
20+
//
21+
// See Issue #1111.
22+
"brace-style": "off",
23+
"camelcase": "off",
24+
"eqeqeq": "off",
25+
"import/first": "off",
26+
"no-control-regex": "off",
27+
"no-mixed-operators": "off",
28+
"no-multiple-empty-lines": "off",
29+
"no-redeclare": "off",
30+
"no-return-assign": "off",
31+
"no-throw-literal": "off",
32+
"no-undef": "off",
33+
"no-unused-vars": "off",
34+
"no-use-before-define": "off",
35+
"no-useless-call": "off",
36+
"no-useless-escape": "off",
37+
"one-var": "off",
38+
"standard/no-callback-literal": "off",
39+
"standard/object-curly-even-spacing": "off",
40+
"valid-typeof": "off"
41+
}
42+
}

.jscsrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

.jshintrc

Lines changed: 0 additions & 39 deletions
This file was deleted.

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
AOL Prebid 1.23.0
2+
----------------
3+
Added passing key values feature.
4+
Updated to Prebid 0.24.1
5+
6+
17
AOL Prebid 1.22.0
28
----------------
39
Added aliases for AOL adapter.

CONTRIBUTING.md

Lines changed: 27 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,40 @@
11
# Contributing to Prebid.js
2-
Contributions are always welcome. To contribute, [fork](https://help.github.com/articles/fork-a-repo/) Prebid.js, commit your changes, and [open a pull request](https://help.github.com/articles/using-pull-requests/).
2+
Contributions are always welcome. To contribute, [fork](https://help.github.com/articles/fork-a-repo/) Prebid.js,
3+
commit your changes, and [open a pull request](https://help.github.com/articles/using-pull-requests/) against the
4+
master branch.
35

4-
## Pull Requests
5-
Please make sure that pull requests are scoped to one change, and that any added or changed code includes tests with greater than 80% code coverage. See [Testing Prebid.js](#testing-prebidjs) for help on writing tests.
6+
Pull requests must have 80% code coverage before beign considered for merge.
7+
Additional details about the process can be found [here](./pr_review.md).
68

79
## Issues
8-
[prebid.org](http://prebid.org/) contains documentation that may help answer questions you have about using Prebid.js. If you can't find the answer there, try searching for a similar issue on the [issues page](https://github.com/prebid/Prebid.js/issues). If you don't find an answer there, [open a new issue](https://github.com/prebid/Prebid.js/issues/new).
10+
[prebid.org](http://prebid.org/) contains documentation that may help answer questions you have about using Prebid.js.
11+
If you can't find the answer there, try searching for a similar issue on the [issues page](https://github.com/prebid/Prebid.js/issues).
12+
If you don't find an answer there, [open a new issue](https://github.com/prebid/Prebid.js/issues/new).
913

1014
## Documentation
1115
If you have a documentation issue or pull request, please open a ticket or PR in the [documentation repository](https://github.com/prebid/prebid.github.io).
1216

13-
## Testing Prebid.js
14-
Pull requests to the Prebid.js library will need to include tests with greater than 80% code coverage for any changed/added code before they can be merged into master.
17+
## Writing Tests
1518

16-
This section describes how to test code in the Prebid.js repository to help prepare your pull request.
19+
Prebid uses [Mocha](http://mochajs.org/) and [Chai](http://chaijs.com/) for unit tests. [Sinon](http://sinonjs.org/)
20+
provides mocks, stubs, and spies. [Karma](https://karma-runner.github.io/1.0/index.html) runs the tests and generates
21+
code coverage reports at `build/coverage/lcov/lcov-report/index.html`.
1722

18-
### Writing tests
23+
Tests are stored in the [test/spec](test/spec) directory. Tests for Adapters are located in [test/spec/adapters](test/spec/adapters).
24+
They can be run with the following commands:
25+
26+
- `gulp test` - run the test suite once (`npm test` is aliased to call `gulp test`)
27+
- `gulp serve` - run the test suite once, but re-run it whenever a file in the `src` or `test` directory is modified
28+
29+
Before a Pull Request will be considered for merge:
30+
31+
- All new and existing tests must pass
32+
- Added or modified code must have greater than 80% coverage
33+
34+
### Test Guidelines
1935
When you are adding code to Prebid.js, or modifying code that isn't covered by an existing test, test the code according to these guidelines:
2036

21-
- If the module you are working on is already partially tested by a file within the `test` directory, add tests to that file
37+
- If the module you are working on is already partially tested by a file within the `test/spec` directory, add tests to that file
2238
- If the module does not have any tests, create a new test file
2339
- Group tests in a `describe` block
2440
- Test individual units of code within an `it` block
@@ -36,31 +52,8 @@ When you are adding code to Prebid.js, or modifying code that isn't covered by a
3652
- 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
3753
- When writing tests you may use ES2015 syntax if desired
3854

39-
### Running tests
40-
After checking out the Prebid.js repository and installing dev dependencies with `npm install`, use the following commands to run tests as you are working on code:
41-
42-
- `gulp test` will run the test suite once (`npm test` is aliased to call `gulp test`)
43-
- `gulp serve` will run tests once and stay open, re-running tests whenever a file in the `src` or `test` directory is modified
44-
45-
### Checking results and code coverage
46-
Check the test results using these guidelines:
47-
48-
- Look at the total number of tests run, passed, and failed in the shell window.
49-
- If all tests are passing, great.
50-
- Otherwise look for errors printed in the console for a description of the failing test.
51-
- You may need to iterate on your code or tests until all tests are passing.
52-
- Make sure existing tests still pass.
53-
- There is a table below the testing report that shows code coverage percentage, for each file under the `src` directory.
54-
- Each time you run tests, a code coverage report is generated in `build/coverage/lcov/lcov-report/index.html`.
55-
- This is a static HTML page that you can load in your browser.
56-
- On that page, navigate to the file you are testing to see which lines are being tested.
57-
- Red indicates that a line isn't covered by a test.
58-
- Gray indicates a line that doesn't need coverage, such as a comment or blank line.
59-
- Green indicates a line that is covered by tests.
60-
- The code you have added or modified must have greater than 80% coverage to be accepted.
61-
62-
### Examples
63-
Prebid.js already has lots of tests. Read them to see how Prebid.js is tested, and for inspiration:
55+
### Test Examples
56+
Prebid.js already has many tests. Read them to see how Prebid.js is tested, and for inspiration:
6457

6558
- Look in `test/spec` and its subdirectories
6659
- Tests for bidder adaptors are located in `test/spec/adapters`
@@ -82,10 +75,3 @@ describe('<Adapter>', () => {
8275
// Add other `describe` or `it` blocks as necessary
8376
});
8477
```
85-
86-
### Resources
87-
The Prebid.js testing stack contains some of the following tools. It may be helpful to consult their documentation during the testing process.
88-
89-
- [Mocha - test framework](http://mochajs.org/)
90-
- [Chai - BDD/TDD assertion library](http://chaijs.com/)
91-
- [Sinon - spy, stub, and mock library](http://sinonjs.org/)

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ This URL is designed specifically for the Container Tag library and it supports
4242

4343
> A free and open source library for publishers to quickly implement header bidding.
4444
45-
This README is for developers who want to contribute to Prebid.js. For user-facing documentation, see [Prebid.org](http://prebid.org).
45+
This README is for developers who want to contribute to Prebid.js.
46+
Additional documentation can be found at [the Prebid homepage](http://prebid.org).
47+
Working examples can be found in [the developer docs](http://prebid.org/dev-docs/getting-started.html).
4648

4749
**Table of Contents**
4850

@@ -59,13 +61,13 @@ This README is for developers who want to contribute to Prebid.js. For user-fac
5961
$ cd Prebid.js
6062
$ yarn install
6163

62-
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.
64+
Prebid also supports the `yarn` npm client. This is an alternative to using `npm` for package management, though `npm` will continue to work as before.
6365

64-
For more info about yarn see https://yarnpkg.com
66+
For more info, see [the Yarn documentation](https://yarnpkg.com).
6567

6668
<a name="Build"></a>
6769

68-
## Build for Dev
70+
## Build for Development
6971

7072
To build the project on your local machine, run:
7173

@@ -181,6 +183,8 @@ A watch is also in place that will run continuous tests in the terminal as you e
181183

182184
Many SSPs, bidders, and publishers have contributed to this project. [60+ Bidders](https://github.com/prebid/Prebid.js/tree/master/src/adapters) are supported by Prebid.js.
183185

186+
For guidelines, see [Contributing](./CONTRIBUTING.md).
187+
184188
Our PR review process can be found [here](https://github.com/prebid/Prebid.js/tree/master/pr_review.md).
185189

186190
### Add a Bidder Adapter
@@ -191,9 +195,9 @@ Please **do NOT load Prebid.js inside your adapter**. If you do this, we will re
191195

192196
### Code Quality
193197

194-
Code quality is defined by `.jscs` and `.jshint` files and errors are reported in the terminal.
198+
Code quality is defined by `.eslintrc` and errors are reported in the terminal.
195199

196-
If you are contributing code, you should configure your editor with the provided `.jscs` and `.jshint` settings.
200+
If you are contributing code, you should [configure your editor](http://eslint.org/docs/user-guide/integrations#editors) with the provided `.eslintrc` settings.
197201

198202
### Unit Testing with Karma
199203

adapters.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@
100100
},
101101
{
102102
"appnexusAst": {
103-
"supportedMediaTypes": ["video"]
103+
"supportedMediaTypes": ["video", "native"]
104104
}
105-
}, {
105+
},
106+
{
106107
"vertamedia": {
107108
"supportedMediaTypes": ["video"]
108109
}

browsers.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,6 @@
9595
"device": null,
9696
"os": "Windows"
9797
},
98-
"bs_ie_9_windows_7": {
99-
"base": "BrowserStack",
100-
"os_version": "7",
101-
"browser": "ie",
102-
"browser_version": "9.0",
103-
"device": null,
104-
"os": "Windows"
105-
},
10698
"bs_firefox_46_windows_7": {
10799
"base": "BrowserStack",
108100
"os_version": "7",

0 commit comments

Comments
 (0)