{"action":"created","comment":{"url":"https://api.github.com/repos/opscode/chef/pulls/comments/22426170","id":22426170,"diff_hunk":"@@ -115,6 +117,18 @@ def manage_symlink_source(arg=nil)\n           :kind_of => [ TrueClass, FalseClass ]\n         )\n       end\n+\n+      def verify(command=nil, opts={}, &block)\n+        if ! (command.nil? || [String, Symbol].include?(command.class))\n+          raise ArgumentError, \"verify requires either a string, symbol, or a block\"\n+        end\n+\n+        if command || block_given?\n+          @user_verifications << Verification.new(self, command, opts, &block)","path":"lib/chef/resource/file.rb","position":27,"original_position":27,"commit_id":"8632c46e3ae6faa08ddfe69af5450d7f450d1b0b","original_commit_id":"8632c46e3ae6faa08ddfe69af5450d7f450d1b0b","user":{"login":"tyler-ball","id":2481463,"avatar_url":"https://avatars.githubusercontent.com/u/2481463?v=3","gravatar_id":"","url":"https://api.github.com/users/tyler-ball","html_url":"https://github.com/tyler-ball","followers_url":"https://api.github.com/users/tyler-ball/followers","following_url":"https://api.github.com/users/tyler-ball/following{/other_user}","gists_url":"https://api.github.com/users/tyler-ball/gists{/gist_id}","starred_url":"https://api.github.com/users/tyler-ball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyler-ball/subscriptions","organizations_url":"https://api.github.com/users/tyler-ball/orgs","repos_url":"https://api.github.com/users/tyler-ball/repos","events_url":"https://api.github.com/users/tyler-ball/events{/privacy}","received_events_url":"https://api.github.com/users/tyler-ball/received_events","type":"User","site_admin":false},"body":"I agree with @lamont-granquist  - I don't think the `user_` is any more informative than `file_` would be, so leave it off if there are no naming collisions.","created_at":"2015-01-02T23:03:59Z","updated_at":"2015-01-02T23:03:59Z","html_url":"https://github.com/opscode/chef/pull/2581#discussion_r22426170","pull_request_url":"https://api.github.com/repos/opscode/chef/pulls/2581","_links":{"self":{"href":"https://api.github.com/repos/opscode/chef/pulls/comments/22426170"},"html":{"href":"https://github.com/opscode/chef/pull/2581#discussion_r22426170"},"pull_request":{"href":"https://api.github.com/repos/opscode/chef/pulls/2581"}}},"pull_request":{"url":"https://api.github.com/repos/opscode/chef/pulls/2581","id":25742968,"html_url":"https://github.com/opscode/chef/pull/2581","diff_url":"https://github.com/opscode/chef/pull/2581.diff","patch_url":"https://github.com/opscode/chef/pull/2581.patch","issue_url":"https://api.github.com/repos/opscode/chef/issues/2581","number":2581,"state":"open","locked":false,"title":"Implement RFC 027 File Verification","user":{"login":"stevendanna","id":852371,"avatar_url":"https://avatars.githubusercontent.com/u/852371?v=3","gravatar_id":"","url":"https://api.github.com/users/stevendanna","html_url":"https://github.com/stevendanna","followers_url":"https://api.github.com/users/stevendanna/followers","following_url":"https://api.github.com/users/stevendanna/following{/other_user}","gists_url":"https://api.github.com/users/stevendanna/gists{/gist_id}","starred_url":"https://api.github.com/users/stevendanna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevendanna/subscriptions","organizations_url":"https://api.github.com/users/stevendanna/orgs","repos_url":"https://api.github.com/users/stevendanna/repos","events_url":"https://api.github.com/users/stevendanna/events{/privacy}","received_events_url":"https://api.github.com/users/stevendanna/received_events","type":"User","site_admin":false},"body":"This implements user-suppliable file content verification per RFC\r\n027. Users can supply a block, string, or symbol to the `verify`\r\nresource attribute.  Blocks will be called, string will be executed as\r\nshell commands (respecting the same options as not_if and only_if), and\r\nsymbols can be used to access built-in registered validations.","created_at":"2014-12-09T13:36:04Z","updated_at":"2015-01-02T23:03:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1c8e6b2f0a819f1eb917526252a47c0798142d4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opscode/chef/pulls/2581/commits","review_comments_url":"https://api.github.com/repos/opscode/chef/pulls/2581/comments","review_comment_url":"https://api.github.com/repos/opscode/chef/pulls/comments/{number}","comments_url":"https://api.github.com/repos/opscode/chef/issues/2581/comments","statuses_url":"https://api.github.com/repos/opscode/chef/statuses/8632c46e3ae6faa08ddfe69af5450d7f450d1b0b","head":{"label":"opscode:ssd/file-verification","ref":"ssd/file-verification","sha":"8632c46e3ae6faa08ddfe69af5450d7f450d1b0b","user":{"login":"opscode","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/opscode","html_url":"https://github.com/opscode","followers_url":"https://api.github.com/users/opscode/followers","following_url":"https://api.github.com/users/opscode/following{/other_user}","gists_url":"https://api.github.com/users/opscode/gists{/gist_id}","starred_url":"https://api.github.com/users/opscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opscode/subscriptions","organizations_url":"https://api.github.com/users/opscode/orgs","repos_url":"https://api.github.com/users/opscode/repos","events_url":"https://api.github.com/users/opscode/events{/privacy}","received_events_url":"https://api.github.com/users/opscode/received_events","type":"Organization","site_admin":false},"repo":{"id":108278,"name":"chef","full_name":"opscode/chef","owner":{"login":"opscode","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/opscode","html_url":"https://github.com/opscode","followers_url":"https://api.github.com/users/opscode/followers","following_url":"https://api.github.com/users/opscode/following{/other_user}","gists_url":"https://api.github.com/users/opscode/gists{/gist_id}","starred_url":"https://api.github.com/users/opscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opscode/subscriptions","organizations_url":"https://api.github.com/users/opscode/orgs","repos_url":"https://api.github.com/users/opscode/repos","events_url":"https://api.github.com/users/opscode/events{/privacy}","received_events_url":"https://api.github.com/users/opscode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opscode/chef","description":"A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.","fork":false,"url":"https://api.github.com/repos/opscode/chef","forks_url":"https://api.github.com/repos/opscode/chef/forks","keys_url":"https://api.github.com/repos/opscode/chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opscode/chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opscode/chef/teams","hooks_url":"https://api.github.com/repos/opscode/chef/hooks","issue_events_url":"https://api.github.com/repos/opscode/chef/issues/events{/number}","events_url":"https://api.github.com/repos/opscode/chef/events","assignees_url":"https://api.github.com/repos/opscode/chef/assignees{/user}","branches_url":"https://api.github.com/repos/opscode/chef/branches{/branch}","tags_url":"https://api.github.com/repos/opscode/chef/tags","blobs_url":"https://api.github.com/repos/opscode/chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opscode/chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opscode/chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/opscode/chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opscode/chef/statuses/{sha}","languages_url":"https://api.github.com/repos/opscode/chef/languages","stargazers_url":"https://api.github.com/repos/opscode/chef/stargazers","contributors_url":"https://api.github.com/repos/opscode/chef/contributors","subscribers_url":"https://api.github.com/repos/opscode/chef/subscribers","subscription_url":"https://api.github.com/repos/opscode/chef/subscription","commits_url":"https://api.github.com/repos/opscode/chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/opscode/chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/opscode/chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/opscode/chef/issues/comments/{number}","contents_url":"https://api.github.com/repos/opscode/chef/contents/{+path}","compare_url":"https://api.github.com/repos/opscode/chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opscode/chef/merges","archive_url":"https://api.github.com/repos/opscode/chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opscode/chef/downloads","issues_url":"https://api.github.com/repos/opscode/chef/issues{/number}","pulls_url":"https://api.github.com/repos/opscode/chef/pulls{/number}","milestones_url":"https://api.github.com/repos/opscode/chef/milestones{/number}","notifications_url":"https://api.github.com/repos/opscode/chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opscode/chef/labels{/name}","releases_url":"https://api.github.com/repos/opscode/chef/releases{/id}","created_at":"2009-01-15T20:40:48Z","updated_at":"2015-01-02T14:30:20Z","pushed_at":"2014-12-29T23:56:55Z","git_url":"git://github.com/opscode/chef.git","ssh_url":"git@github.com:opscode/chef.git","clone_url":"https://github.com/opscode/chef.git","svn_url":"https://github.com/opscode/chef","homepage":"http://www.getchef.com/chef/","size":157575,"stargazers_count":3266,"watchers_count":3266,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1319,"mirror_url":null,"open_issues_count":355,"forks":1319,"open_issues":355,"watchers":3266,"default_branch":"master"}},"base":{"label":"opscode:master","ref":"master","sha":"ede404fef4ae02cccca0f8ca653b2200d76a1679","user":{"login":"opscode","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/opscode","html_url":"https://github.com/opscode","followers_url":"https://api.github.com/users/opscode/followers","following_url":"https://api.github.com/users/opscode/following{/other_user}","gists_url":"https://api.github.com/users/opscode/gists{/gist_id}","starred_url":"https://api.github.com/users/opscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opscode/subscriptions","organizations_url":"https://api.github.com/users/opscode/orgs","repos_url":"https://api.github.com/users/opscode/repos","events_url":"https://api.github.com/users/opscode/events{/privacy}","received_events_url":"https://api.github.com/users/opscode/received_events","type":"Organization","site_admin":false},"repo":{"id":108278,"name":"chef","full_name":"opscode/chef","owner":{"login":"opscode","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/opscode","html_url":"https://github.com/opscode","followers_url":"https://api.github.com/users/opscode/followers","following_url":"https://api.github.com/users/opscode/following{/other_user}","gists_url":"https://api.github.com/users/opscode/gists{/gist_id}","starred_url":"https://api.github.com/users/opscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opscode/subscriptions","organizations_url":"https://api.github.com/users/opscode/orgs","repos_url":"https://api.github.com/users/opscode/repos","events_url":"https://api.github.com/users/opscode/events{/privacy}","received_events_url":"https://api.github.com/users/opscode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opscode/chef","description":"A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.","fork":false,"url":"https://api.github.com/repos/opscode/chef","forks_url":"https://api.github.com/repos/opscode/chef/forks","keys_url":"https://api.github.com/repos/opscode/chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opscode/chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opscode/chef/teams","hooks_url":"https://api.github.com/repos/opscode/chef/hooks","issue_events_url":"https://api.github.com/repos/opscode/chef/issues/events{/number}","events_url":"https://api.github.com/repos/opscode/chef/events","assignees_url":"https://api.github.com/repos/opscode/chef/assignees{/user}","branches_url":"https://api.github.com/repos/opscode/chef/branches{/branch}","tags_url":"https://api.github.com/repos/opscode/chef/tags","blobs_url":"https://api.github.com/repos/opscode/chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opscode/chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opscode/chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/opscode/chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opscode/chef/statuses/{sha}","languages_url":"https://api.github.com/repos/opscode/chef/languages","stargazers_url":"https://api.github.com/repos/opscode/chef/stargazers","contributors_url":"https://api.github.com/repos/opscode/chef/contributors","subscribers_url":"https://api.github.com/repos/opscode/chef/subscribers","subscription_url":"https://api.github.com/repos/opscode/chef/subscription","commits_url":"https://api.github.com/repos/opscode/chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/opscode/chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/opscode/chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/opscode/chef/issues/comments/{number}","contents_url":"https://api.github.com/repos/opscode/chef/contents/{+path}","compare_url":"https://api.github.com/repos/opscode/chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opscode/chef/merges","archive_url":"https://api.github.com/repos/opscode/chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opscode/chef/downloads","issues_url":"https://api.github.com/repos/opscode/chef/issues{/number}","pulls_url":"https://api.github.com/repos/opscode/chef/pulls{/number}","milestones_url":"https://api.github.com/repos/opscode/chef/milestones{/number}","notifications_url":"https://api.github.com/repos/opscode/chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opscode/chef/labels{/name}","releases_url":"https://api.github.com/repos/opscode/chef/releases{/id}","created_at":"2009-01-15T20:40:48Z","updated_at":"2015-01-02T14:30:20Z","pushed_at":"2014-12-29T23:56:55Z","git_url":"git://github.com/opscode/chef.git","ssh_url":"git@github.com:opscode/chef.git","clone_url":"https://github.com/opscode/chef.git","svn_url":"https://github.com/opscode/chef","homepage":"http://www.getchef.com/chef/","size":157575,"stargazers_count":3266,"watchers_count":3266,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1319,"mirror_url":null,"open_issues_count":355,"forks":1319,"open_issues":355,"watchers":3266,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opscode/chef/pulls/2581"},"html":{"href":"https://github.com/opscode/chef/pull/2581"},"issue":{"href":"https://api.github.com/repos/opscode/chef/issues/2581"},"comments":{"href":"https://api.github.com/repos/opscode/chef/issues/2581/comments"},"review_comments":{"href":"https://api.github.com/repos/opscode/chef/pulls/2581/comments"},"review_comment":{"href":"https://api.github.com/repos/opscode/chef/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/opscode/chef/pulls/2581/commits"},"statuses":{"href":"https://api.github.com/repos/opscode/chef/statuses/8632c46e3ae6faa08ddfe69af5450d7f450d1b0b"}}}}