Method: Retrospec::Puppet::Generators::HostClassGenerator.generate_spec_files

Defined in:
lib/retrospec/plugins/v1/plugin/generators/hostclass_generator.rb

.generate_spec_files(module_path, config_data) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/retrospec/plugins/v1/plugin/generators/hostclass_generator.rb', line 22

def self.generate_spec_files(module_path, config_data)
  files = []
  manifest_files(module_path).each do |file|
    hostclass = new(module_path, config_data.merge({:manifest_file => file}))
    next unless hostclass.resource_type == ::Puppet::Pops::Model::HostClassDefinition
    files << hostclass.generate_spec_file
  end
  files
end