Skip to content

Commit

Permalink
trails v3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jaumard authored and jaumard committed Mar 20, 2018
1 parent 8f0456f commit 4e03770
Show file tree
Hide file tree
Showing 18 changed files with 10,882 additions and 4,575 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: node_js
os:
- linux
- osx
node_js:
- 8
- 9
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![Gitter][gitter-image]][gitter-url]
[![NPM version][npm-image]][npm-url]
[![Linux + OSX Build Status][ci-image]][ci-url]
[![Windows Build Status][appveyor-image]][appveyor-url]
[![Code Climate][codeclimate-image]][codeclimate-url]
[![Follow @trailsjs on Twitter][twitter-image]][twitter-url]

Expand Down Expand Up @@ -123,8 +122,6 @@ information on how our projects are organized and how to get started.
[npm-url]: https://npmjs.org/package/trailpack-express
[ci-image]: https://img.shields.io/travis/trailsjs/trailpack-express.svg?style=flat-square&label=Linux%20/%20OSX
[ci-url]: https://travis-ci.org/trailsjs/trailpack-express
[appveyor-image]: https://img.shields.io/appveyor/ci/trailsjs/trailpack-express/master.svg?style=flat-square&label=Windows
[appveyor-url]: https://ci.appveyor.com/project/trailsjs/trailpack-express
[codeclimate-image]: https://img.shields.io/codeclimate/github/trailsjs/trailpack-express.svg?style=flat-square
[codeclimate-url]: https://codeclimate.com/github/trailsjs/trailpack-express
[gitter-image]: http://img.shields.io/badge/+%20GITTER-JOIN%20CHAT%20%E2%86%92-1DCE73.svg?style=flat-square
Expand Down
36 changes: 0 additions & 36 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion config/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = {
error: error
}, (err, html) => {
if (err) {
req.log.error(`Error sending page ${error.statusCode}, maybe you don\'t have a ${error.statusCode}.html file`, err)
req.log.error(`Error sending page ${error.statusCode}, maybe you don't have a ${error.statusCode}.html file`, err)
res.type('txt').send(error.message)
}
else {
Expand Down
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ module.exports = class Express extends ServerTrailpack {
new Error('config.web.express is absent, please npm install your express version (4 or 5) and uncomment the line under config.web.express'))
}

// console.log('express',typeof this.app.config.get('web.express'))
//
// return Promise.all([
// lib.Validator.validateWebConfig(this.app.config.get('web'))
// ])
console.log('express', typeof this.app.config.get('web.express'))

return Promise.all([
lib.Validator.validateWebConfig(this.app.config.get('web'))
])
}

configure () {
Expand Down
4 changes: 2 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ module.exports = {
// {...} - ... allowed
rule = (rule === false ? Joi.object({}).allow(null) :
typeof rule === 'function' ? rule :
!rule || rule === true ? Joi.any() :
Joi.compile(rule))
!rule || rule === true ? Joi.any() :
Joi.compile(rule))
validation[type] = rule
})
return validation
Expand Down
Loading

0 comments on commit 4e03770

Please sign in to comment.