Class: Librarian::Puppet::Dsl

Inherits:
Dsl
  • Object
show all
Defined in:
lib/librarian/puppet/dsl.rb

Defined Under Namespace

Classes: Receiver

Constant Summary collapse

FORGE_URL =
"https://forgeapi.puppetlabs.com"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.dependency_typeObject



26
27
28
# File 'lib/librarian/puppet/dsl.rb', line 26

def self.dependency_type
  Librarian::Puppet::Dependency
end

Instance Method Details

#default_specfileObject



19
20
21
22
23
24
# File 'lib/librarian/puppet/dsl.rb', line 19

def default_specfile
  Proc.new do
    forge FORGE_URL
    
  end
end

#post_process_target(target) ⇒ Object



30
31
32
33
34
# File 'lib/librarian/puppet/dsl.rb', line 30

def post_process_target(target)
  # save the default forge defined
  default_forge = target.sources.select {|s| s.is_a? Librarian::Puppet::Source::Forge}.first
  Librarian::Puppet::Source::Forge.default = default_forge || Librarian::Puppet::Source::Forge.from_lock_options(environment, :remote => FORGE_URL)
end

#receiver(target) ⇒ Object



36
37
38
# File 'lib/librarian/puppet/dsl.rb', line 36

def receiver(target)
  Receiver.new(target)
end