Skip to content

Commit

Permalink
Merge pull request #9 from prebid/master
Browse files Browse the repository at this point in the history
merge master
  • Loading branch information
pro-nsk authored Dec 21, 2022
2 parents 0a0d8e8 + 681e2c7 commit afb97d8
Show file tree
Hide file tree
Showing 557 changed files with 67,673 additions and 20,807 deletions.
21 changes: 3 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,12 @@ aliases:
name: BrowserStack End to end testing
command: gulp e2e-test

# Download and run BrowserStack local
- &download_browserstack
name : Download BrowserStackLocal binary
command : |
# Download the browserstack binary file
wget "https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip"
# Unzip it
unzip BrowserStackLocal-linux-x64.zip
- &start_browserstack
name: Start BrowserStackLocal
command: ./BrowserStackLocal --key ${BROWSERSTACK_ACCESS_KEY} --automate-only --local-identifier ${CIRCLE_WORKFLOW_JOB_ID}
background: true

- &unit_test_steps
- checkout
- restore_cache: *restore_dep_cache
- run: npm ci
- save_cache: *save_dep_cache
- run: *install
- run: *download_browserstack
- run: *start_browserstack
- run: *run_unit_test

- &endtoend_test_steps
Expand All @@ -68,8 +52,6 @@ aliases:
- run: npm install
- save_cache: *save_dep_cache
- run: *install
- run: *download_browserstack
- run: *start_browserstack
- run: *run_endtoend_test

version: 2
Expand All @@ -87,6 +69,9 @@ workflows:
commit:
jobs:
- build
- e2etest:
requires:
- build

experimental:
pipelines: true
26 changes: 16 additions & 10 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<!--
Thank you for your pull request. Please make sure this PR is scoped to one change, and that any added or changed code includes tests with greater than 80% code coverage. See https://github.com/prebid/Prebid.js/blob/master/CONTRIBUTING.md#testing-prebidjs for documentation on testing Prebid.js.
Thank you for your pull request!
Please title your pull request like this: 'Module: Change', eg 'Fraggles Bid Adapter: support fragglerock'
Please make sure this PR is scoped to one change or you may be asked to resubmit.
Please make sure any added or changed code includes tests with greater than 80% code coverage.
See https://github.com/prebid/Prebid.js/blob/master/CONTRIBUTING.md#testing-prebidjs for documentation on testing Prebid.js.
For any user facing change, submit a link to a PR on the docs repo at https://github.com/prebid/prebid.github.io/
-->

## Type of change
Expand All @@ -11,14 +21,16 @@ 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
<!-- Describe the change proposed in this pull request -->

<!-- For new bidder adapters, please provide the following -->
- test parameters for validating bids
<!-- For new bidder adapters, please provide the following
- contact email of the adapter’s maintainer
- test parameters for validating bids:
```
{
bidder: '<bidder name>',
Expand All @@ -28,14 +40,8 @@ Thank you for your pull request. Please make sure this PR is scoped to one chang
}
```
Be sure to test the integration with your adserver using the [Hello World](/integrationExamples/gpt/hello_world.html) sample page.

- 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:
Be sure to test the integration with your adserver using the [Hello World](/integrationExamples/gpt/hello_world.html) sample page. -->

- 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. -->
4 changes: 4 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
paths:
- src
- modules
- libraries
73 changes: 73 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '22 11 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
2 changes: 1 addition & 1 deletion .github/workflows/issue_tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@f717b5ecd4534d3c4df4ce9b5c1c2214f0f7cd06
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c
with:
app_id: ${{ secrets.ISSUE_APP_ID }}
private_key: ${{ secrets.ISSUE_APP_PEM }}
Expand Down
167 changes: 167 additions & 0 deletions integrationExamples/gpt/captifyRtdProvider_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name=viewport content="width=device-width, initial-scale=1">
<script type="text/javascript" src="https://cache.consentframework.com/js/pa/1020/c/Y1Dhs/stub" charset="utf-8"></script>
<script type="text/javascript" async src="https://choices.consentframework.com/js/pa/1020/c/Y1Dhs/cmp" charset="utf-8"></script>
</head>
<body>

<script async src="https://pagead2.googlesyndication.com/tag/js/gpt.js"></script>
<script src="prebid.js" async></script>

<script>
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

pbjs.que.push(function() {
pbjs.setConfig({
debug: true,
realTimeData: {
auctionDelay: 1000,
dataProviders: [
{
name: "CaptifyRTDModule",
waitForIt: true,
params: {
pubId: 11287,
bidders: ['appnexus'],
}
}
]
},
consentManagement: {
usp: {
cmpApi: 'iab',
timeout: 100 // US Privacy timeout 100ms
},
gdpr: {
cmpApi: 'iab',
timeout: 8000,
defaultGdprScope: true,
getTCData: {
tcString: 'COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw',
gdprApplies: true,
purpose: {
consents: {
0: true,
},
legitimateInterests: {
0: true,
}
},
vendor: {
consents: {
00: true,
},
legitimateInterests: {
0: true,
}
}
},
rules: [{
purpose: "storage",
enforcePurpose: true,
enforceVendor: true,
vendorExceptions: ["appnexus"] //Can work without consent for cookies
},{
purpose: "basicAds",
enforcePurpose: true,
enforceVendor: true,
vendorExceptions: ["appnexus"]
}]
},
}
});
});

</script>
<script>
var div_1_sizes = [
[728, 90]
];

var PREBID_TIMEOUT = 3500;
var FAILSAFE_TIMEOUT = 4000;

var adUnits = [
{
code: '/19968336/header-bid-tag-0',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: 27445767
}
}]
}
];

// ======== DO NOT EDIT BELOW THIS LINE =========== //
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: initAdserver,
timeout: PREBID_TIMEOUT
});
});

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


// in case PBJS doesn't load
setTimeout(function() {
initAdserver();
}, FAILSAFE_TIMEOUT);

googletag.cmd.push(function() {
googletag.defineSlot('/19968336/header-bid-tag-0', div_1_sizes, 'div-1').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});

</script>

<article>
<p>
Module will add key/value pairs in ad calls.
Check out for captify_segments key in the payload sent to Xandr to endpoint https://ib.adnxs.com/ut/v3/prebid : keywords.key[captify_segments] should have an array of string as value.
This array will have Xandr RTSS segment ids.
</p>
</article>
<h2>Basic Prebid.js Example with CaptifyRTD </h2>
<h5>Div-1</h5>
<div id='div-1'>
<script type='text/javascript'>
googletag.cmd.push(function() {
googletag.display('div-1');
});

</script>
</div>

</body>
</html>
Loading

0 comments on commit afb97d8

Please sign in to comment.