Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Todo List/ Roadmap #1

Closed
7 of 8 tasks
ogt opened this issue Jun 27, 2013 · 9 comments
Closed
7 of 8 tasks

Todo List/ Roadmap #1

ogt opened this issue Jun 27, 2013 · 9 comments

Comments

@ogt
Copy link
Owner

ogt commented Jun 27, 2013

I'm offering $200.00 on oDesk for someone to do this task: https://www.odesk.com/jobs/~01b581dffeae97fd9d

Make webcommand testable

  • make webCommand work with any in/out stream not just http request/result (to facilitate testing)
  • add (as an optional parameter in createCommandServer and webCommand a list of allowed utilities - the webCommand should produce an error if asked to exec a utility that isn't in the list
  • Create list of popular streamable utilities that are part of the Heroku slug (initial list sort, awk, sed, grep, uniq, head, tail, cut, fmt, wc). Make this list the default for webCommand if no such list is given.
  • Add test functions of the webCommand - test against each of the listed utilities (test-sort.js, test_awk.js etc..., npm test should be able to execute them all. Sufficient to test for exit code when given sample input file)
  • Add travis-ci - test integration (hopefully travis-ci boxes support a superset of the above utilities)
  • Update README.md , accordingly

See related issue http://github.com/ogt/sorter/issues/3

Publish

  • Publish as npm module (owners me, maintainers you)

Minor enhancements

  • if no args parameter exist, check for single valued arg, split by ' ' (such arg may be easier to type for curl command line use...)

  • Budget : $200
  • Required Skills : node.js, javascript
  • Question : Assume you have access to http request object. Using streams provide the one line command that would produce in the server console's output a complete replica of all data that arrives as part of the request
@MauritsMeijer
Copy link
Contributor

https://travis-ci.org/MauritsMeijer/webcommand/jobs/8707416 works but fails on node 0.10
btw. you need to connect travis to the main repository

@MauritsMeijer
Copy link
Contributor

https://npmjs.org/package/webcommand still have to figure out how to set the owner

@ogt
Copy link
Owner Author

ogt commented Jul 4, 2013

My npm user is odysseas at tsatalos.com.
I guess the way you would add me is

> npm owner add odysseas@tsatalos.com webcommand

@ogt
Copy link
Owner Author

ogt commented Jul 4, 2013

Testing it in my machine (Mac) I get the same errors that travis is getting, ie., that when there is an error it is not captured as such.
My guess is that

  • the webcommand's code you have added to signal errors (anything appearing on stderr) and proc.on('error') is probably
    a) not capturing all errors (the code I had - process.on('uncaughtException' was I think more robust - note also that you are testing this in your pc which I guess is a windows pc - and the behavior may be diff between windows and linux
    b) you are raising errors when no errors exist proc.stderr.on('data')- it is common for a unix command to write in is stderr - even though the command executed correctly and exited with a success code.
not ok ./test/test-sed.js ............................... 2/3
    Command: "node" "test-sed.js"
    TAP version 13
    ok 1 no error was emited
    not ok 2 error was emited

P.S. I can give you access to an amzn ec2 ubuntu instance if you want to be testing the modules on a unix machined

@ogt
Copy link
Owner Author

ogt commented Jul 4, 2013

I notice that you don't use any longer the child function that creates a bidirectional stream out of a process.
Depending on how you resolve the comment above you may want to remove any unused requires..

@MauritsMeijer
Copy link
Contributor

are you an npm user?
npm ERR! owner mutate Error getting user data for odysseas@tsatalos.com

@MauritsMeijer
Copy link
Contributor

still using the child function on line 15, i added the proc value to listen to the proccess' stderr stream

@ogt
Copy link
Owner Author

ogt commented Jul 4, 2013

sorry - you are right - my npm username is just odysseas

@ogt
Copy link
Owner Author

ogt commented Jul 8, 2013

Closing the issue - will not do the "minor enhancement"

@ogt ogt closed this as completed Jul 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants