Skip to content

Commit

Permalink
Unruly Bid Adapter : include Prebid.js version in request (prebid#10773)
Browse files Browse the repository at this point in the history
* Unruly Protected Audience Support

* Unruly Conditional Protected Audience Support

* Unruly map bidIds to AuctionConfigs

* Unruly: Update Protected Audience origin and descision logic URL.

* Unruly: Fix lint error

* Unruly: report Prebid.js version

* Unruly: Fix tests

* Unruly: Remove Extra Comma

* Unruly: Switch to strings to see if tests pass on Prebid.js

---------

Co-authored-by: Brian Haines <[email protected]>
  • Loading branch information
bhainesnexxen and Brian Haines authored Dec 1, 2023
1 parent fe2f35e commit 4f057b1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
9 changes: 8 additions & 1 deletion modules/unrulyBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ const getRequests = (conf, validBidRequests, bidderRequest) => {

Object.keys(requestBySiteId).forEach((key) => {
let data = {
bidderRequest: Object.assign({}, {bids: requestBySiteId[key], invalidBidsCount, ...bidderRequestData})
bidderRequest: Object.assign({},
{
bids: requestBySiteId[key],
invalidBidsCount,
prebidVersion: '$prebid.version$',
...bidderRequestData
}
)
};

request.push(Object.assign({}, {data, ...conf}));
Expand Down
11 changes: 7 additions & 4 deletions test/spec/modules/unrulyBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,8 @@ describe('UnrulyAdapter', function () {
'bidderRequestId': '12e00d17dff07b'
}
],
'invalidBidsCount': 0
'invalidBidsCount': 0,
'prebidVersion': '$prebid.version$'
}
};

Expand Down Expand Up @@ -591,7 +592,8 @@ describe('UnrulyAdapter', function () {
'bidderRequestId': '12e00d17dff07b',
}
],
'invalidBidsCount': 0
'invalidBidsCount': 0,
'prebidVersion': '$prebid.version$'
}
};

Expand Down Expand Up @@ -682,7 +684,8 @@ describe('UnrulyAdapter', function () {
'bidderRequestId': '12e00d17dff07b',
}
],
'invalidBidsCount': 0
'invalidBidsCount': 0,
'prebidVersion': '$prebid.version$'
}
};

Expand Down Expand Up @@ -1095,7 +1098,7 @@ describe('UnrulyAdapter', function () {
'adUnitCode': 'video2',
'transactionId': 'a89619e3-137d-4cc5-9ed4-58a0b2a0bbc2',
'bidId': bidId,
'bidderRequestId': '12e00d17dff07b',
'bidderRequestId': '12e00d17dff07b'
}
]
}
Expand Down

0 comments on commit 4f057b1

Please sign in to comment.