There are a few minor glitches which are not compatible with puppet4, which are not absolutly legit before.
Roman Shaposhnik thanx for the review
This looks very reasonable to me. Thanks for getting this going!
with this patch and additionally the patches from the puppet4 branch deployment worked for me.
downcase is in stdlib
use proper package qualifier