{"action":"created","comment":{"url":"https://api.github.com/repos/chef/chef/pulls/comments/29637572","id":29637572,"diff_hunk":"@@ -80,6 +93,63 @@ def install_package(name, version)\n         def remove_package(name, version)\n           package_provider.remove_package(name, version)\n         end\n+\n+        # @return [Array] new_version(s) as an array\n+        def new_version_array\n+          # Because the one in the parent caches things\n+          [new_resource.version]\n+        end\n+\n+        private\n+\n+        def should_download?\n+          is_url?(new_resource.source) && !::File.exists?(source_location)\n+        end\n+\n+        def resource_for_provider\n+          @resource_for_provider = Chef::Resource::WindowsPackage.new(new_resource.name).tap do |r|\n+            r.source(Chef::Util::PathHelper.validate_path(source_location))\n+            r.timeout(new_resource.timeout)\n+            r.returns(new_resource.returns)\n+            r.options(new_resource.options)\n+          end\n+        end\n+\n+        def download_source_file\n+          source_resource.run_action(:create)\n+          Chef::Log.debug(\"#{@new_resource} fetched source file to #{source_resource.path}\")\n+        end\n+\n+        def source_resource","path":"lib/chef/provider/package/windows.rb","position":84,"original_position":84,"commit_id":"bc2b909b405997537847f4875c2293b579f70807","original_commit_id":"bc2b909b405997537847f4875c2293b579f70807","user":{"login":"btm","id":4381,"avatar_url":"https://avatars.githubusercontent.com/u/4381?v=3","gravatar_id":"","url":"https://api.github.com/users/btm","html_url":"https://github.com/btm","followers_url":"https://api.github.com/users/btm/followers","following_url":"https://api.github.com/users/btm/following{/other_user}","gists_url":"https://api.github.com/users/btm/gists{/gist_id}","starred_url":"https://api.github.com/users/btm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btm/subscriptions","organizations_url":"https://api.github.com/users/btm/orgs","repos_url":"https://api.github.com/users/btm/repos","events_url":"https://api.github.com/users/btm/events{/privacy}","received_events_url":"https://api.github.com/users/btm/received_events","type":"User","site_admin":false},"body":"how do you set checksum on the remote_file resource? Can we have an attribute that we pass a hash of attributes that gets set on the remote_file resource?","created_at":"2015-05-05T00:41:19Z","updated_at":"2015-05-05T00:41:19Z","html_url":"https://github.com/chef/chef/pull/3318#discussion_r29637572","pull_request_url":"https://api.github.com/repos/chef/chef/pulls/3318","_links":{"self":{"href":"https://api.github.com/repos/chef/chef/pulls/comments/29637572"},"html":{"href":"https://github.com/chef/chef/pull/3318#discussion_r29637572"},"pull_request":{"href":"https://api.github.com/repos/chef/chef/pulls/3318"}}},"pull_request":{"url":"https://api.github.com/repos/chef/chef/pulls/3318","id":34506135,"html_url":"https://github.com/chef/chef/pull/3318","diff_url":"https://github.com/chef/chef/pull/3318.diff","patch_url":"https://github.com/chef/chef/pull/3318.patch","issue_url":"https://api.github.com/repos/chef/chef/issues/3318","number":3318,"state":"open","locked":false,"title":"Modify windows package provider to allow url","user":{"login":"jdmundrawala","id":27443,"avatar_url":"https://avatars.githubusercontent.com/u/27443?v=3","gravatar_id":"","url":"https://api.github.com/users/jdmundrawala","html_url":"https://github.com/jdmundrawala","followers_url":"https://api.github.com/users/jdmundrawala/followers","following_url":"https://api.github.com/users/jdmundrawala/following{/other_user}","gists_url":"https://api.github.com/users/jdmundrawala/gists{/gist_id}","starred_url":"https://api.github.com/users/jdmundrawala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdmundrawala/subscriptions","organizations_url":"https://api.github.com/users/jdmundrawala/orgs","repos_url":"https://api.github.com/users/jdmundrawala/repos","events_url":"https://api.github.com/users/jdmundrawala/events{/privacy}","received_events_url":"https://api.github.com/users/jdmundrawala/received_events","type":"User","site_admin":false},"body":"This patch allows people to specify a url for source for the `windows_package` resource.\r\n\r\ncc @btm @smurawski @ksubrama","created_at":"2015-04-30T22:09:34Z","updated_at":"2015-05-05T00:41:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9874ba9c634f9531d9184485fcb45a990e55f7d3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chef/chef/pulls/3318/commits","review_comments_url":"https://api.github.com/repos/chef/chef/pulls/3318/comments","review_comment_url":"https://api.github.com/repos/chef/chef/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chef/chef/issues/3318/comments","statuses_url":"https://api.github.com/repos/chef/chef/statuses/bc2b909b405997537847f4875c2293b579f70807","head":{"label":"chef:jdm/msi-uri-source","ref":"jdm/msi-uri-source","sha":"bc2b909b405997537847f4875c2293b579f70807","user":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"repo":{"id":108278,"name":"chef","full_name":"chef/chef","owner":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chef/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/chef/chef","forks_url":"https://api.github.com/repos/chef/chef/forks","keys_url":"https://api.github.com/repos/chef/chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chef/chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chef/chef/teams","hooks_url":"https://api.github.com/repos/chef/chef/hooks","issue_events_url":"https://api.github.com/repos/chef/chef/issues/events{/number}","events_url":"https://api.github.com/repos/chef/chef/events","assignees_url":"https://api.github.com/repos/chef/chef/assignees{/user}","branches_url":"https://api.github.com/repos/chef/chef/branches{/branch}","tags_url":"https://api.github.com/repos/chef/chef/tags","blobs_url":"https://api.github.com/repos/chef/chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chef/chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chef/chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/chef/chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chef/chef/statuses/{sha}","languages_url":"https://api.github.com/repos/chef/chef/languages","stargazers_url":"https://api.github.com/repos/chef/chef/stargazers","contributors_url":"https://api.github.com/repos/chef/chef/contributors","subscribers_url":"https://api.github.com/repos/chef/chef/subscribers","subscription_url":"https://api.github.com/repos/chef/chef/subscription","commits_url":"https://api.github.com/repos/chef/chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/chef/chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/chef/chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/chef/chef/issues/comments{/number}","contents_url":"https://api.github.com/repos/chef/chef/contents/{+path}","compare_url":"https://api.github.com/repos/chef/chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chef/chef/merges","archive_url":"https://api.github.com/repos/chef/chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chef/chef/downloads","issues_url":"https://api.github.com/repos/chef/chef/issues{/number}","pulls_url":"https://api.github.com/repos/chef/chef/pulls{/number}","milestones_url":"https://api.github.com/repos/chef/chef/milestones{/number}","notifications_url":"https://api.github.com/repos/chef/chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chef/chef/labels{/name}","releases_url":"https://api.github.com/repos/chef/chef/releases{/id}","created_at":"2009-01-15T20:40:48Z","updated_at":"2015-05-04T23:25:34Z","pushed_at":"2015-05-04T23:50:40Z","git_url":"git://github.com/chef/chef.git","ssh_url":"git@github.com:chef/chef.git","clone_url":"https://github.com/chef/chef.git","svn_url":"https://github.com/chef/chef","homepage":"http://www.chef.io/chef/","size":167619,"stargazers_count":3571,"watchers_count":3571,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1443,"mirror_url":null,"open_issues_count":435,"forks":1443,"open_issues":435,"watchers":3571,"default_branch":"master"}},"base":{"label":"chef:master","ref":"master","sha":"c6c7329ff54851390e0e84d0b681ee8396b3f34c","user":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"repo":{"id":108278,"name":"chef","full_name":"chef/chef","owner":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chef/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/chef/chef","forks_url":"https://api.github.com/repos/chef/chef/forks","keys_url":"https://api.github.com/repos/chef/chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chef/chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chef/chef/teams","hooks_url":"https://api.github.com/repos/chef/chef/hooks","issue_events_url":"https://api.github.com/repos/chef/chef/issues/events{/number}","events_url":"https://api.github.com/repos/chef/chef/events","assignees_url":"https://api.github.com/repos/chef/chef/assignees{/user}","branches_url":"https://api.github.com/repos/chef/chef/branches{/branch}","tags_url":"https://api.github.com/repos/chef/chef/tags","blobs_url":"https://api.github.com/repos/chef/chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chef/chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chef/chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/chef/chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chef/chef/statuses/{sha}","languages_url":"https://api.github.com/repos/chef/chef/languages","stargazers_url":"https://api.github.com/repos/chef/chef/stargazers","contributors_url":"https://api.github.com/repos/chef/chef/contributors","subscribers_url":"https://api.github.com/repos/chef/chef/subscribers","subscription_url":"https://api.github.com/repos/chef/chef/subscription","commits_url":"https://api.github.com/repos/chef/chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/chef/chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/chef/chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/chef/chef/issues/comments{/number}","contents_url":"https://api.github.com/repos/chef/chef/contents/{+path}","compare_url":"https://api.github.com/repos/chef/chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chef/chef/merges","archive_url":"https://api.github.com/repos/chef/chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chef/chef/downloads","issues_url":"https://api.github.com/repos/chef/chef/issues{/number}","pulls_url":"https://api.github.com/repos/chef/chef/pulls{/number}","milestones_url":"https://api.github.com/repos/chef/chef/milestones{/number}","notifications_url":"https://api.github.com/repos/chef/chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chef/chef/labels{/name}","releases_url":"https://api.github.com/repos/chef/chef/releases{/id}","created_at":"2009-01-15T20:40:48Z","updated_at":"2015-05-04T23:25:34Z","pushed_at":"2015-05-04T23:50:40Z","git_url":"git://github.com/chef/chef.git","ssh_url":"git@github.com:chef/chef.git","clone_url":"https://github.com/chef/chef.git","svn_url":"https://github.com/chef/chef","homepage":"http://www.chef.io/chef/","size":167619,"stargazers_count":3571,"watchers_count":3571,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1443,"mirror_url":null,"open_issues_count":435,"forks":1443,"open_issues":435,"watchers":3571,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chef/chef/pulls/3318"},"html":{"href":"https://github.com/chef/chef/pull/3318"},"issue":{"href":"https://api.github.com/repos/chef/chef/issues/3318"},"comments":{"href":"https://api.github.com/repos/chef/chef/issues/3318/comments"},"review_comments":{"href":"https://api.github.com/repos/chef/chef/pulls/3318/comments"},"review_comment":{"href":"https://api.github.com/repos/chef/chef/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chef/chef/pulls/3318/commits"},"statuses":{"href":"https://api.github.com/repos/chef/chef/statuses/bc2b909b405997537847f4875c2293b579f70807"}}}}