diff --git a/.travis.yml b/.travis.yml index 7aa056a..11b99b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: node_js - node_js: - - '0.12' - - '0.10' + - 6 sudo: false cache: directories: diff --git a/README.md b/README.md index 92ce1d8..5fec973 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # koop-gist +[![Greenkeeper badge](https://badges.greenkeeper.io/koopjs/koop-gist.svg)](https://greenkeeper.io/) + > Github gist provider for [Koop](https://github.com/esri/koop) [![npm][npm-image]][npm-url] diff --git a/controller/index.js b/controller/index.js index ad663e7..23933cd 100644 --- a/controller/index.js +++ b/controller/index.js @@ -2,6 +2,7 @@ var crypto = require('crypto') var provider = require('koop-provider') var request = require('request') var pkg = require('../package.json') +var path = require('path') /** * creates new gist controller @@ -18,7 +19,7 @@ var gistController = function (model) { * @param {object} res - outgoing response object */ ctrl.index = function (req, res) { - res.render(__dirname + '/../views/index', { + res.render(path.join(__dirname, '/../views/index'), { baseUrl: req.baseUrl }) } @@ -30,7 +31,7 @@ var gistController = function (model) { * @param {object} res - outgoing response object */ ctrl.preview = function (req, res) { - res.render(__dirname + '/../views/demo', { + res.render(path.join(__dirname, '/../views/demo'), { baseUrl: req.baseUrl, id: req.params.id }) diff --git a/package.json b/package.json index dffd62d..11c5c81 100644 --- a/package.json +++ b/package.json @@ -8,15 +8,15 @@ }, "dependencies": { "debug": "^2.2.0", - "ejs": "^1.0.0", + "ejs": "^2.5.6", "geohub": "^1.0.2", "koop-provider": "^1.0.0", "request": "^2.65.0" }, "devDependencies": { - "koop": "^2.8.6", - "standard": "^5.3.1", - "supertest": "^0.11.0", + "koop": "2.12.1", + "standard": "^9.0.1", + "supertest": "^3.0.0", "tap-spec": "^4.0.2", "tape": "^4.2.0" }, diff --git a/test/model-test.js b/test/model-test.js index 386f313..e1b6c3d 100644 --- a/test/model-test.js +++ b/test/model-test.js @@ -2,9 +2,10 @@ var test = require('tape') var koop = require('koop/lib') var createGistModel = require('../model') var gistId = 'c82a80ee4c5b91889efe' +var path = require('path') koop.config = { - data_dir: __dirname + '/output/', + data_dir: path.join(__dirname, '/output/'), ghtoken: process.env.KOOP_GIST_TOKEN } koop.log = new koop.Logger({})