Skip to content

Commit b829a8e

Browse files
Merge pull request #46 from dadi/patch/core-update
Update core dependency version
2 parents bfef1c3 + cc8cce1 commit b829a8e

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> A high-level library for interacting with DADI API
44
55
[![npm (scoped)](https://img.shields.io/npm/v/@dadi/api-wrapper.svg?maxAge=10800&style=flat-square)](https://www.npmjs.com/package/@dadi/api-wrapper)
6-
![coverage](https://img.shields.io/badge/coverage-96%25-brightgreen.svg?style=flat-square)
6+
![coverage](https://img.shields.io/badge/coverage-93%25-brightgreen.svg?style=flat)
77
[![Build Status](https://travis-ci.org/dadi/api-wrapper.svg?branch=master)](https://travis-ci.org/dadi/api-wrapper)
88
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/)
99
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"author": "Eduardo Boucas <mail@eduardoboucas.com>",
1212
"license": "GPL",
1313
"dependencies": {
14-
"@dadi/api-wrapper-core": "1.x.0",
15-
"@dadi/passport": "^1.2.0",
14+
"@dadi/api-wrapper-core": "~2.0.0",
15+
"@dadi/passport": "~1.5.0",
1616
"debug": "^2.6.1",
1717
"query-string": "^4.1.0",
1818
"request-promise": "^2.0.1",

scripts/coverage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ coberturaBadger(opts, function parsingResults (err, badgeStatus) {
2828
// open the README.md and add this url
2929
fs.readFile(readme, {encoding: 'utf-8'}, function (err, body) {
3030
body = body.replace(/(!\[coverage\]\()(.+?)(\))/g, function (whole, a, b, c) {
31-
return a + badgeUrl.replace('%', '%25') + '-square' + c
31+
return a + badgeUrl + c
3232
})
3333

3434
fs.writeFile(readme, body, {encoding: 'utf-8'}, function (err) {

test/unit/helpers.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe('Helpers', function (done) {
109109
done()
110110
})
111111

112-
it('should append limit to the querystring if specified', function (done) {
112+
it('should append page to the querystring if specified', function (done) {
113113
var query = { filter: JSON.stringify({ name: 'John' }), page: 33 }
114114
var expectedQuerystring = '?' + decodeURIComponent(querystring.stringify(query))
115115

@@ -121,7 +121,7 @@ describe('Helpers', function (done) {
121121
})
122122

123123
it('should append limit to the querystring if specified', function (done) {
124-
var query = { filter: JSON.stringify({ name: 'John' }), count: 10 }
124+
var query = { count: 10, filter: JSON.stringify({ name: 'John' }) }
125125
var expectedQuerystring = '?' + decodeURIComponent(querystring.stringify(query))
126126

127127
wrapper.useVersion('1.0').useDatabase('test').in('collectionOne').whereFieldIsEqualTo('name', 'John').limitTo(10)
@@ -154,7 +154,7 @@ describe('Helpers', function (done) {
154154
})
155155

156156
it('should append fields to the querystring if specified', function (done) {
157-
var query = { filter: JSON.stringify({ name: 'John' }), fields: JSON.stringify({ name: 1 }) }
157+
var query = { fields: JSON.stringify({ name: 1 }), filter: JSON.stringify({ name: 'John' }) }
158158
var expectedQuerystring = '?' + decodeURIComponent(querystring.stringify(query))
159159

160160
wrapper.useVersion('1.0').useDatabase('test').in('collectionOne').whereFieldIsEqualTo('name', 'John').useFields(['name'])
@@ -165,7 +165,7 @@ describe('Helpers', function (done) {
165165
})
166166

167167
it('should append compose value to the querystring if specified and `true`', function (done) {
168-
var query = { filter: JSON.stringify({ name: 'John' }), compose: true }
168+
var query = { compose: true, filter: JSON.stringify({ name: 'John' }) }
169169
var expectedQuerystring = '?' + decodeURIComponent(querystring.stringify(query))
170170

171171
wrapper.useVersion('1.0').useDatabase('test').in('collectionOne').whereFieldIsEqualTo('name', 'John').withComposition(true)
@@ -176,7 +176,7 @@ describe('Helpers', function (done) {
176176
})
177177

178178
it('should append compose value to the querystring if specified and `false`', function (done) {
179-
var query = { filter: JSON.stringify({ name: 'John' }), compose: false }
179+
var query = { compose: false, filter: JSON.stringify({ name: 'John' }) }
180180
var expectedQuerystring = '?' + decodeURIComponent(querystring.stringify(query))
181181

182182
wrapper.useVersion('1.0').useDatabase('test').in('collectionOne').whereFieldIsEqualTo('name', 'John').withComposition(false)

0 commit comments

Comments
 (0)