vendored/puppet/lib/puppet/forge.rb in bolt-0.10.0 vs vendored/puppet/lib/puppet/forge.rb in bolt-0.11.0
- old
+ new
@@ -164,10 +164,12 @@
end
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)
validate_checksum(tmpfile, @data['file_md5'])
unpack(tmpfile, tmpdir)
@unpacked_into = Pathname.new(tmpdir)
@@ -206,9 +208,13 @@
begin
Puppet::ModuleTool::Applications::Unpacker.unpack(file.path, destination)
rescue Puppet::ExecutionFailure => e
raise RuntimeError, _("Could not extract contents of module archive: %{message}") % { message: e.message }
end
+ end
+
+ def deprecated?
+ @data['module'] && (@data['module']['deprecated_at'] != nil)
end
end
private