{"action":"created","issue":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/4915","repository_url":"https://api.github.com/repos/crystal-lang/crystal","labels_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4915/labels{/name}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4915/comments","events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4915/events","html_url":"https://github.com/crystal-lang/crystal/pull/4915","id":254770536,"number":4915,"title":"Start Refactor tool init specs","user":{"login":"bew","id":9730330,"avatar_url":"https://avatars1.githubusercontent.com/u/9730330?v=4","gravatar_id":"","url":"https://api.github.com/users/bew","html_url":"https://github.com/bew","followers_url":"https://api.github.com/users/bew/followers","following_url":"https://api.github.com/users/bew/following{/other_user}","gists_url":"https://api.github.com/users/bew/gists{/gist_id}","starred_url":"https://api.github.com/users/bew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bew/subscriptions","organizations_url":"https://api.github.com/users/bew/orgs","repos_url":"https://api.github.com/users/bew/repos","events_url":"https://api.github.com/users/bew/events{/privacy}","received_events_url":"https://api.github.com/users/bew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-09-01T23:14:22Z","updated_at":"2017-11-23T17:52:29Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/crystal-lang/crystal/pulls/4915","html_url":"https://github.com/crystal-lang/crystal/pull/4915","diff_url":"https://github.com/crystal-lang/crystal/pull/4915.diff","patch_url":"https://github.com/crystal-lang/crystal/pull/4915.patch"},"body":"This is a refactor of the `crystal tool init` specs, it is partly extracted & reworked from #4691.\r\n\r\nIt fixes 2 main issues:\r\n\r\n- Use a handy `stderr_of(command)` helper instead of relying on obscure bash trick like `(echo \"foo\" 1>&2) 2>&1 >/dev/null` to get only stderr on stdout...\r\n\r\n- Provides 3 helpers to create/delete temporary directory/file, and allow to make tool tests in a directory, then delete it (on spec success or failure). Previously there were a lot of directories (created by the tool) not deleted in case of errors in the specs. (and sometime the reported errors weren't coherent between multiple runs)\r\n\r\nThe 3 temporary-stuff helpers will probably be replaced when #4096 or similar is merged."},"comment":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments/346674929","html_url":"https://github.com/crystal-lang/crystal/pull/4915#issuecomment-346674929","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4915","id":346674929,"user":{"login":"RX14","id":2788811,"avatar_url":"https://avatars0.githubusercontent.com/u/2788811?v=4","gravatar_id":"","url":"https://api.github.com/users/RX14","html_url":"https://github.com/RX14","followers_url":"https://api.github.com/users/RX14/followers","following_url":"https://api.github.com/users/RX14/following{/other_user}","gists_url":"https://api.github.com/users/RX14/gists{/gist_id}","starred_url":"https://api.github.com/users/RX14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RX14/subscriptions","organizations_url":"https://api.github.com/users/RX14/orgs","repos_url":"https://api.github.com/users/RX14/repos","events_url":"https://api.github.com/users/RX14/events{/privacy}","received_events_url":"https://api.github.com/users/RX14/received_events","type":"User","site_admin":false},"created_at":"2017-11-23T17:52:29Z","updated_at":"2017-11-23T17:52:29Z","author_association":"MEMBER","body":"We should just use the system's tempdir everywhere, if it's not writable and usable the system is broken anyway. Plus it's way faster because tmpfs is in-memory.\r\n\r\nBut, that's a topic for another PR and for now we should keep it the same as before. I'll review this in just a bit."}}
{"actor":{"display_login":"RX14"}}