voxpupuli / puppet-archive

Compressed archive file download and extraction with native types/providers for Windows and Unix
https://forge.puppet.com/puppet/archive
Apache License 2.0
60 stars 178 forks source link

Fix archive::download Param Default Value #450

Closed yachub closed 3 years ago

yachub commented 3 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

Run bundle exec rake test using the 5.0.0 tag version of the module.

What are you seeing

❯ bundle exec rake test
manifests/download.pp:38:optional_default:WARNING:Optional parameter defaults to something other than undef

What behaviour did you expect instead

Passing tests.

Output log

Any additional information you'd like to impart

Optional parameters should default to undef, so I think fixing this behavior will result in a backwards-incompatible change, since existing users not explicitly setting the digest_type of archive::download, will need to do so after this change.

alexjfisher commented 3 years ago

Depends on what you think was 'wrong'. The default (changing which is/was breaking), or the type...