{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/comments/25530552","id":25530552,"diff_hunk":"@@ -19,6 +20,26 @@\n   validate_bool($purge_sources_list, $purge_sources_list_d,\n                 $purge_preferences, $purge_preferences_d)\n \n+  validate_hash($proxy)\n+  if $proxy['host'] {\n+    validate_string($proxy['host'])\n+  }\n+  if $proxy['port'] {\n+    unless is_integer($proxy['port']) {\n+      fail('$proxy port must be an integer')\n+    }\n+  }\n+  if $proxy['https'] {\n+    validate_bool($proxy['https'])\n+  }\n+\n+  $_proxy = merge($apt::proxy_defaults, $proxy)\n+\n+  apt::setting { 'conf-proxy':\n+    priority => '01',\n+    content  => template('apt/_header.erb', 'apt/proxy.erb'),\n+  }","path":"manifests/init.pp","position":29,"original_position":29,"commit_id":"fb908ec3cb47891956787296098745f3d2ba6dee","original_commit_id":"fb908ec3cb47891956787296098745f3d2ba6dee","user":{"login":"mhaskel","id":553464,"avatar_url":"https://avatars.githubusercontent.com/u/553464?v=3","gravatar_id":"","url":"https://api.github.com/users/mhaskel","html_url":"https://github.com/mhaskel","followers_url":"https://api.github.com/users/mhaskel/followers","following_url":"https://api.github.com/users/mhaskel/following{/other_user}","gists_url":"https://api.github.com/users/mhaskel/gists{/gist_id}","starred_url":"https://api.github.com/users/mhaskel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhaskel/subscriptions","organizations_url":"https://api.github.com/users/mhaskel/orgs","repos_url":"https://api.github.com/users/mhaskel/repos","events_url":"https://api.github.com/users/mhaskel/events{/privacy}","received_events_url":"https://api.github.com/users/mhaskel/received_events","type":"User","site_admin":false},"body":"I think this `apt::setting` needs to be wrapped in an `if $proxy['host']`, otherwise you're going to end up with a really funny file","created_at":"2015-02-27T19:13:34Z","updated_at":"2015-02-27T19:13:34Z","html_url":"https://github.com/puppetlabs/puppetlabs-apt/pull/446#discussion_r25530552","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/446","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/comments/25530552"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-apt/pull/446#discussion_r25530552"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/446"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/446","id":30159686,"html_url":"https://github.com/puppetlabs/puppetlabs-apt/pull/446","diff_url":"https://github.com/puppetlabs/puppetlabs-apt/pull/446.diff","patch_url":"https://github.com/puppetlabs/puppetlabs-apt/pull/446.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/issues/446","number":446,"state":"open","locked":false,"title":"apt: Add proxy support on the class.","user":{"login":"daenney","id":569574,"avatar_url":"https://avatars.githubusercontent.com/u/569574?v=3","gravatar_id":"","url":"https://api.github.com/users/daenney","html_url":"https://github.com/daenney","followers_url":"https://api.github.com/users/daenney/followers","following_url":"https://api.github.com/users/daenney/following{/other_user}","gists_url":"https://api.github.com/users/daenney/gists{/gist_id}","starred_url":"https://api.github.com/users/daenney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daenney/subscriptions","organizations_url":"https://api.github.com/users/daenney/orgs","repos_url":"https://api.github.com/users/daenney/repos","events_url":"https://api.github.com/users/daenney/events{/privacy}","received_events_url":"https://api.github.com/users/daenney/received_events","type":"User","site_admin":false},"body":"Re-introduce proxy support at the class level. Needing to configure a proxy is such a common scenario that having it on the class is a reasonable thing. It also affects `apt::ppa`.\r\n\r\nChange `apt::ppa` to no longer have its own `proxy` parameter but use the proxy as configured on the main `apt` class.\r\n","created_at":"2015-02-27T11:36:39Z","updated_at":"2015-02-27T19:13:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5efa76e5597ee0fbe1c44a4fd3e9d487106b746a","assignee":{"login":"mhaskel","id":553464,"avatar_url":"https://avatars.githubusercontent.com/u/553464?v=3","gravatar_id":"","url":"https://api.github.com/users/mhaskel","html_url":"https://github.com/mhaskel","followers_url":"https://api.github.com/users/mhaskel/followers","following_url":"https://api.github.com/users/mhaskel/following{/other_user}","gists_url":"https://api.github.com/users/mhaskel/gists{/gist_id}","starred_url":"https://api.github.com/users/mhaskel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhaskel/subscriptions","organizations_url":"https://api.github.com/users/mhaskel/orgs","repos_url":"https://api.github.com/users/mhaskel/repos","events_url":"https://api.github.com/users/mhaskel/events{/privacy}","received_events_url":"https://api.github.com/users/mhaskel/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/milestones/1","html_url":"https://github.com/puppetlabs/puppetlabs-apt/milestones/2.0","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/milestones/1/labels","id":985352,"number":1,"title":"2.0","description":"# Apt 2.0\r\n\r\nThe original apt module stems from 2010 and since then has continued to accumulate feature after feature, change after change without anyone ever taking a hard look at it. This has resulted in a functional module but with a lot of 'bad', old code and features that though once seemed useful aren't really part of the core mission of the module, which is to configure apt for you.\r\n\r\nAs such we've decided to, fairly radically, modernise the module in several ways.\r\n\r\n* Removes a bunch of old code\r\n* Removes some 'features' like `builddep` with can now be solved by `install_options`\r\n* Transitions some features from separate classes, like `backports` to examples\r\n* Remove, rename, cleanup or shuffle some of the parameters on the different classes\r\n* Allow for more resources to be created by passing in a hash through Hiera\r\n* Turn apt::ppa into something more robust and working\r\n* Bump the stdlib dependency to 4.+\r\n* Bump the Puppet dependency to 3.4+ (because `contains`) and the PE dependency to 3.2+ because that contains Puppet 3.4.x\r\n\r\n## Lifecycle and support\r\n\r\nThe 1.x series will continue to receive updates but only for critical or security related bugs during the first 6 months of the 2.x lifecycle. No new features or 'default changes' will be accepted.\r\n\r\nThe 2.x series will continue to receive updates and kept up to par with the 3.x series for a period of time. A deprecation cycle for 2.x will be decided upon depending on Puppet 4 adoption rate.","creator":{"login":"daenney","id":569574,"avatar_url":"https://avatars.githubusercontent.com/u/569574?v=3","gravatar_id":"","url":"https://api.github.com/users/daenney","html_url":"https://github.com/daenney","followers_url":"https://api.github.com/users/daenney/followers","following_url":"https://api.github.com/users/daenney/following{/other_user}","gists_url":"https://api.github.com/users/daenney/gists{/gist_id}","starred_url":"https://api.github.com/users/daenney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daenney/subscriptions","organizations_url":"https://api.github.com/users/daenney/orgs","repos_url":"https://api.github.com/users/daenney/repos","events_url":"https://api.github.com/users/daenney/events{/privacy}","received_events_url":"https://api.github.com/users/daenney/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":19,"state":"open","created_at":"2015-02-18T21:50:27Z","updated_at":"2015-02-27T11:36:49Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/446/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/446/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/issues/446/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/statuses/fb908ec3cb47891956787296098745f3d2ba6dee","head":{"label":"puppetlabs:daenney/apt-proxy","ref":"daenney/apt-proxy","sha":"fb908ec3cb47891956787296098745f3d2ba6dee","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":1822520,"name":"puppetlabs-apt","full_name":"puppetlabs/puppetlabs-apt","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-apt","description":"Puppet module to help manage Apt","fork":true,"url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt","forks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/releases{/id}","created_at":"2011-05-30T17:33:23Z","updated_at":"2015-02-27T17:02:56Z","pushed_at":"2015-02-27T11:39:38Z","git_url":"git://github.com/puppetlabs/puppetlabs-apt.git","ssh_url":"git@github.com:puppetlabs/puppetlabs-apt.git","clone_url":"https://github.com/puppetlabs/puppetlabs-apt.git","svn_url":"https://github.com/puppetlabs/puppetlabs-apt","homepage":"https://forge.puppetlabs.com/puppetlabs/apt","size":3139,"stargazers_count":179,"watchers_count":179,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":317,"mirror_url":null,"open_issues_count":22,"forks":317,"open_issues":22,"watchers":179,"default_branch":"master"}},"base":{"label":"puppetlabs:next","ref":"next","sha":"b6c70b70e72df46a5884926c0a2c42b8503bb149","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":1822520,"name":"puppetlabs-apt","full_name":"puppetlabs/puppetlabs-apt","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-apt","description":"Puppet module to help manage Apt","fork":true,"url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt","forks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/releases{/id}","created_at":"2011-05-30T17:33:23Z","updated_at":"2015-02-27T17:02:56Z","pushed_at":"2015-02-27T11:39:38Z","git_url":"git://github.com/puppetlabs/puppetlabs-apt.git","ssh_url":"git@github.com:puppetlabs/puppetlabs-apt.git","clone_url":"https://github.com/puppetlabs/puppetlabs-apt.git","svn_url":"https://github.com/puppetlabs/puppetlabs-apt","homepage":"https://forge.puppetlabs.com/puppetlabs/apt","size":3139,"stargazers_count":179,"watchers_count":179,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":317,"mirror_url":null,"open_issues_count":22,"forks":317,"open_issues":22,"watchers":179,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/446"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-apt/pull/446"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/issues/446"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/issues/446/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/446/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/pulls/446/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-apt/statuses/fb908ec3cb47891956787296098745f3d2ba6dee"}}}}