{"action":"created","issue":{"url":"https://api.github.com/repos/tailhook/vagga/issues/341","repository_url":"https://api.github.com/repos/tailhook/vagga","labels_url":"https://api.github.com/repos/tailhook/vagga/issues/341/labels{/name}","comments_url":"https://api.github.com/repos/tailhook/vagga/issues/341/comments","events_url":"https://api.github.com/repos/tailhook/vagga/issues/341/events","html_url":"https://github.com/tailhook/vagga/issues/341","id":175374647,"number":341,"title":"Alternative Command-line interface for supervise","user":{"login":"livioribeiro","id":3456335,"avatar_url":"https://avatars.githubusercontent.com/u/3456335?v=3","gravatar_id":"","url":"https://api.github.com/users/livioribeiro","html_url":"https://github.com/livioribeiro","followers_url":"https://api.github.com/users/livioribeiro/followers","following_url":"https://api.github.com/users/livioribeiro/following{/other_user}","gists_url":"https://api.github.com/users/livioribeiro/gists{/gist_id}","starred_url":"https://api.github.com/users/livioribeiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livioribeiro/subscriptions","organizations_url":"https://api.github.com/users/livioribeiro/orgs","repos_url":"https://api.github.com/users/livioribeiro/repos","events_url":"https://api.github.com/users/livioribeiro/events{/privacy}","received_events_url":"https://api.github.com/users/livioribeiro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-06T23:16:55Z","updated_at":"2016-09-07T22:36:38Z","closed_at":"2016-09-07T22:36:38Z","body":"In #338 was proposed passing params to commands in `!Supervise` via environments vars. I want to propose an alternative using parameters prefixed with the name of the child command they are meant to be passed to. Let's take the example at the first proposal:\r\n\r\n```yaml\r\ncommands:\r\n  tests: !Supervise\r\n    description: Run test suite\r\n    children:\r\n      tests: !Command\r\n        container: py\r\n        run:\r\n          - \"py.test\"\r\n      redis: !Command\r\n        container: redis\r\n        run:\r\n          - \"redis-server\"\r\n          - \"--daemonize\"\r\n          - \"no\"\r\n```\r\n\r\nThe command would be called like this:\r\n\r\n    $ vagga tests --tests_redis-port $PORT --redis_port $PORT\r\n\r\nThe prefix of the parameters would be stripped and passed to its respective command. Parameters with only the name of the child command would be passed as positional arguments.\r\n\r\nThis approach has 2 major drawbacks, however:\r\n\r\n* We lose the benefits of using docopt \r\n* It adds complexity to the caller"},"comment":{"url":"https://api.github.com/repos/tailhook/vagga/issues/comments/245441144","html_url":"https://github.com/tailhook/vagga/issues/341#issuecomment-245441144","issue_url":"https://api.github.com/repos/tailhook/vagga/issues/341","id":245441144,"user":{"login":"tailhook","id":321799,"avatar_url":"https://avatars.githubusercontent.com/u/321799?v=3","gravatar_id":"","url":"https://api.github.com/users/tailhook","html_url":"https://github.com/tailhook","followers_url":"https://api.github.com/users/tailhook/followers","following_url":"https://api.github.com/users/tailhook/following{/other_user}","gists_url":"https://api.github.com/users/tailhook/gists{/gist_id}","starred_url":"https://api.github.com/users/tailhook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tailhook/subscriptions","organizations_url":"https://api.github.com/users/tailhook/orgs","repos_url":"https://api.github.com/users/tailhook/repos","events_url":"https://api.github.com/users/tailhook/events{/privacy}","received_events_url":"https://api.github.com/users/tailhook/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T22:36:38Z","updated_at":"2016-09-07T22:36:38Z","body":"Makes sense. But I think this is fair trade off.\r\n(also you don't have to use `VAGGAOPT_` in shell, you can parse environment variables directly by python script or whatever you use, it will rarely be useful, but...)"}}
{"actor":{"display_login":"tailhook"}}