Class: DPL::Provider::PuppetForge
- Inherits:
-
DPL::Provider
- Object
- DPL::Provider
- DPL::Provider::PuppetForge
- Defined in:
- lib/dpl/provider/puppet_forge.rb
Instance Method Summary collapse
- #build ⇒ Object
- #check_app ⇒ Object
- #check_auth ⇒ Object
- #forge ⇒ Object
- #modulefile ⇒ Object
- #needs_key? ⇒ Boolean
- #push_app ⇒ Object
Instance Method Details
#build ⇒ Object
18 19 20 21 |
# File 'lib/dpl/provider/puppet_forge.rb', line 18 def build pmod = Puppet::Face['module', :current] pmod.build('./') end |
#check_app ⇒ Object
27 28 29 |
# File 'lib/dpl/provider/puppet_forge.rb', line 27 def check_app modulefile. end |
#check_auth ⇒ Object
31 32 33 34 |
# File 'lib/dpl/provider/puppet_forge.rb', line 31 def check_auth raise Error, "must supply a user" unless option(:user, :username) raise Error, "must supply a password" unless option(:password) end |
#forge ⇒ Object
14 15 16 |
# File 'lib/dpl/provider/puppet_forge.rb', line 14 def forge @forge ||= Blacksmith::Forge.new([:username] || [:user], [:password], [:url]) end |
#modulefile ⇒ Object
10 11 12 |
# File 'lib/dpl/provider/puppet_forge.rb', line 10 def modulefile @modulefile ||= Blacksmith::Modulefile.new end |
#needs_key? ⇒ Boolean
23 24 25 |
# File 'lib/dpl/provider/puppet_forge.rb', line 23 def needs_key? false end |
#push_app ⇒ Object
36 37 38 39 40 |
# File 'lib/dpl/provider/puppet_forge.rb', line 36 def push_app build log "Uploading to Puppet Forge #{forge.username}/#{modulefile.name}" forge.push!(modulefile.name) end |