Better examples #520

Merged
merged 16 commits into from Dec 18, 2013

Conversation

Projects
None yet
4 participants
Contributor

cronopio commented Nov 19, 2013

I just rewrite the examples, just using as base the old examples, so I updated all this examples according to the new improvements and the new api of node-http-proxy.

Review and merge

CC: @yawnt

Coverage Status

Coverage remained the same when pulling db11bb4 on better-examples into 83367e7 on caronte.

Coverage Status

Coverage remained the same when pulling a3ed755 on better-examples into 83367e7 on caronte.

Coverage Status

Coverage decreased (-0.2%) when pulling bac210f on better-examples into 83367e7 on caronte.

Coverage Status

Coverage decreased (-0.2%) when pulling db952d1 on better-examples into 83367e7 on caronte.

Contributor

cronopio commented Nov 27, 2013

Ok there is a very weird trouble in test/examples-test.js, if I run it alone all the tests pass, but running all the suite using npm test give a trouble trying to require socket.io

TypeError: Cannot set property 'XHR' of undefined

The last part of the stack trace show this:

 TypeError: Cannot set property 'XHR' of undefined
      at object.module.io (/home/cronopio/Nodejitsu/node-http-proxy/examples/node_modules/socket.io-client/lib/io.js:127:22)
      at Object.<anonymous> (/home/cronopio/Nodejitsu/node-http-proxy/examples/node_modules/socket.io-client/lib/io.js:206:3)
      at Module._compile (module.js:456:26)
      at Object.Module._extensions..js (module.js:474:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
      at Module.require (module.js:364:17)
      at require (module.js:380:17)
      at Object.<anonymous> (/home/cronopio/Nodejitsu/node-http-proxy/examples/node_modules/socket.io/lib/socket.io.js:12:14)
      at Module._compile (module.js:456:26)
      at Object.Module._extensions..js (module.js:474:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
      at Module.require (module.js:364:17)
      at require (module.js:380:17)
      at Object.<anonymous> (/home/cronopio/Nodejitsu/node-http-proxy/examples/node_modules/socket.io/index.js:8:18)
      at Module._compile (module.js:456:26)
      at Object.Module._extensions..js (module.js:474:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
      at Module.require (module.js:364:17)
      at require (module.js:380:17)
      at Object.<anonymous> (/home/cronopio/Nodejitsu/node-http-proxy/examples/websocket/latent-websocket-proxy.js:30:10)
      at Module._compile (module.js:456:26)
      at Object.Module._extensions..js (module.js:474:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
      at Module.require (module.js:364:17)
      at require (module.js:380:17)
      at /home/cronopio/Nodejitsu/node-http-proxy/test/examples-test.js:65:21

...........

Coverage Status

Coverage decreased (-0.2%) when pulling 89a00c0 on better-examples into 83367e7 on caronte.

Contributor

cronopio commented Dec 9, 2013

Ready for review and merge

cc: @yawnt @indexzero

Contributor

yawnt commented Dec 18, 2013

@cronopio looks good but i the travis CI build is failing, if you fix that we can merge :)

Contributor

cronopio commented Dec 18, 2013

@yawnt Thank you. Seems that there is a trouble running the coveralls script. Can I drop it from the .travis.yml and just set the npm test script?

Contributor

cronopio commented Dec 18, 2013

Actually I think there is the same trouble in caronte branch. Seems there is a trouble running the coveralls script using node 0.10 and break very bad using 0.11

Contributor

yawnt commented Dec 18, 2013

damn,sucks.. okay drop it T_T

Contributor

cronopio commented Dec 18, 2013

Oh. Seems that this commit 9e74a63 break the tests. I'll investigate and fix it before the merge. I'll let you know when is ready to merge

Contributor

yawnt commented Dec 18, 2013

okay, but i don't think it's related.. it's such an insignificant addition to the codebase :\

Contributor

cronopio commented Dec 18, 2013

Ok, I fixed the stuff and rebase it.

Now travis is failing due another stuff. This is ready to merge

yawnt added a commit that referenced this pull request Dec 18, 2013

@yawnt yawnt merged commit 16828a9 into caronte Dec 18, 2013

1 check failed

default The Travis CI build failed
Details

@cronopio cronopio deleted the better-examples branch Dec 18, 2013

risacher commented Jan 7, 2014

For what it's worth, I have gotten caronte to work for my use case. See https://gist.github.com/risacher/8302220

Contributor

cronopio commented Jan 7, 2014

@risacher Oh thanks! that is helpful, I'll take a deep look in a few hours, maybe you can format it like the examples I made and then open a pull request 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment