{"action":"created","issue":{"url":"https://api.github.com/repos/mizzy/serverspec/issues/544","labels_url":"https://api.github.com/repos/mizzy/serverspec/issues/544/labels{/name}","comments_url":"https://api.github.com/repos/mizzy/serverspec/issues/544/comments","events_url":"https://api.github.com/repos/mizzy/serverspec/issues/544/events","html_url":"https://github.com/mizzy/serverspec/pull/544","id":121430829,"number":544,"title":"Added mode, owner_user, and owner_group methods to file","user":{"login":"twolfson","id":902488,"avatar_url":"https://avatars.githubusercontent.com/u/902488?v=3","gravatar_id":"","url":"https://api.github.com/users/twolfson","html_url":"https://github.com/twolfson","followers_url":"https://api.github.com/users/twolfson/followers","following_url":"https://api.github.com/users/twolfson/following{/other_user}","gists_url":"https://api.github.com/users/twolfson/gists{/gist_id}","starred_url":"https://api.github.com/users/twolfson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twolfson/subscriptions","organizations_url":"https://api.github.com/users/twolfson/orgs","repos_url":"https://api.github.com/users/twolfson/repos","events_url":"https://api.github.com/users/twolfson/events{/privacy}","received_events_url":"https://api.github.com/users/twolfson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-10T08:43:09Z","updated_at":"2015-12-10T18:11:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mizzy/serverspec/pulls/544","html_url":"https://github.com/mizzy/serverspec/pull/544","diff_url":"https://github.com/mizzy/serverspec/pull/544.diff","patch_url":"https://github.com/mizzy/serverspec/pull/544.patch"},"body":"When writing tests, I was getting frustrated at the poor feedback I was getting for mode, user, and group. For example, in the error below, there is no information about what the current mode is:\r\n\r\n```\r\nexpected `File \"/etc/ssl/private/twolfson.com.key\".mode?(\"300\")` to return true, got false\r\n```\r\n\r\nI saw that we have an `mtime` method and while I don't know its motivations (kind of hard with no GitHub issues or related PR in the blame =/). However, I gave a shot at adding in `mode,` owner_user`, and `owner_group`. In this PR:\r\n\r\n- Added `mode`, `owner_user`, and `owner_group` methods to file\r\n- Added tests"},"comment":{"url":"https://api.github.com/repos/mizzy/serverspec/issues/comments/163706015","html_url":"https://github.com/mizzy/serverspec/pull/544#issuecomment-163706015","issue_url":"https://api.github.com/repos/mizzy/serverspec/issues/544","id":163706015,"user":{"login":"twolfson","id":902488,"avatar_url":"https://avatars.githubusercontent.com/u/902488?v=3","gravatar_id":"","url":"https://api.github.com/users/twolfson","html_url":"https://github.com/twolfson","followers_url":"https://api.github.com/users/twolfson/followers","following_url":"https://api.github.com/users/twolfson/following{/other_user}","gists_url":"https://api.github.com/users/twolfson/gists{/gist_id}","starred_url":"https://api.github.com/users/twolfson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twolfson/subscriptions","organizations_url":"https://api.github.com/users/twolfson/orgs","repos_url":"https://api.github.com/users/twolfson/repos","events_url":"https://api.github.com/users/twolfson/events{/privacy}","received_events_url":"https://api.github.com/users/twolfson/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T18:11:21Z","updated_at":"2015-12-10T18:11:21Z","body":"I have applied the updates to this PR"}}