{"action":"created","issue":{"url":"https://api.github.com/repos/gsmendoza/test_changes/issues/4","labels_url":"https://api.github.com/repos/gsmendoza/test_changes/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/gsmendoza/test_changes/issues/4/comments","events_url":"https://api.github.com/repos/gsmendoza/test_changes/issues/4/events","html_url":"https://github.com/gsmendoza/test_changes/issues/4","id":89872163,"number":4,"title":"Proposal for a cleaner API","user":{"login":"rstacruz","id":74385,"avatar_url":"https://avatars.githubusercontent.com/u/74385?v=3","gravatar_id":"","url":"https://api.github.com/users/rstacruz","html_url":"https://github.com/rstacruz","followers_url":"https://api.github.com/users/rstacruz/followers","following_url":"https://api.github.com/users/rstacruz/following{/other_user}","gists_url":"https://api.github.com/users/rstacruz/gists{/gist_id}","starred_url":"https://api.github.com/users/rstacruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstacruz/subscriptions","organizations_url":"https://api.github.com/users/rstacruz/orgs","repos_url":"https://api.github.com/users/rstacruz/repos","events_url":"https://api.github.com/users/rstacruz/events{/privacy}","received_events_url":"https://api.github.com/users/rstacruz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-21T06:32:45Z","updated_at":"2015-06-24T13:23:05Z","closed_at":null,"body":"I find that .test_changes.yaml is a little arbitrary:\r\n\r\n * It ends in `.yaml` instead of '.yml' (as I'd expect with '.travis.yml').\r\n * It doesn't follow the same format as, say, `.rspec`.\r\n * It's unclear how to override parameters in the command line with whatever's defined in .yml.\r\n\r\nWith that said, I propose a better API for test_changes. Like rspec, everything configurable should be available as command-line switches.\r\n\r\n```sh\r\ntest-changes [-r,--runner RUNNER] [-p,--pattern /from/to/] [--pattern ...] [-c,--commit HEAD] [-- passthru parameters]\r\n```\r\n\r\nThe parameters are passed through `--`, which is the same as what you'd expect with ssh.\r\n\r\n```sh\r\nssh rsc@localhost -- cat /etc/passwd\r\ntest-changes -r rspec -- --fail-fast\r\n```\r\n\r\nAnd to configure it, just create a `.test_changes` file in your project (much like .rspec) with the command line switches. Other test runners follow this convention, like [mocha.js](http://mochajs.org/).\r\n\r\n```sh\r\n# .test_changes\r\n--runner \"bundle exec rspec\"\r\n--pattern \"#^app/(models)/(.+).rb#spec/\\1/\\2_spec.rb#\"\r\n--pattern \"#^app/(controller|helper|view)s/(.+).rb#spec/controllers/\\2_\\1_spec.rb#\"\r\n```\r\n\r\nThe pattern format is pattered after `ctags`, which looks like this:\r\n\r\n```sh\r\n# ~/.ctags\r\n--regex-css=/^([A-Za-z0-9_-]+)\\(/\\1/m,mixin,mixins/\r\n```\r\n\r\nThe `/` delimiter can be any character, much like sed or vim or anything else, so I used `#` in the example above."},"comment":{"url":"https://api.github.com/repos/gsmendoza/test_changes/issues/comments/114866226","html_url":"https://github.com/gsmendoza/test_changes/issues/4#issuecomment-114866226","issue_url":"https://api.github.com/repos/gsmendoza/test_changes/issues/4","id":114866226,"user":{"login":"rstacruz","id":74385,"avatar_url":"https://avatars.githubusercontent.com/u/74385?v=3","gravatar_id":"","url":"https://api.github.com/users/rstacruz","html_url":"https://github.com/rstacruz","followers_url":"https://api.github.com/users/rstacruz/followers","following_url":"https://api.github.com/users/rstacruz/following{/other_user}","gists_url":"https://api.github.com/users/rstacruz/gists{/gist_id}","starred_url":"https://api.github.com/users/rstacruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstacruz/subscriptions","organizations_url":"https://api.github.com/users/rstacruz/orgs","repos_url":"https://api.github.com/users/rstacruz/repos","events_url":"https://api.github.com/users/rstacruz/events{/privacy}","received_events_url":"https://api.github.com/users/rstacruz/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T13:23:05Z","updated_at":"2015-06-24T13:23:05Z","body":"looks like a special case unfortunately and no one size would fit all."}}