{"action":"created","comment":{"url":"https://api.github.com/repos/bobgilmore/githooks/pulls/comments/39005989","id":39005989,"diff_hunk":"@@ -2,17 +2,43 @@\n require \"spec_helper\"\n \n RSpec.describe PreCommitHelper do\n-  describe \".directory_excluded_from_checks?\" do\n+  describe \".directory_excluded_from_all_checks?\" do\n     it \"should return false for a random directory\" do\n-      expect(PreCommitHelper.directory_excluded_from_checks?(\"/home/foo/bar\")).to be_falsey\n+      expect(PreCommitHelper.directory_excluded_from_all_checks?(\"/home/foo/bar\")).to be_falsey\n     end\n \n     it \"should return true for an assets/**/vendor directory\" do\n-      expect(PreCommitHelper.directory_excluded_from_checks?(\"/my/dir/assets/images/vendor/foo\")).to be_truthy\n+      expect(PreCommitHelper.directory_excluded_from_all_checks?(\"/my/dir/assets/images/vendor/foo\")).to be_truthy\n     end\n \n     it \"should return false for an assets directory\" do\n-      expect(PreCommitHelper.directory_excluded_from_checks?(\"/my/dir/assets/foo\")).to be_falsey\n+      expect(PreCommitHelper.directory_excluded_from_all_checks?(\"/my/dir/assets/foo\")).to be_falsey\n+    end\n+  end\n+\n+  describe \".check_file?\" do\n+    it \"should return true if no extensions are specified\" do\n+      expect(PreCommitHelper.check_file?({ file: \"/home/foo/bar.a\" })).to be_truthy\n+    end\n+\n+    it \"should return true if there is a match to extensions_to_include\" do\n+      expect(PreCommitHelper.check_file?({ file: \"/home/foo/bar.a\", extensions_to_include: [\".a\", \".b\"] })).to be_truthy\n+    end\n+\n+    it \"should return false if there is a match to extensions_to_include\" do\n+      expect(PreCommitHelper.check_file?({ file: \"/home/foo/bar.a\", extensions_to_include: [\".c\", \".d\"] })).to be_falsey\n+    end\n+\n+    it \"should return false if there is a match to extensions_to_ignore\" do\n+      expect(PreCommitHelper.check_file?({ file: \"/home/foo/bar.a\", extensions_to_ignore: [\".a\", \".b\"] })).to be_falsey","path":"spec/pre_commit/pre_commit_helper_spec.rb","position":36,"original_position":36,"commit_id":"08242bb8044086e1b11bd7e533b0f6becb124b1c","original_commit_id":"08242bb8044086e1b11bd7e533b0f6becb124b1c","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Redundant curly braces around a hash parameter.","created_at":"2015-09-09T04:17:53Z","updated_at":"2015-09-09T04:17:53Z","html_url":"https://github.com/bobgilmore/githooks/pull/48#discussion_r39005989","pull_request_url":"https://api.github.com/repos/bobgilmore/githooks/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/bobgilmore/githooks/pulls/comments/39005989"},"html":{"href":"https://github.com/bobgilmore/githooks/pull/48#discussion_r39005989"},"pull_request":{"href":"https://api.github.com/repos/bobgilmore/githooks/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/bobgilmore/githooks/pulls/48","id":44509214,"html_url":"https://github.com/bobgilmore/githooks/pull/48","diff_url":"https://github.com/bobgilmore/githooks/pull/48.diff","patch_url":"https://github.com/bobgilmore/githooks/pull/48.patch","issue_url":"https://api.github.com/repos/bobgilmore/githooks/issues/48","number":48,"state":"open","locked":false,"title":"Cleanup argument lists","user":{"login":"bobgilmore","id":677714,"avatar_url":"https://avatars.githubusercontent.com/u/677714?v=3","gravatar_id":"","url":"https://api.github.com/users/bobgilmore","html_url":"https://github.com/bobgilmore","followers_url":"https://api.github.com/users/bobgilmore/followers","following_url":"https://api.github.com/users/bobgilmore/following{/other_user}","gists_url":"https://api.github.com/users/bobgilmore/gists{/gist_id}","starred_url":"https://api.github.com/users/bobgilmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobgilmore/subscriptions","organizations_url":"https://api.github.com/users/bobgilmore/orgs","repos_url":"https://api.github.com/users/bobgilmore/repos","events_url":"https://api.github.com/users/bobgilmore/events{/privacy}","received_events_url":"https://api.github.com/users/bobgilmore/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-09T04:17:48Z","updated_at":"2015-09-09T04:17:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2ef5009507a816086a755c927deb67cde85ba92","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bobgilmore/githooks/pulls/48/commits","review_comments_url":"https://api.github.com/repos/bobgilmore/githooks/pulls/48/comments","review_comment_url":"https://api.github.com/repos/bobgilmore/githooks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bobgilmore/githooks/issues/48/comments","statuses_url":"https://api.github.com/repos/bobgilmore/githooks/statuses/08242bb8044086e1b11bd7e533b0f6becb124b1c","head":{"label":"bobgilmore:cleanup-argument-lists","ref":"cleanup-argument-lists","sha":"08242bb8044086e1b11bd7e533b0f6becb124b1c","user":{"login":"bobgilmore","id":677714,"avatar_url":"https://avatars.githubusercontent.com/u/677714?v=3","gravatar_id":"","url":"https://api.github.com/users/bobgilmore","html_url":"https://github.com/bobgilmore","followers_url":"https://api.github.com/users/bobgilmore/followers","following_url":"https://api.github.com/users/bobgilmore/following{/other_user}","gists_url":"https://api.github.com/users/bobgilmore/gists{/gist_id}","starred_url":"https://api.github.com/users/bobgilmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobgilmore/subscriptions","organizations_url":"https://api.github.com/users/bobgilmore/orgs","repos_url":"https://api.github.com/users/bobgilmore/repos","events_url":"https://api.github.com/users/bobgilmore/events{/privacy}","received_events_url":"https://api.github.com/users/bobgilmore/received_events","type":"User","site_admin":false},"repo":{"id":7862780,"name":"githooks","full_name":"bobgilmore/githooks","owner":{"login":"bobgilmore","id":677714,"avatar_url":"https://avatars.githubusercontent.com/u/677714?v=3","gravatar_id":"","url":"https://api.github.com/users/bobgilmore","html_url":"https://github.com/bobgilmore","followers_url":"https://api.github.com/users/bobgilmore/followers","following_url":"https://api.github.com/users/bobgilmore/following{/other_user}","gists_url":"https://api.github.com/users/bobgilmore/gists{/gist_id}","starred_url":"https://api.github.com/users/bobgilmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobgilmore/subscriptions","organizations_url":"https://api.github.com/users/bobgilmore/orgs","repos_url":"https://api.github.com/users/bobgilmore/repos","events_url":"https://api.github.com/users/bobgilmore/events{/privacy}","received_events_url":"https://api.github.com/users/bobgilmore/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bobgilmore/githooks","description":"My personal githooks, which help me avoid silly or obvious mistakes.","fork":false,"url":"https://api.github.com/repos/bobgilmore/githooks","forks_url":"https://api.github.com/repos/bobgilmore/githooks/forks","keys_url":"https://api.github.com/repos/bobgilmore/githooks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bobgilmore/githooks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bobgilmore/githooks/teams","hooks_url":"https://api.github.com/repos/bobgilmore/githooks/hooks","issue_events_url":"https://api.github.com/repos/bobgilmore/githooks/issues/events{/number}","events_url":"https://api.github.com/repos/bobgilmore/githooks/events","assignees_url":"https://api.github.com/repos/bobgilmore/githooks/assignees{/user}","branches_url":"https://api.github.com/repos/bobgilmore/githooks/branches{/branch}","tags_url":"https://api.github.com/repos/bobgilmore/githooks/tags","blobs_url":"https://api.github.com/repos/bobgilmore/githooks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bobgilmore/githooks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bobgilmore/githooks/git/refs{/sha}","trees_url":"https://api.github.com/repos/bobgilmore/githooks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bobgilmore/githooks/statuses/{sha}","languages_url":"https://api.github.com/repos/bobgilmore/githooks/languages","stargazers_url":"https://api.github.com/repos/bobgilmore/githooks/stargazers","contributors_url":"https://api.github.com/repos/bobgilmore/githooks/contributors","subscribers_url":"https://api.github.com/repos/bobgilmore/githooks/subscribers","subscription_url":"https://api.github.com/repos/bobgilmore/githooks/subscription","commits_url":"https://api.github.com/repos/bobgilmore/githooks/commits{/sha}","git_commits_url":"https://api.github.com/repos/bobgilmore/githooks/git/commits{/sha}","comments_url":"https://api.github.com/repos/bobgilmore/githooks/comments{/number}","issue_comment_url":"https://api.github.com/repos/bobgilmore/githooks/issues/comments{/number}","contents_url":"https://api.github.com/repos/bobgilmore/githooks/contents/{+path}","compare_url":"https://api.github.com/repos/bobgilmore/githooks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bobgilmore/githooks/merges","archive_url":"https://api.github.com/repos/bobgilmore/githooks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bobgilmore/githooks/downloads","issues_url":"https://api.github.com/repos/bobgilmore/githooks/issues{/number}","pulls_url":"https://api.github.com/repos/bobgilmore/githooks/pulls{/number}","milestones_url":"https://api.github.com/repos/bobgilmore/githooks/milestones{/number}","notifications_url":"https://api.github.com/repos/bobgilmore/githooks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bobgilmore/githooks/labels{/name}","releases_url":"https://api.github.com/repos/bobgilmore/githooks/releases{/id}","created_at":"2013-01-28T03:54:00Z","updated_at":"2015-08-21T05:01:20Z","pushed_at":"2015-09-09T04:17:49Z","git_url":"git://github.com/bobgilmore/githooks.git","ssh_url":"git@github.com:bobgilmore/githooks.git","clone_url":"https://github.com/bobgilmore/githooks.git","svn_url":"https://github.com/bobgilmore/githooks","homepage":"","size":785,"stargazers_count":27,"watchers_count":27,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":7,"forks":20,"open_issues":7,"watchers":27,"default_branch":"master"}},"base":{"label":"bobgilmore:master","ref":"master","sha":"8ea3d7e17aea29c5d408656624aa1d31ee3bce44","user":{"login":"bobgilmore","id":677714,"avatar_url":"https://avatars.githubusercontent.com/u/677714?v=3","gravatar_id":"","url":"https://api.github.com/users/bobgilmore","html_url":"https://github.com/bobgilmore","followers_url":"https://api.github.com/users/bobgilmore/followers","following_url":"https://api.github.com/users/bobgilmore/following{/other_user}","gists_url":"https://api.github.com/users/bobgilmore/gists{/gist_id}","starred_url":"https://api.github.com/users/bobgilmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobgilmore/subscriptions","organizations_url":"https://api.github.com/users/bobgilmore/orgs","repos_url":"https://api.github.com/users/bobgilmore/repos","events_url":"https://api.github.com/users/bobgilmore/events{/privacy}","received_events_url":"https://api.github.com/users/bobgilmore/received_events","type":"User","site_admin":false},"repo":{"id":7862780,"name":"githooks","full_name":"bobgilmore/githooks","owner":{"login":"bobgilmore","id":677714,"avatar_url":"https://avatars.githubusercontent.com/u/677714?v=3","gravatar_id":"","url":"https://api.github.com/users/bobgilmore","html_url":"https://github.com/bobgilmore","followers_url":"https://api.github.com/users/bobgilmore/followers","following_url":"https://api.github.com/users/bobgilmore/following{/other_user}","gists_url":"https://api.github.com/users/bobgilmore/gists{/gist_id}","starred_url":"https://api.github.com/users/bobgilmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobgilmore/subscriptions","organizations_url":"https://api.github.com/users/bobgilmore/orgs","repos_url":"https://api.github.com/users/bobgilmore/repos","events_url":"https://api.github.com/users/bobgilmore/events{/privacy}","received_events_url":"https://api.github.com/users/bobgilmore/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bobgilmore/githooks","description":"My personal githooks, which help me avoid silly or obvious mistakes.","fork":false,"url":"https://api.github.com/repos/bobgilmore/githooks","forks_url":"https://api.github.com/repos/bobgilmore/githooks/forks","keys_url":"https://api.github.com/repos/bobgilmore/githooks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bobgilmore/githooks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bobgilmore/githooks/teams","hooks_url":"https://api.github.com/repos/bobgilmore/githooks/hooks","issue_events_url":"https://api.github.com/repos/bobgilmore/githooks/issues/events{/number}","events_url":"https://api.github.com/repos/bobgilmore/githooks/events","assignees_url":"https://api.github.com/repos/bobgilmore/githooks/assignees{/user}","branches_url":"https://api.github.com/repos/bobgilmore/githooks/branches{/branch}","tags_url":"https://api.github.com/repos/bobgilmore/githooks/tags","blobs_url":"https://api.github.com/repos/bobgilmore/githooks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bobgilmore/githooks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bobgilmore/githooks/git/refs{/sha}","trees_url":"https://api.github.com/repos/bobgilmore/githooks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bobgilmore/githooks/statuses/{sha}","languages_url":"https://api.github.com/repos/bobgilmore/githooks/languages","stargazers_url":"https://api.github.com/repos/bobgilmore/githooks/stargazers","contributors_url":"https://api.github.com/repos/bobgilmore/githooks/contributors","subscribers_url":"https://api.github.com/repos/bobgilmore/githooks/subscribers","subscription_url":"https://api.github.com/repos/bobgilmore/githooks/subscription","commits_url":"https://api.github.com/repos/bobgilmore/githooks/commits{/sha}","git_commits_url":"https://api.github.com/repos/bobgilmore/githooks/git/commits{/sha}","comments_url":"https://api.github.com/repos/bobgilmore/githooks/comments{/number}","issue_comment_url":"https://api.github.com/repos/bobgilmore/githooks/issues/comments{/number}","contents_url":"https://api.github.com/repos/bobgilmore/githooks/contents/{+path}","compare_url":"https://api.github.com/repos/bobgilmore/githooks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bobgilmore/githooks/merges","archive_url":"https://api.github.com/repos/bobgilmore/githooks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bobgilmore/githooks/downloads","issues_url":"https://api.github.com/repos/bobgilmore/githooks/issues{/number}","pulls_url":"https://api.github.com/repos/bobgilmore/githooks/pulls{/number}","milestones_url":"https://api.github.com/repos/bobgilmore/githooks/milestones{/number}","notifications_url":"https://api.github.com/repos/bobgilmore/githooks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bobgilmore/githooks/labels{/name}","releases_url":"https://api.github.com/repos/bobgilmore/githooks/releases{/id}","created_at":"2013-01-28T03:54:00Z","updated_at":"2015-08-21T05:01:20Z","pushed_at":"2015-09-09T04:17:49Z","git_url":"git://github.com/bobgilmore/githooks.git","ssh_url":"git@github.com:bobgilmore/githooks.git","clone_url":"https://github.com/bobgilmore/githooks.git","svn_url":"https://github.com/bobgilmore/githooks","homepage":"","size":785,"stargazers_count":27,"watchers_count":27,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":7,"forks":20,"open_issues":7,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bobgilmore/githooks/pulls/48"},"html":{"href":"https://github.com/bobgilmore/githooks/pull/48"},"issue":{"href":"https://api.github.com/repos/bobgilmore/githooks/issues/48"},"comments":{"href":"https://api.github.com/repos/bobgilmore/githooks/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/bobgilmore/githooks/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/bobgilmore/githooks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bobgilmore/githooks/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/bobgilmore/githooks/statuses/08242bb8044086e1b11bd7e533b0f6becb124b1c"}}}}