169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
# File 'lib/puppet/forge.rb', line 169
def prepare
return @unpacked_into if @unpacked_into
Puppet.warning "#{@metadata['name']} has been deprecated by its author! View module on Puppet Forge for more info." if deprecated?
download(@data['file_uri'], tmpfile)
checksum = @data['file_sha256']
if checksum
validate_checksum(tmpfile, checksum, Digest::SHA256)
else
checksum = @data['file_md5']
if checksum
validate_checksum(tmpfile, checksum, Digest::MD5)
else
raise _("Forge module is missing SHA256 and MD5 checksums")
end
end
unpack(tmpfile, tmpdir)
@unpacked_into = Pathname.new(tmpdir)
end
|