Sha256: 11be63340bea70ce67c9f814dbcff9de9349de9c7dc1b90c3011fe1a238b588d
Contents?: true
Size: 763 Bytes
Versions: 17
Compression:
Stored size: 763 Bytes
Contents
module PuppetSpec::Modules class << self def create(name, dir, options = {}) module_dir = File.join(dir, name) FileUtils.mkdir_p(module_dir) environment = Puppet::Node::Environment.new(options[:environment]) if metadata = options[:metadata] metadata[:source] ||= 'github' metadata[:author] ||= 'puppetlabs' metadata[:version] ||= '9.9.9' metadata[:license] ||= 'to kill' metadata[:dependencies] ||= [] metadata[:name] = "#{metadata[:author]}/#{name}" File.open(File.join(module_dir, 'metadata.json'), 'w') do |f| f.write(metadata.to_pson) end end Puppet::Module.new(name, :environment => environment, :path => module_dir) end end end
Version data entries
17 entries across 17 versions & 2 rubygems