Skip to content

Instantly share code, notes, and snippets.

@tauren
Created October 7, 2011 08:53
Show Gist options
  • Save tauren/1269814 to your computer and use it in GitHub Desktop.
Save tauren/1269814 to your computer and use it in GitHub Desktop.
creampie:github tauren$ npm list -g
/usr/local/lib
├── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected] -> /Users/tauren/github/jade
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected] -> /Users/tauren/github/tmpl-precompile
│ └── [email protected]
├── [email protected]
└─┬ [email protected]
└── [email protected]
creampie:github tauren$ git clone git://github.com/hookio/hook.io.git
Initialized empty Git repository in /Users/tauren/github/hook.io/.git/
remote: Counting objects: 3520, done.
remote: Compressing objects: 100% (1456/1456), done.
remote: Total 3520 (delta 1913), reused 3483 (delta 1887)
Receiving objects: 100% (3520/3520), 4.73 MiB | 103 KiB/s, done.
Resolving deltas: 100% (1913/1913), done.
creampie:github tauren$ cd hook.io/
creampie:hook.io tauren$ npm link
npm WARN prefer global [email protected] should be installed with -g
> [email protected] preinstall /Users/tauren/github/hook.io/node_modules/forever/node_modules/daemon
> node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
'configure' finished successfully (0.064s)
Waf: Entering directory `/Users/tauren/github/hook.io/node_modules/forever/node_modules/daemon/build'
[1/2] cxx: src/daemon.cc -> build/default/src/daemon_1.o
[2/2] cxx_link: build/default/src/daemon_1.o -> build/default/daemon.node
Waf: Leaving directory `/Users/tauren/github/hook.io/node_modules/forever/node_modules/daemon/build'
'build' finished successfully (0.280s)
npm WARN prefer global [email protected] should be installed with -g
[email protected] ./node_modules/colors
[email protected] ./node_modules/eyes
[email protected] ./node_modules/async
[email protected] ./node_modules/eventemitter2
[email protected] ./node_modules/hook.io-helloworld
[email protected] ./node_modules/vows
[email protected] ./node_modules/npm
[email protected] ./node_modules/optimist
└── [email protected]
[email protected] ./node_modules/nconf
├── [email protected]
└── [email protected]
[email protected] ./node_modules/dnode
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
[email protected] ./node_modules/winston
├── [email protected]
└── [email protected]
[email protected] ./node_modules/findit
└── [email protected]
[email protected] ./node_modules/forever
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
/usr/local/bin/hookio -> /usr/local/lib/node_modules/hook.io/bin/hookio
/usr/local/lib/node_modules/hook.io -> /Users/tauren/github/hook.io
creampie:hook.io tauren$ vows --spec
♢ hook.io/discovery/basic-init
When a Hook is listening on 5010
✓ it should fire the hook::listening event
When a Hook is listening on 5010 and another hook attempts to .start()
✓ should fire the hook::ready event
When a Hook is listening on 5010 and another hook attempts to .connect()
✓ should fire the hook::connected event
When a Hook is listening on 5010 and another hook attempts to .listen() on 5010
✓ it should fire the error event
Name: simple-error-callback error::bind Type: hook Data: 5010
When a Hook is listening on 5010 and another hook attempts to .listen() on 5010
✓ it should return an error
✓ error should be EADDRINUSE
♢ hook.io/discovery/client-details
When a Hook is listening on port 5011 with 2 client hooks and a client hook emits query asking for details about itself by name
✓ the callback should get the instance details
✓ details should contain the name
✓ details should contain the type
✓ details should contain the host
When a Hook is listening on port 5011 with 2 client hooks and a client hook emits query asking for details about the server by name
✓ the callback should get the instance details
✓ details should contain the name
✓ details should contain the type
✓ details should contain the host
When a Hook is listening on port 5011 with 2 client hooks and a client hook emits query asking for details about all hooks of type test
✓ the callback should get the instance details
✓ the details should contain the good number of hooks
✓ details should contain the name
✓ details should contain the type
✓ details should contain the host
When a Hook is listening on port 5011 with 2 client hooks and a client hook emits query asking for details about all hooks on host 127.0.0.1
✓ the callback should get the instance details
✓ the details should contain the good number of hooks
✓ details should contain the name
✓ details should contain the type
✓ details should contain the host
When a Hook is listening on port 5011 with 2 client hooks and the server hook emits query asking for details about itself by name
✓ the callback should get the instance details
✓ details should contain the name
✓ details should contain the type
✓ details should contain the host
♢ hook.io/siblings/message
When a hook is listening on 5002
✓ it should fire the hook::listening event
When a hook is listening on 5002 and another hook connects
✓ should fire the hook::connected event
When a hook is listening on 5002 and another hook connects and emits *::test
✓ the *::test event should be fired correctly
♢ hook.io/siblings/multiple-message
When a hook is listening on 5050
✓ it should fire the hook::listening event
When a hook is listening on 5050 and another hooks connects to emit *::test::foo::3
✓ the *::test::foo::3 should be fired correctly
When a hook is listening on 5050 and another hooks connects to emit *::test::foo::1
✓ the *::test::foo::1 should be fired correctly
When a hook is listening on 5050 and another hooks connects to emit *::test::foo::2
✓ the *::test::foo::2 should be fired correctly
When a hook is listening on 5050 and another hooks connects to emit *::test::foo::4
✓ the *::test::foo::4 should be fired correctly
When a hook is listening on 5050 and another hooks connects to emit *::test::foo::5
✓ the *::test::foo::5 should be fired correctly
When a hook is listening on 5050 and another hooks connects to emit *::test::foo::6
✓ the *::test::foo::6 should be fired correctly
When a hook is listening on 5050 and another hooks connects to emit *::test::foo::7
✓ the *::test::foo::7 should be fired correctly
When a hook is listening on 5050 and another hooks connects to emit *::test::foo::8
✓ the *::test::foo::8 should be fired correctly
When a hook is listening on 5050 and another hooks connects to emit *::test::foo::9
✓ the *::test::foo::9 should be fired correctly
When a hook is listening on 5050 and another hooks connects to listen with wildcard mapping
✓ should be able to listen each of the emitted event
♢ hook.io/siblings/call-response
A single-level event ping/pong
✓ it should fire the hook::listening event
A mulit-level event ping/pong
✓ it should fire the hook::listening event
A single-level event ping/pong and a hook attempts to .connect()
✓ should fire the hook::connected event
A mulit-level event ping/pong and a hook attempts to .connect()
✓ should fire the hook::connected event
A single-level event ping/pong and a hook attempts to .connect() and a ping hook emits 'ping'
✓ the pong hook should fire and ping hook should receive '*::pong'
A mulit-level event ping/pong and a hook attempts to .connect() and a ping hook emits 'ping::multilevel'
✓ the pong hook should fire and ping hook should receive '*::pong::multilevel'
♢ hook.io/spawn/bad-spawn
When a hook is listening on 5023
✓ it should fire the hook::listening event
When we attempt to spawn a child on a hook that is not listening
✓ it should raise the error::spawn event
When a hook is listening on 5023 and we ask it to spawn a bad hook (out of process)
✓ it should raise the error::spawn event
♢ hook.io/spawn/basic-spawn
When a hook is listening on a 5020
✓ it should fire the hook::listening event
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'hook.io'
at Function._resolveFilename (module.js:322:11)
at Function._load (module.js:267:25)
at require (module.js:351:19)
at Object.<anonymous> (/Users/tauren/github/hook.io/node_modules/hook.io-helloworld/lib/helloworld.js:5:12)
at Module._compile (module.js:407:26)
at Object..js (module.js:413:10)
at Module.load (module.js:339:31)
at Function._load (module.js:298:12)
at require (module.js:351:19)
at spawnHook (/Users/tauren/github/hook.io/lib/hookio/spawn.js:90:17)
creampie:hook.io tauren$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment