{"action":"created","issue":{"url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/56","labels_url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/56/comments","events_url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/56/events","html_url":"https://github.com/maestrodev/puppet-wget/pull/56","id":109419780,"number":56,"title":"Added `destination_dir` parameter to allow for iterating over arrays","user":{"login":"seanscottking","id":5429793,"avatar_url":"https://avatars.githubusercontent.com/u/5429793?v=3","gravatar_id":"","url":"https://api.github.com/users/seanscottking","html_url":"https://github.com/seanscottking","followers_url":"https://api.github.com/users/seanscottking/followers","following_url":"https://api.github.com/users/seanscottking/following{/other_user}","gists_url":"https://api.github.com/users/seanscottking/gists{/gist_id}","starred_url":"https://api.github.com/users/seanscottking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanscottking/subscriptions","organizations_url":"https://api.github.com/users/seanscottking/orgs","repos_url":"https://api.github.com/users/seanscottking/repos","events_url":"https://api.github.com/users/seanscottking/events{/privacy}","received_events_url":"https://api.github.com/users/seanscottking/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-02T02:31:17Z","updated_at":"2015-10-06T08:26:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/maestrodev/puppet-wget/pulls/56","html_url":"https://github.com/maestrodev/puppet-wget/pull/56","diff_url":"https://github.com/maestrodev/puppet-wget/pull/56.diff","patch_url":"https://github.com/maestrodev/puppet-wget/pull/56.patch"},"body":"See original feature request here: https://github.com/maestrodev/puppet-wget/issues/51\r\n\r\nThis modification allows you to iterate over an array of URLs and wget them all to one directory.\r\n\r\nUse this for an example use case. It's copy/pasteable (about 4MB of files). It can potentially simplify lots of code for users of your module. This currently has to be done with 4 separate declarations of `wget::fetch { 'http://url': destination => '/path' }`.\r\n```puppet\r\n  $manyfiles = [\r\n    'https://www.kernel.org/pub/linux/kernel/v1.0/linux-1.0.tar.bz2',\r\n    'https://www.kernel.org/pub/linux/kernel/v1.0/linux-1.0.tar.gz',\r\n    'https://www.kernel.org/pub/linux/kernel/v1.0/linux-1.0.tar.sign',\r\n    'https://www.kernel.org/pub/linux/kernel/v1.0/linux-1.0.tar.xz',\r\n  ]\r\n\r\n  wget::fetch { $manyfiles:\r\n    destination_dir => '/tmp/',\r\n  }\r\n```\r\n\r\nAnd here is another way it has improved. Given the most simple of example of using your module, just downloading a single file, you no longer have to specify the filename. It just takes the file's name of the URL. Looks a lot cleaner imho.\r\n```puppet\r\n  wget::fetch { 'https://www.kernel.org/pub/linux/kernel/v1.0/linux-1.0.tar.bz2':\r\n    destination_dir => '/tmp/',\r\n  }\r\n```"},"comment":{"url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/comments/145781328","html_url":"https://github.com/maestrodev/puppet-wget/pull/56#issuecomment-145781328","issue_url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/56","id":145781328,"user":{"login":"carlossg","id":23651,"avatar_url":"https://avatars.githubusercontent.com/u/23651?v=3","gravatar_id":"","url":"https://api.github.com/users/carlossg","html_url":"https://github.com/carlossg","followers_url":"https://api.github.com/users/carlossg/followers","following_url":"https://api.github.com/users/carlossg/following{/other_user}","gists_url":"https://api.github.com/users/carlossg/gists{/gist_id}","starred_url":"https://api.github.com/users/carlossg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlossg/subscriptions","organizations_url":"https://api.github.com/users/carlossg/orgs","repos_url":"https://api.github.com/users/carlossg/repos","events_url":"https://api.github.com/users/carlossg/events{/privacy}","received_events_url":"https://api.github.com/users/carlossg/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T08:26:20Z","updated_at":"2015-10-06T08:26:20Z","body":"if it doesn't exist then it is a file, as it was before"}}