Permalink
Browse files

pack config

  • Loading branch information...
hueniverse committed Feb 20, 2013
1 parent 96eccfa commit 0023693775356261000596c0b862c199c32e371c
Showing with 2 additions and 13 deletions.
  1. +0 −5 lib/index.js
  2. +1 −1 package.json
  3. +1 −7 test/index.js
View
@@ -8,14 +8,9 @@ var Useragent = require('useragent');
var internals = {};
-internals.config = {
-};
-
exports.register = function (pack, options, next) {
- Hoek.merge(internals.config, options);
-
pack.ext('onRequest', internals.onRequest);
next();
View
@@ -1,7 +1,7 @@
{
"name": "scooter",
"description": "User-agent information plugin for hapi",
- "version": "0.0.2",
+ "version": "0.0.3",
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)",
"contributors": [],
"repository": "git://github.com/walmartlabs/scooter",
View
@@ -19,19 +19,13 @@ describe('Scooter', function () {
it('parses and sets user-agent information for an incoming request', function (done) {
- var options = {
- permissions: {
- ext: true
- }
- };
-
var server = new Hapi.Server();
server.route({method: 'GET', path: '/', handler: function () {
return this.reply(this.plugins.scooter.os.family);
}});
- server.plugin().require('../', options, function (err) {
+ server.plugin().allow({ ext: true }).require('../', function (err) {
expect(err).to.not.exist;
server.inject({ method: 'GET', url: '/', headers: { 'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3' } }, function (res) {

0 comments on commit 0023693

Please sign in to comment.