{"action":"created","comment":{"url":"https://api.github.com/repos/polydawn/repeatr/pulls/comments/25871151","id":25871151,"diff_hunk":"@@ -0,0 +1,45 @@\n+package testutil\n+\n+import (\n+\t\"fmt\"\n+\t\"os\"\n+\t//\t\"path/filepath\"\n+\n+\t//\t\"github.com/smartystreets/goconvey/convey\"\n+)\n+\n+/*\n+\t'actual' should be path; 'expected' may be empty (in which case it checks\n+\tthat anything with an inode exists) or a filemode (in which case it will\n+\tcheck for that file type, ignoring all bits outside of the `os.ModeType`\n+\trange; and '0' must be used for plain file (there is no const)).\n+*/\n+func ShouldBeFile(actual interface{}, expected ...interface{}) string {\n+\tfilename, ok := actual.(string)\n+\tif !ok {\n+\t\treturn \"You must provide a filename as the first argument to this assertion.\"\n+\t}\n+\n+\tinfo, err := os.Stat(filename)\n+\tif err != nil {\n+\t\t// includes if os.IsNotExist(err)\n+\t\treturn err.Error()\n+\t}\n+\n+\tswitch len(expected) {\n+\tcase 0:\n+\t\treturn \"\" // not picky about mode?  okay, you pass already.\n+\tcase 1:\n+\t\tmode, ok := expected[0].(os.FileMode)\n+\t\tif !ok {\n+\t\t\treturn \"You must provide a FileMode as the second argument to this assertion, if any.\"\n+\t\t}\n+\t\tmodeType := info.Mode() & os.ModeType\n+\t\tif modeType != mode {\n+\t\t\treturn fmt.Sprintf(\"Expected file to have mode %v but it had %v instead!\", mode, modeType)\n+\t\t}\n+\t\treturn \"\"\n+\tdefault:\n+\t\treturn \"You must provide zero or one parameters as expectations to this assertion.\"\n+\t}\n+}","path":"testutil/assertions.go","position":45,"original_position":45,"commit_id":"89b8f3187a3c2de0521b5e9f17b4e374ce97cfae","original_commit_id":"d14e24d7ef519c40edfff7fdcd4a24f9e2be1f6e","user":{"login":"kofalt","id":265071,"avatar_url":"https://avatars.githubusercontent.com/u/265071?v=3","gravatar_id":"","url":"https://api.github.com/users/kofalt","html_url":"https://github.com/kofalt","followers_url":"https://api.github.com/users/kofalt/followers","following_url":"https://api.github.com/users/kofalt/following{/other_user}","gists_url":"https://api.github.com/users/kofalt/gists{/gist_id}","starred_url":"https://api.github.com/users/kofalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kofalt/subscriptions","organizations_url":"https://api.github.com/users/kofalt/orgs","repos_url":"https://api.github.com/users/kofalt/repos","events_url":"https://api.github.com/users/kofalt/events{/privacy}","received_events_url":"https://api.github.com/users/kofalt/received_events","type":"User","site_admin":false},"body":"Poor apes.","created_at":"2015-03-05T15:25:23Z","updated_at":"2015-03-05T15:25:23Z","html_url":"https://github.com/polydawn/repeatr/pull/5#discussion_r25871151","pull_request_url":"https://api.github.com/repos/polydawn/repeatr/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/polydawn/repeatr/pulls/comments/25871151"},"html":{"href":"https://github.com/polydawn/repeatr/pull/5#discussion_r25871151"},"pull_request":{"href":"https://api.github.com/repos/polydawn/repeatr/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/polydawn/repeatr/pulls/5","id":30512877,"html_url":"https://github.com/polydawn/repeatr/pull/5","diff_url":"https://github.com/polydawn/repeatr/pull/5.diff","patch_url":"https://github.com/polydawn/repeatr/pull/5.patch","issue_url":"https://api.github.com/repos/polydawn/repeatr/issues/5","number":5,"state":"open","locked":false,"title":"Inputs draft","user":{"login":"heavenlyhash","id":627638,"avatar_url":"https://avatars.githubusercontent.com/u/627638?v=3","gravatar_id":"","url":"https://api.github.com/users/heavenlyhash","html_url":"https://github.com/heavenlyhash","followers_url":"https://api.github.com/users/heavenlyhash/followers","following_url":"https://api.github.com/users/heavenlyhash/following{/other_user}","gists_url":"https://api.github.com/users/heavenlyhash/gists{/gist_id}","starred_url":"https://api.github.com/users/heavenlyhash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heavenlyhash/subscriptions","organizations_url":"https://api.github.com/users/heavenlyhash/orgs","repos_url":"https://api.github.com/users/heavenlyhash/repos","events_url":"https://api.github.com/users/heavenlyhash/events{/privacy}","received_events_url":"https://api.github.com/users/heavenlyhash/received_events","type":"User","site_admin":false},"body":"First pass on some hashing and file shuffling stuff for inputs.\r\n\r\nThere's still a lot of todos here, but any tests not yet passing are skipped so we can merge this and continue to iterate from here.","created_at":"2015-03-04T22:46:49Z","updated_at":"2015-03-05T15:25:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be8a085b338d16330a058ad8adf692c8e64205d7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/polydawn/repeatr/pulls/5/commits","review_comments_url":"https://api.github.com/repos/polydawn/repeatr/pulls/5/comments","review_comment_url":"https://api.github.com/repos/polydawn/repeatr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/polydawn/repeatr/issues/5/comments","statuses_url":"https://api.github.com/repos/polydawn/repeatr/statuses/89b8f3187a3c2de0521b5e9f17b4e374ce97cfae","head":{"label":"polydawn:inputs-draft","ref":"inputs-draft","sha":"89b8f3187a3c2de0521b5e9f17b4e374ce97cfae","user":{"login":"polydawn","id":5307883,"avatar_url":"https://avatars.githubusercontent.com/u/5307883?v=3","gravatar_id":"","url":"https://api.github.com/users/polydawn","html_url":"https://github.com/polydawn","followers_url":"https://api.github.com/users/polydawn/followers","following_url":"https://api.github.com/users/polydawn/following{/other_user}","gists_url":"https://api.github.com/users/polydawn/gists{/gist_id}","starred_url":"https://api.github.com/users/polydawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polydawn/subscriptions","organizations_url":"https://api.github.com/users/polydawn/orgs","repos_url":"https://api.github.com/users/polydawn/repos","events_url":"https://api.github.com/users/polydawn/events{/privacy}","received_events_url":"https://api.github.com/users/polydawn/received_events","type":"Organization","site_admin":false},"repo":{"id":31432509,"name":"repeatr","full_name":"polydawn/repeatr","owner":{"login":"polydawn","id":5307883,"avatar_url":"https://avatars.githubusercontent.com/u/5307883?v=3","gravatar_id":"","url":"https://api.github.com/users/polydawn","html_url":"https://github.com/polydawn","followers_url":"https://api.github.com/users/polydawn/followers","following_url":"https://api.github.com/users/polydawn/following{/other_user}","gists_url":"https://api.github.com/users/polydawn/gists{/gist_id}","starred_url":"https://api.github.com/users/polydawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polydawn/subscriptions","organizations_url":"https://api.github.com/users/polydawn/orgs","repos_url":"https://api.github.com/users/polydawn/repos","events_url":"https://api.github.com/users/polydawn/events{/privacy}","received_events_url":"https://api.github.com/users/polydawn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/polydawn/repeatr","description":"Run it. Run it again.","fork":false,"url":"https://api.github.com/repos/polydawn/repeatr","forks_url":"https://api.github.com/repos/polydawn/repeatr/forks","keys_url":"https://api.github.com/repos/polydawn/repeatr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/polydawn/repeatr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/polydawn/repeatr/teams","hooks_url":"https://api.github.com/repos/polydawn/repeatr/hooks","issue_events_url":"https://api.github.com/repos/polydawn/repeatr/issues/events{/number}","events_url":"https://api.github.com/repos/polydawn/repeatr/events","assignees_url":"https://api.github.com/repos/polydawn/repeatr/assignees{/user}","branches_url":"https://api.github.com/repos/polydawn/repeatr/branches{/branch}","tags_url":"https://api.github.com/repos/polydawn/repeatr/tags","blobs_url":"https://api.github.com/repos/polydawn/repeatr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/polydawn/repeatr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/polydawn/repeatr/git/refs{/sha}","trees_url":"https://api.github.com/repos/polydawn/repeatr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/polydawn/repeatr/statuses/{sha}","languages_url":"https://api.github.com/repos/polydawn/repeatr/languages","stargazers_url":"https://api.github.com/repos/polydawn/repeatr/stargazers","contributors_url":"https://api.github.com/repos/polydawn/repeatr/contributors","subscribers_url":"https://api.github.com/repos/polydawn/repeatr/subscribers","subscription_url":"https://api.github.com/repos/polydawn/repeatr/subscription","commits_url":"https://api.github.com/repos/polydawn/repeatr/commits{/sha}","git_commits_url":"https://api.github.com/repos/polydawn/repeatr/git/commits{/sha}","comments_url":"https://api.github.com/repos/polydawn/repeatr/comments{/number}","issue_comment_url":"https://api.github.com/repos/polydawn/repeatr/issues/comments{/number}","contents_url":"https://api.github.com/repos/polydawn/repeatr/contents/{+path}","compare_url":"https://api.github.com/repos/polydawn/repeatr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/polydawn/repeatr/merges","archive_url":"https://api.github.com/repos/polydawn/repeatr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/polydawn/repeatr/downloads","issues_url":"https://api.github.com/repos/polydawn/repeatr/issues{/number}","pulls_url":"https://api.github.com/repos/polydawn/repeatr/pulls{/number}","milestones_url":"https://api.github.com/repos/polydawn/repeatr/milestones{/number}","notifications_url":"https://api.github.com/repos/polydawn/repeatr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/polydawn/repeatr/labels{/name}","releases_url":"https://api.github.com/repos/polydawn/repeatr/releases{/id}","created_at":"2015-02-27T18:12:08Z","updated_at":"2015-03-05T06:25:46Z","pushed_at":"2015-03-05T06:25:48Z","git_url":"git://github.com/polydawn/repeatr.git","ssh_url":"git@github.com:polydawn/repeatr.git","clone_url":"https://github.com/polydawn/repeatr.git","svn_url":"https://github.com/polydawn/repeatr","homepage":null,"size":308,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"polydawn:master","ref":"master","sha":"9816f4d70a9c634478afa38de11c6b67e1ae285f","user":{"login":"polydawn","id":5307883,"avatar_url":"https://avatars.githubusercontent.com/u/5307883?v=3","gravatar_id":"","url":"https://api.github.com/users/polydawn","html_url":"https://github.com/polydawn","followers_url":"https://api.github.com/users/polydawn/followers","following_url":"https://api.github.com/users/polydawn/following{/other_user}","gists_url":"https://api.github.com/users/polydawn/gists{/gist_id}","starred_url":"https://api.github.com/users/polydawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polydawn/subscriptions","organizations_url":"https://api.github.com/users/polydawn/orgs","repos_url":"https://api.github.com/users/polydawn/repos","events_url":"https://api.github.com/users/polydawn/events{/privacy}","received_events_url":"https://api.github.com/users/polydawn/received_events","type":"Organization","site_admin":false},"repo":{"id":31432509,"name":"repeatr","full_name":"polydawn/repeatr","owner":{"login":"polydawn","id":5307883,"avatar_url":"https://avatars.githubusercontent.com/u/5307883?v=3","gravatar_id":"","url":"https://api.github.com/users/polydawn","html_url":"https://github.com/polydawn","followers_url":"https://api.github.com/users/polydawn/followers","following_url":"https://api.github.com/users/polydawn/following{/other_user}","gists_url":"https://api.github.com/users/polydawn/gists{/gist_id}","starred_url":"https://api.github.com/users/polydawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polydawn/subscriptions","organizations_url":"https://api.github.com/users/polydawn/orgs","repos_url":"https://api.github.com/users/polydawn/repos","events_url":"https://api.github.com/users/polydawn/events{/privacy}","received_events_url":"https://api.github.com/users/polydawn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/polydawn/repeatr","description":"Run it. Run it again.","fork":false,"url":"https://api.github.com/repos/polydawn/repeatr","forks_url":"https://api.github.com/repos/polydawn/repeatr/forks","keys_url":"https://api.github.com/repos/polydawn/repeatr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/polydawn/repeatr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/polydawn/repeatr/teams","hooks_url":"https://api.github.com/repos/polydawn/repeatr/hooks","issue_events_url":"https://api.github.com/repos/polydawn/repeatr/issues/events{/number}","events_url":"https://api.github.com/repos/polydawn/repeatr/events","assignees_url":"https://api.github.com/repos/polydawn/repeatr/assignees{/user}","branches_url":"https://api.github.com/repos/polydawn/repeatr/branches{/branch}","tags_url":"https://api.github.com/repos/polydawn/repeatr/tags","blobs_url":"https://api.github.com/repos/polydawn/repeatr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/polydawn/repeatr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/polydawn/repeatr/git/refs{/sha}","trees_url":"https://api.github.com/repos/polydawn/repeatr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/polydawn/repeatr/statuses/{sha}","languages_url":"https://api.github.com/repos/polydawn/repeatr/languages","stargazers_url":"https://api.github.com/repos/polydawn/repeatr/stargazers","contributors_url":"https://api.github.com/repos/polydawn/repeatr/contributors","subscribers_url":"https://api.github.com/repos/polydawn/repeatr/subscribers","subscription_url":"https://api.github.com/repos/polydawn/repeatr/subscription","commits_url":"https://api.github.com/repos/polydawn/repeatr/commits{/sha}","git_commits_url":"https://api.github.com/repos/polydawn/repeatr/git/commits{/sha}","comments_url":"https://api.github.com/repos/polydawn/repeatr/comments{/number}","issue_comment_url":"https://api.github.com/repos/polydawn/repeatr/issues/comments{/number}","contents_url":"https://api.github.com/repos/polydawn/repeatr/contents/{+path}","compare_url":"https://api.github.com/repos/polydawn/repeatr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/polydawn/repeatr/merges","archive_url":"https://api.github.com/repos/polydawn/repeatr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/polydawn/repeatr/downloads","issues_url":"https://api.github.com/repos/polydawn/repeatr/issues{/number}","pulls_url":"https://api.github.com/repos/polydawn/repeatr/pulls{/number}","milestones_url":"https://api.github.com/repos/polydawn/repeatr/milestones{/number}","notifications_url":"https://api.github.com/repos/polydawn/repeatr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/polydawn/repeatr/labels{/name}","releases_url":"https://api.github.com/repos/polydawn/repeatr/releases{/id}","created_at":"2015-02-27T18:12:08Z","updated_at":"2015-03-05T06:25:46Z","pushed_at":"2015-03-05T06:25:48Z","git_url":"git://github.com/polydawn/repeatr.git","ssh_url":"git@github.com:polydawn/repeatr.git","clone_url":"https://github.com/polydawn/repeatr.git","svn_url":"https://github.com/polydawn/repeatr","homepage":null,"size":308,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/polydawn/repeatr/pulls/5"},"html":{"href":"https://github.com/polydawn/repeatr/pull/5"},"issue":{"href":"https://api.github.com/repos/polydawn/repeatr/issues/5"},"comments":{"href":"https://api.github.com/repos/polydawn/repeatr/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/polydawn/repeatr/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/polydawn/repeatr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/polydawn/repeatr/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/polydawn/repeatr/statuses/89b8f3187a3c2de0521b5e9f17b4e374ce97cfae"}}}}