{"action":"created","issue":{"url":"https://api.github.com/repos/producerphp/producer.producer/issues/5","repository_url":"https://api.github.com/repos/producerphp/producer.producer","labels_url":"https://api.github.com/repos/producerphp/producer.producer/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/producerphp/producer.producer/issues/5/comments","events_url":"https://api.github.com/repos/producerphp/producer.producer/issues/5/events","html_url":"https://github.com/producerphp/producer.producer/pull/5","id":145082827,"number":5,"title":"Add project based config and custom test command","user":{"login":"chrismichaels84","id":5412413,"avatar_url":"https://avatars.githubusercontent.com/u/5412413?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismichaels84","html_url":"https://github.com/chrismichaels84","followers_url":"https://api.github.com/users/chrismichaels84/followers","following_url":"https://api.github.com/users/chrismichaels84/following{/other_user}","gists_url":"https://api.github.com/users/chrismichaels84/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismichaels84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismichaels84/subscriptions","organizations_url":"https://api.github.com/users/chrismichaels84/orgs","repos_url":"https://api.github.com/users/chrismichaels84/repos","events_url":"https://api.github.com/users/chrismichaels84/events{/privacy}","received_events_url":"https://api.github.com/users/chrismichaels84/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-01T04:22:14Z","updated_at":"2016-04-01T20:49:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/producerphp/producer.producer/pulls/5","html_url":"https://github.com/producerphp/producer.producer/pull/5","diff_url":"https://github.com/producerphp/producer.producer/pull/5.diff","patch_url":"https://github.com/producerphp/producer.producer/pull/5.patch"},"body":"This pull request does two things in two commits, both discussed at issue  #4.\r\n\r\nThe user may now create a `.producer` INI file in the root of their project. These configuration items will be appended to AND OVERWRITE the existing global configuration if present. This allows for future customization. The `Config` object is also passed into the `AbstractCommand` and `AbstractRepo`.\r\n\r\nI also added a couple helper methods to `Config` like `has()` and `getAll()`.\r\n\r\nThe second addition is the use of a `test_command` item in that `.producer` file. This allows users to execute a custom test command (instead of phpunit) for things like vagrant or ssh.\r\n\r\nMy goal was to do this in as little code as possible (while still being clean and readable). I think I followed the code style and I docblocked everything. I also added a test. I didn't touch documentation.\r\n\r\nOf course, I'm happy to modify, refactor, or document anything here."},"comment":{"url":"https://api.github.com/repos/producerphp/producer.producer/issues/comments/204561866","html_url":"https://github.com/producerphp/producer.producer/pull/5#issuecomment-204561866","issue_url":"https://api.github.com/repos/producerphp/producer.producer/issues/5","id":204561866,"user":{"login":"pmjones","id":25754,"avatar_url":"https://avatars.githubusercontent.com/u/25754?v=3","gravatar_id":"","url":"https://api.github.com/users/pmjones","html_url":"https://github.com/pmjones","followers_url":"https://api.github.com/users/pmjones/followers","following_url":"https://api.github.com/users/pmjones/following{/other_user}","gists_url":"https://api.github.com/users/pmjones/gists{/gist_id}","starred_url":"https://api.github.com/users/pmjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmjones/subscriptions","organizations_url":"https://api.github.com/users/pmjones/orgs","repos_url":"https://api.github.com/users/pmjones/repos","events_url":"https://api.github.com/users/pmjones/events{/privacy}","received_events_url":"https://api.github.com/users/pmjones/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T20:49:11Z","updated_at":"2016-04-01T20:49:11Z","body":"All right, some thoughts (as always, it's easier to critique existing work than say exactly what it should be in advance).\r\n\r\nFirst, I have future plans for things like package-file templates, so instead of a `.projector` file, it should be a `.projector` directory, with a `config` file inside it for the actual values.\r\n\r\nNext, the values should be broken up something more like this:\r\n\r\n```\r\n[commands]\r\n; the command to use for running tests\r\ntests = phpunit\r\n; the command to use for generating docs\r\ndocs = phpdoc\r\n\r\n[files]\r\nchanges = CHANGES.md\r\nlicense = LICENSE.md\r\ntests = phpunit.xml.dist\r\nreadme = README.MD\r\ncontributing = CONTRIBUTING.md\r\n```\r\n\r\nThird, the `Config` class should use those values as defaults for itself, so that if they're not present in the user-level .projector/config, and not present in a package-level .projector/config, the values will still be present.\r\n\r\nDoes all that begin to make sense?"}}