Sha256: b85bf2d04d6612fc555d35c51a57dcc76903d7032f7c2d8df276fcad1ed36f29
Contents?: true
Size: 906 Bytes
Versions: 127
Compression:
Stored size: 906 Bytes
Contents
require 'json/pure' require 'puppet/face' require 'puppet_blacksmith' module DPL class Provider class PuppetForge < Provider require 'pathname' def modulefile @modulefile ||= Blacksmith::Modulefile.new end def forge @forge ||= Blacksmith::Forge.new(options[:user], options[:password], options[:url]) end def build pmod = Puppet::Face['module', :current] pmod.build('./') end def needs_key? false end def check_app modulefile.metadata end def check_auth raise Error, "must supply a user" unless option(:user) raise Error, "must supply a password" unless option(:password) end def push_app build log "Uploading to Puppet Forge #{forge.username}/#{modulefile.name}" forge.push!(modulefile.name) end end end end
Version data entries
127 entries across 127 versions & 1 rubygems