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
├── coffee-script@1.1.2
├─┬ html2jade@0.0.6
│ ├─┬ jsdom@0.2.3
│ │ ├── contextify@0.0.3
│ │ ├── cssom@0.2.0
│ │ ├── htmlparser@1.7.3
│ │ └── request@2.0.2
│ └─┬ optimist@0.2.6
│ └── wordwrap@0.0.1
├─┬ jade@0.14.0 -> /Users/tauren/github/jade
│ ├── coffee-script@1.1.2
│ ├── expresso@0.6.4
│ ├── less@1.1.4
│ ├── markdown@0.2.1
│ ├── sass@0.5.0
│ └─┬ stylus@0.13.9
│ ├── cssom@0.2.0
│ └── growl@1.1.0
├─┬ npm@1.0.11
│ ├── abbrev@1.0.3
│ ├── node-uuid@1.2.0
│ ├── nopt@1.0.4
│ └── semver@1.0.7
├─┬ smoosh@0.3.1
│ ├── asciimo@0.3.1
│ ├── colors@0.5.0
│ ├── gzip@0.1.0
│ ├─┬ jshint@0.3.0
│ │ ├── argsparser@0.0.6
│ │ └── glob@2.0.8
│ ├── rimraf@1.0.4
│ ├── sqwish@0.2.0
│ └── uglify-js@1.0.7
├─┬ stylus@0.14.0
│ ├── cssom@0.2.0
│ └── growl@1.1.0
├─┬ tmpl-precompile@0.1.5 -> /Users/tauren/github/tmpl-precompile
│ └── async@0.1.9
├── uglify-js@1.0.6
└─┬ vows@0.5.11
└── eyes@0.1.6
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 npm@1.0.94 should be installed with -g
> daemon@0.3.0 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 forever@0.6.9 should be installed with -g
colors@0.5.1 ./node_modules/colors
eyes@0.1.6 ./node_modules/eyes
async@0.1.10 ./node_modules/async
eventemitter2@0.4.1 ./node_modules/eventemitter2
hook.io-helloworld@0.3.0 ./node_modules/hook.io-helloworld
vows@0.5.11 ./node_modules/vows
npm@1.0.94 ./node_modules/npm
optimist@0.2.6 ./node_modules/optimist
└── wordwrap@0.0.2
nconf@0.3.1 ./node_modules/nconf
├── pkginfo@0.2.2
└── ini@1.0.1
dnode@0.8.2 ./node_modules/dnode
├── dnode-protocol@0.0.12
├── lazy@1.0.7
├── traverse@0.4.6
└── socket.io@0.6.18
winston@0.3.5 ./node_modules/winston
├── pkginfo@0.2.2
└── loggly@0.3.9
findit@0.1.1 ./node_modules/findit
└── seq@0.3.5
forever@0.6.9 ./node_modules/forever
├── mkdirp@0.0.7
├── timespan@2.0.1
├── portfinder@0.2.0
├── pkginfo@0.2.2
├── cliff@0.1.5
├── minimatch@0.0.4
├── watch@0.3.3
├── daemon@0.3.0
└── winston@0.5.3
/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