{"action":"created","comment":{"url":"https://api.github.com/repos/chef/chef/pulls/comments/193947071","pull_request_review_id":127025323,"id":193947071,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Mzk0NzA3MQ==","diff_hunk":"@@ -54,9 +54,19 @@ class WindowsFeaturePowershell < Chef::Resource\n                description: \"\",\n                default: false\n \n-      def to_lowercase_array(x)\n+      # a simple helper to determine if we're on a windows release pre-2012 / 8\n+      # @return [Boolean] Is the system older than Windows 8 / 2012\n+      def older_than_2012_or_8?","path":"lib/chef/resource/windows_feature_powershell.rb","position":16,"original_position":16,"commit_id":"4e64fd215f637a0bd49c04cebb6f18446d57c3cf","original_commit_id":"c0ded1066ef2497c6c72f436eed7c06cbc824e3d","user":{"login":"stuartpreston","id":6384654,"node_id":"MDQ6VXNlcjYzODQ2NTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6384654?v=4","gravatar_id":"","url":"https://api.github.com/users/stuartpreston","html_url":"https://github.com/stuartpreston","followers_url":"https://api.github.com/users/stuartpreston/followers","following_url":"https://api.github.com/users/stuartpreston/following{/other_user}","gists_url":"https://api.github.com/users/stuartpreston/gists{/gist_id}","starred_url":"https://api.github.com/users/stuartpreston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuartpreston/subscriptions","organizations_url":"https://api.github.com/users/stuartpreston/orgs","repos_url":"https://api.github.com/users/stuartpreston/repos","events_url":"https://api.github.com/users/stuartpreston/events{/privacy}","received_events_url":"https://api.github.com/users/stuartpreston/received_events","type":"User","site_admin":false},"body":"Arguably this could go into chef/platform/query_helpers as `Chef::Platform.older_than_2012_or_8?` so we can reuse it.","created_at":"2018-06-08T03:53:11Z","updated_at":"2018-06-08T03:57:27Z","html_url":"https://github.com/chef/chef/pull/7349#discussion_r193947071","pull_request_url":"https://api.github.com/repos/chef/chef/pulls/7349","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/chef/chef/pulls/comments/193947071"},"html":{"href":"https://github.com/chef/chef/pull/7349#discussion_r193947071"},"pull_request":{"href":"https://api.github.com/repos/chef/chef/pulls/7349"}}},"pull_request":{"url":"https://api.github.com/repos/chef/chef/pulls/7349","id":193475433,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNDc1NDMz","html_url":"https://github.com/chef/chef/pull/7349","diff_url":"https://github.com/chef/chef/pull/7349.diff","patch_url":"https://github.com/chef/chef/pull/7349.patch","issue_url":"https://api.github.com/repos/chef/chef/issues/7349","number":7349,"state":"open","locked":false,"title":"Support windows_feature_powershell on Windows 2008 R2","user":{"login":"tas50","id":1015200,"node_id":"MDQ6VXNlcjEwMTUyMDA=","avatar_url":"https://avatars1.githubusercontent.com/u/1015200?v=4","gravatar_id":"","url":"https://api.github.com/users/tas50","html_url":"https://github.com/tas50","followers_url":"https://api.github.com/users/tas50/followers","following_url":"https://api.github.com/users/tas50/following{/other_user}","gists_url":"https://api.github.com/users/tas50/gists{/gist_id}","starred_url":"https://api.github.com/users/tas50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tas50/subscriptions","organizations_url":"https://api.github.com/users/tas50/orgs","repos_url":"https://api.github.com/users/tas50/repos","events_url":"https://api.github.com/users/tas50/events{/privacy}","received_events_url":"https://api.github.com/users/tas50/received_events","type":"User","site_admin":false},"body":"So this one was a few layers deep:\r\n\r\n1) We didn't actually need to import the ServerManager module. This was a powershell 2.0 thing, but since we use ConvertTo-Json  we require Powershell 3.0 where this module is autoloaded.\r\n2) Features are only case insensitive on Windows 8 / 2012+. That means we can't lowercase the features on these platforms. We still want to lowercase the features everywhere else because case shouldn't matter and that would be a breaking change.\r\n3) Windows 2008 R2 doesn't have a concept of a removed feature (where the source is gone) so they don't return data the same way when you request features. They just return: Installed: true/false. This means we need to coerce the returned data from 2008 R2 to look like a later Windows release.\r\n\r\nSigned-off-by: Tim Smith <tsmith@chef.io>","created_at":"2018-06-07T23:41:35Z","updated_at":"2018-06-08T03:57:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94113ebfc6ea7eaca75124ae2e3f11c372f4a6ba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/chef/chef/pulls/7349/commits","review_comments_url":"https://api.github.com/repos/chef/chef/pulls/7349/comments","review_comment_url":"https://api.github.com/repos/chef/chef/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chef/chef/issues/7349/comments","statuses_url":"https://api.github.com/repos/chef/chef/statuses/4e64fd215f637a0bd49c04cebb6f18446d57c3cf","head":{"label":"chef:2k8r2_powershell","ref":"2k8r2_powershell","sha":"4e64fd215f637a0bd49c04cebb6f18446d57c3cf","user":{"login":"chef","id":29740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzQw","avatar_url":"https://avatars3.githubusercontent.com/u/29740?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgyNzg=","name":"chef","full_name":"chef/chef","owner":{"login":"chef","id":29740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzQw","avatar_url":"https://avatars3.githubusercontent.com/u/29740?v=4","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}","deployments_url":"https://api.github.com/repos/chef/chef/deployments","created_at":"2009-01-15T20:40:48Z","updated_at":"2018-06-07T19:36:02Z","pushed_at":"2018-06-08T02:15:03Z","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":104169,"stargazers_count":5352,"watchers_count":5352,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2207,"mirror_url":null,"archived":false,"open_issues_count":593,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2207,"open_issues":593,"watchers":5352,"default_branch":"master"}},"base":{"label":"chef:master","ref":"master","sha":"7124b8cf1ab63cef731b1943c6d8dad2fe131469","user":{"login":"chef","id":29740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzQw","avatar_url":"https://avatars3.githubusercontent.com/u/29740?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgyNzg=","name":"chef","full_name":"chef/chef","owner":{"login":"chef","id":29740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzQw","avatar_url":"https://avatars3.githubusercontent.com/u/29740?v=4","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}","deployments_url":"https://api.github.com/repos/chef/chef/deployments","created_at":"2009-01-15T20:40:48Z","updated_at":"2018-06-07T19:36:02Z","pushed_at":"2018-06-08T02:15:03Z","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":104169,"stargazers_count":5352,"watchers_count":5352,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2207,"mirror_url":null,"archived":false,"open_issues_count":593,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2207,"open_issues":593,"watchers":5352,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chef/chef/pulls/7349"},"html":{"href":"https://github.com/chef/chef/pull/7349"},"issue":{"href":"https://api.github.com/repos/chef/chef/issues/7349"},"comments":{"href":"https://api.github.com/repos/chef/chef/issues/7349/comments"},"review_comments":{"href":"https://api.github.com/repos/chef/chef/pulls/7349/comments"},"review_comment":{"href":"https://api.github.com/repos/chef/chef/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chef/chef/pulls/7349/commits"},"statuses":{"href":"https://api.github.com/repos/chef/chef/statuses/4e64fd215f637a0bd49c04cebb6f18446d57c3cf"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"stuartpreston"}}