{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/comments/75516174","id":75516174,"diff_hunk":"@@ -0,0 +1,182 @@\n+require_relative '../../../puppet_x/puppetlabs/iis/powershell_manager'\n+\n+# When writing IIS PowerShell code for any of the methods below\n+# NEVER EVER use Get-Website without specifying -Name. As the number\n+# of sites on a server increases, Get-Website will take longer and longer\n+# to return. This will exponentially increase the total duration of your\n+# puppet run\n+\n+Puppet::Type.type(:iis_site).provide(:webadministration) do\n+  desc \"IIS Provider using the PowerShell WebAdministration module\"\n+\n+  confine    :operatingsystem => [:windows ]\n+  defaultfor :operatingsystem => :windows\n+\n+  commands :powershell =>\n+    if File.exists?(\"#{ENV['SYSTEMROOT']}\\\\sysnative\\\\WindowsPowershell\\\\v1.0\\\\powershell.exe\")\n+      \"#{ENV['SYSTEMROOT']}\\\\sysnative\\\\WindowsPowershell\\\\v1.0\\\\powershell.exe\"\n+    elsif File.exists?(\"#{ENV['SYSTEMROOT']}\\\\system32\\\\WindowsPowershell\\\\v1.0\\\\powershell.exe\")\n+      \"#{ENV['SYSTEMROOT']}\\\\system32\\\\WindowsPowershell\\\\v1.0\\\\powershell.exe\"\n+    else\n+      'powershell.exe'\n+    end\n+\n+  mk_resource_methods\n+\n+  def create\n+    cmd = []\n+\n+    cmd << self.class.ps_script_content('_newwebsite', @resource)\n+\n+    cmd << self.class.ps_script_content('generalproperties', @resource)\n+\n+    cmd << self.class.ps_script_content('logproperties', @resource)\n+\n+    cmd << self.class.ps_script_content('serviceautostartprovider', @resource)\n+\n+    inst_cmd = cmd.join\n+\n+    result = self.class.run(inst_cmd)\n+\n+    if result[:exitcode] != 0\n+      fail(\"Error creating website: #{result[:errormessage]}\")\n+      return false\n+    end\n+    Puppet.err \"Error creating website: #{result[:errormessage]}\" unless result[:errormessage].nil?","path":"lib/puppet/provider/iis_site/webadministration.rb","position":45,"original_position":45,"commit_id":"e929e94e60062b055c6e406a0b7e08a80c899956","original_commit_id":"e929e94e60062b055c6e406a0b7e08a80c899956","user":{"login":"glennsarti","id":5819622,"avatar_url":"https://avatars.githubusercontent.com/u/5819622?v=3","gravatar_id":"","url":"https://api.github.com/users/glennsarti","html_url":"https://github.com/glennsarti","followers_url":"https://api.github.com/users/glennsarti/followers","following_url":"https://api.github.com/users/glennsarti/following{/other_user}","gists_url":"https://api.github.com/users/glennsarti/gists{/gist_id}","starred_url":"https://api.github.com/users/glennsarti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennsarti/subscriptions","organizations_url":"https://api.github.com/users/glennsarti/orgs","repos_url":"https://api.github.com/users/glennsarti/repos","events_url":"https://api.github.com/users/glennsarti/events{/privacy}","received_events_url":"https://api.github.com/users/glennsarti/received_events","type":"User","site_admin":false},"body":"I'm not a fan of doing implicit boolean conversion on string types.  e.g. what if the returned values is `false`.","created_at":"2016-08-19T16:59:45Z","updated_at":"2016-08-19T16:59:45Z","html_url":"https://github.com/puppetlabs/puppetlabs-iis/pull/3#discussion_r75516174","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/comments/75516174"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-iis/pull/3#discussion_r75516174"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/3","id":78883862,"html_url":"https://github.com/puppetlabs/puppetlabs-iis/pull/3","diff_url":"https://github.com/puppetlabs/puppetlabs-iis/pull/3.diff","patch_url":"https://github.com/puppetlabs/puppetlabs-iis/pull/3.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/issues/3","number":3,"state":"open","locked":false,"title":"(WIP)(MODULES-3049) Add type and provider for IIS sites","user":{"login":"jpogran","id":272569,"avatar_url":"https://avatars.githubusercontent.com/u/272569?v=3","gravatar_id":"","url":"https://api.github.com/users/jpogran","html_url":"https://github.com/jpogran","followers_url":"https://api.github.com/users/jpogran/followers","following_url":"https://api.github.com/users/jpogran/following{/other_user}","gists_url":"https://api.github.com/users/jpogran/gists{/gist_id}","starred_url":"https://api.github.com/users/jpogran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpogran/subscriptions","organizations_url":"https://api.github.com/users/jpogran/orgs","repos_url":"https://api.github.com/users/jpogran/repos","events_url":"https://api.github.com/users/jpogran/events{/privacy}","received_events_url":"https://api.github.com/users/jpogran/received_events","type":"User","site_admin":false},"body":"Add a type and provider for listing, creating and deleting IIS Websites. This does not\r\nhandle setting binding information for a site, this is covered in MODULES-3639\r\n\r\n- [x]  PowerShell WebAdministration ModuleProvider\r\n- [x] Create, Modify, Delete iis sites\r\n- [x]  Service Auto Start Provider\r\n- [x]  Unit tests for type and provider","created_at":"2016-07-26T16:32:31Z","updated_at":"2016-08-19T16:59:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"930d0595e4c9b3d11959f0709de2c4d149eb0d83","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/3/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/3/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/issues/3/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/statuses/e929e94e60062b055c6e406a0b7e08a80c899956","head":{"label":"jpogran:ticket/master/MODULES-3049-iis_site","ref":"ticket/master/MODULES-3049-iis_site","sha":"e929e94e60062b055c6e406a0b7e08a80c899956","user":{"login":"jpogran","id":272569,"avatar_url":"https://avatars.githubusercontent.com/u/272569?v=3","gravatar_id":"","url":"https://api.github.com/users/jpogran","html_url":"https://github.com/jpogran","followers_url":"https://api.github.com/users/jpogran/followers","following_url":"https://api.github.com/users/jpogran/following{/other_user}","gists_url":"https://api.github.com/users/jpogran/gists{/gist_id}","starred_url":"https://api.github.com/users/jpogran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpogran/subscriptions","organizations_url":"https://api.github.com/users/jpogran/orgs","repos_url":"https://api.github.com/users/jpogran/repos","events_url":"https://api.github.com/users/jpogran/events{/privacy}","received_events_url":"https://api.github.com/users/jpogran/received_events","type":"User","site_admin":false},"repo":{"id":64234439,"name":"puppetlabs-iis","full_name":"jpogran/puppetlabs-iis","owner":{"login":"jpogran","id":272569,"avatar_url":"https://avatars.githubusercontent.com/u/272569?v=3","gravatar_id":"","url":"https://api.github.com/users/jpogran","html_url":"https://github.com/jpogran","followers_url":"https://api.github.com/users/jpogran/followers","following_url":"https://api.github.com/users/jpogran/following{/other_user}","gists_url":"https://api.github.com/users/jpogran/gists{/gist_id}","starred_url":"https://api.github.com/users/jpogran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpogran/subscriptions","organizations_url":"https://api.github.com/users/jpogran/orgs","repos_url":"https://api.github.com/users/jpogran/repos","events_url":"https://api.github.com/users/jpogran/events{/privacy}","received_events_url":"https://api.github.com/users/jpogran/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpogran/puppetlabs-iis","description":null,"fork":true,"url":"https://api.github.com/repos/jpogran/puppetlabs-iis","forks_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/forks","keys_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/teams","hooks_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/hooks","issue_events_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/issues/events{/number}","events_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/events","assignees_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/assignees{/user}","branches_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/branches{/branch}","tags_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/tags","blobs_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/statuses/{sha}","languages_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/languages","stargazers_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/stargazers","contributors_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/contributors","subscribers_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/subscribers","subscription_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/subscription","commits_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/contents/{+path}","compare_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/merges","archive_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/downloads","issues_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/issues{/number}","pulls_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/pulls{/number}","milestones_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/milestones{/number}","notifications_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/labels{/name}","releases_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/releases{/id}","deployments_url":"https://api.github.com/repos/jpogran/puppetlabs-iis/deployments","created_at":"2016-07-26T15:52:08Z","updated_at":"2016-07-13T20:05:55Z","pushed_at":"2016-08-16T17:42:14Z","git_url":"git://github.com/jpogran/puppetlabs-iis.git","ssh_url":"git@github.com:jpogran/puppetlabs-iis.git","clone_url":"https://github.com/jpogran/puppetlabs-iis.git","svn_url":"https://github.com/jpogran/puppetlabs-iis","homepage":null,"size":35,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"07ab4a38b08b2bd09648c8d0c74155311b2c0995","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":63275859,"name":"puppetlabs-iis","full_name":"puppetlabs/puppetlabs-iis","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppetlabs-iis","description":null,"fork":false,"url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis","forks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/deployments","created_at":"2016-07-13T20:05:55Z","updated_at":"2016-07-28T16:39:21Z","pushed_at":"2016-08-16T17:42:14Z","git_url":"git://github.com/puppetlabs/puppetlabs-iis.git","ssh_url":"git@github.com:puppetlabs/puppetlabs-iis.git","clone_url":"https://github.com/puppetlabs/puppetlabs-iis.git","svn_url":"https://github.com/puppetlabs/puppetlabs-iis","homepage":null,"size":33,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/3"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-iis/pull/3"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/issues/3"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-iis/statuses/e929e94e60062b055c6e406a0b7e08a80c899956"}}}}
{"actor":{"display_login":"glennsarti"}}