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#109 in AOLP_ADS_JS/prebid.js from release/1…
Browse files Browse the repository at this point in the history
….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)
  ...
  • Loading branch information
vzhukovsky committed Jul 17, 2017
2 parents 5aa0d51 + 136fc37 commit ea3bf0f
Show file tree
Hide file tree
Showing 208 changed files with 13,706 additions and 13,687 deletions.
42 changes: 42 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"env": {
"browser": true,
"commonjs": true
},
"extends": "standard",
"globals": {
"$$PREBID_GLOBAL$$": false
},
"parserOptions": {
"sourceType": "module"
},
"rules": {
"comma-dangle": "off",
"semi": "off",
"space-before-function-paren": "off",

// Exceptions below this line are temporary, so that eslint can be added into the CI process.
// Violations of these styles should be fixed, and the exceptions removed over time.
//
// See Issue #1111.
"brace-style": "off",
"camelcase": "off",
"eqeqeq": "off",
"import/first": "off",
"no-control-regex": "off",
"no-mixed-operators": "off",
"no-multiple-empty-lines": "off",
"no-redeclare": "off",
"no-return-assign": "off",
"no-throw-literal": "off",
"no-undef": "off",
"no-unused-vars": "off",
"no-use-before-define": "off",
"no-useless-call": "off",
"no-useless-escape": "off",
"one-var": "off",
"standard/no-callback-literal": "off",
"standard/object-curly-even-spacing": "off",
"valid-typeof": "off"
}
}
11 changes: 0 additions & 11 deletions .jscsrc

This file was deleted.

39 changes: 0 additions & 39 deletions .jshintrc

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
AOL Prebid 1.23.0
----------------
Added passing key values feature.
Updated to Prebid 0.24.1


AOL Prebid 1.22.0
----------------
Added aliases for AOL adapter.
Expand Down
68 changes: 27 additions & 41 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
# Contributing to Prebid.js
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/).
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/) against the
master branch.

## Pull Requests
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.
Pull requests must have 80% code coverage before beign considered for merge.
Additional details about the process can be found [here](./pr_review.md).

## Issues
[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).
[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).

## Documentation
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).

## Testing Prebid.js
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.
## Writing Tests

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

### Writing tests
Tests are stored in the [test/spec](test/spec) directory. Tests for Adapters are located in [test/spec/adapters](test/spec/adapters).
They can be run with the following commands:

- `gulp test` - run the test suite once (`npm test` is aliased to call `gulp test`)
- `gulp serve` - run the test suite once, but re-run it whenever a file in the `src` or `test` directory is modified

Before a Pull Request will be considered for merge:

- All new and existing tests must pass
- Added or modified code must have greater than 80% coverage

### Test Guidelines
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:

- If the module you are working on is already partially tested by a file within the `test` directory, add tests to that file
- If the module you are working on is already partially tested by a file within the `test/spec` directory, add tests to that file
- If the module does not have any tests, create a new test file
- Group tests in a `describe` block
- Test individual units of code within an `it` block
Expand All @@ -36,31 +52,8 @@ When you are adding code to Prebid.js, or modifying code that isn't covered by a
- 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

### Running tests
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:

- `gulp test` will run the test suite once (`npm test` is aliased to call `gulp test`)
- `gulp serve` will run tests once and stay open, re-running tests whenever a file in the `src` or `test` directory is modified

### Checking results and code coverage
Check the test results using these guidelines:

- Look at the total number of tests run, passed, and failed in the shell window.
- If all tests are passing, great.
- Otherwise look for errors printed in the console for a description of the failing test.
- You may need to iterate on your code or tests until all tests are passing.
- Make sure existing tests still pass.
- There is a table below the testing report that shows code coverage percentage, for each file under the `src` directory.
- Each time you run tests, a code coverage report is generated in `build/coverage/lcov/lcov-report/index.html`.
- This is a static HTML page that you can load in your browser.
- On that page, navigate to the file you are testing to see which lines are being tested.
- Red indicates that a line isn't covered by a test.
- Gray indicates a line that doesn't need coverage, such as a comment or blank line.
- Green indicates a line that is covered by tests.
- The code you have added or modified must have greater than 80% coverage to be accepted.

### Examples
Prebid.js already has lots of tests. Read them to see how Prebid.js is tested, and for inspiration:
### Test Examples
Prebid.js already has many tests. Read them to see how Prebid.js is tested, and for inspiration:

- Look in `test/spec` and its subdirectories
- Tests for bidder adaptors are located in `test/spec/adapters`
Expand All @@ -82,10 +75,3 @@ describe('<Adapter>', () => {
// Add other `describe` or `it` blocks as necessary
});
```

### Resources
The Prebid.js testing stack contains some of the following tools. It may be helpful to consult their documentation during the testing process.

- [Mocha - test framework](http://mochajs.org/)
- [Chai - BDD/TDD assertion library](http://chaijs.com/)
- [Sinon - spy, stub, and mock library](http://sinonjs.org/)
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ This URL is designed specifically for the Container Tag library and it supports

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

**Table of Contents**

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

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

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

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

## Build for Dev
## Build for Development

To build the project on your local machine, run:

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

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.

For guidelines, see [Contributing](./CONTRIBUTING.md).

Our PR review process can be found [here](https://github.com/prebid/Prebid.js/tree/master/pr_review.md).

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

### Code Quality

Code quality is defined by `.jscs` and `.jshint` files and errors are reported in the terminal.
Code quality is defined by `.eslintrc` and errors are reported in the terminal.

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

### Unit Testing with Karma

Expand Down
5 changes: 3 additions & 2 deletions adapters.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@
},
{
"appnexusAst": {
"supportedMediaTypes": ["video"]
"supportedMediaTypes": ["video", "native"]
}
}, {
},
{
"vertamedia": {
"supportedMediaTypes": ["video"]
}
Expand Down
8 changes: 0 additions & 8 deletions browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,6 @@
"device": null,
"os": "Windows"
},
"bs_ie_9_windows_7": {
"base": "BrowserStack",
"os_version": "7",
"browser": "ie",
"browser_version": "9.0",
"device": null,
"os": "Windows"
},
"bs_firefox_46_windows_7": {
"base": "BrowserStack",
"os_version": "7",
Expand Down
Loading

0 comments on commit ea3bf0f

Please sign in to comment.