Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
Update to latest Osprey API
Browse files Browse the repository at this point in the history
Closes #8
  • Loading branch information
blakeembrey committed Aug 5, 2015
1 parent 1419722 commit 07c3032
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 4 additions & 5 deletions osprey-mock-service.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var router = require('osprey-router')
var Negotiator = require('negotiator')
var resources = require('osprey-resources')
var osprey = require('osprey')

/**
* Export the mock server.
Expand Down Expand Up @@ -28,10 +28,9 @@ function ospreyMockServer (raml) {
* @return {Function}
*/
function createServer (raml, options) {
var osprey = require('osprey')
var app = router()
var app = osprey.Router()

app.use(osprey.createServer(raml, options))
app.use(osprey.server(raml, options))
app.use(ospreyMockServer(raml))

return app
Expand All @@ -45,7 +44,7 @@ function createServer (raml, options) {
* @return {Function}
*/
function createServerFromBaseUri (raml, options) {
var app = router()
var app = osprey.Router()
var path = (raml.baseUri || '').replace(/^(\w+:)?\/\/[^\/]+/, '') || '/'

app.use(path, createServer(raml, options))
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@
"dependencies": {
"finalhandler": "^0.4.0",
"negotiator": "^0.5.1",
"osprey": "^0.2.0-alpha",
"osprey": "^0.2.0-beta.3",
"osprey-resources": "^0.3.0",
"osprey-router": "^0.1.0",
"raml-parser": "^0.8.10",
"yargs": "^3.5.4"
}
Expand Down

0 comments on commit 07c3032

Please sign in to comment.