Unless I've got this wrong, the HTTP stuff is default available in views now, perhaps we should make including those functions in the JS runtime a non-default option?
Paul On Thu, Oct 9, 2008 at 6:13 PM, Chris Anderson <[EMAIL PROTECTED]> wrote: > On Wed, Oct 1, 2008 at 11:59 PM, Chris Anderson <[EMAIL PROTECTED]> wrote: >> Couch-heads, >> >> I've got the tests from couch_tests.js running from the command line. > > I've commited this to trunk as revision 703276. To run the tests, run > `make check` while you have a CouchDB instance available at > http://127.0.0.1:5984 - ideally make check should be able bootstrap a > CouchDB. I'm not sure the best way to manage this, so I've left it out > of scope. > > Because couchjs can take a script on stdin, I'm able to merge the > couch.js, couch_tests.js and test.js (the test runner which > monkeypatches http support into couchjs) using cat, so the copy of the > tests run by this command is the same as that run in the browser. > >> >> Oh and there's a funky utf8 issue. Hopefully its easy to ask >> Spidermonkey to treat its source files as utf8. >> > > This is still an issue with utf8. I'm just skipping that test right > now because I don't see a fix that doesn't involve deep Spidermonkey > magic. > > BTW - see test.js for JavaScript code that makes HTTP GET, HEAD, POST, > PUT, DELETE, COPY, and MOVE available to Javascripts. I already have a > few other ideas about what this could be good for. Making HTTP > requests in the view runner (main.js) is what we call a *bad idea* so > don't even think about it. > > Thanks to Michael Gottesman (gottesmm) for the initial work on libcurl > integration. > > -- > Chris Anderson > http://jchris.mfdz.com >
