Module: DTK::Client::ReparseMixin
- Included in:
- CommonModule::Import, Console, EditMixin, ModuleMixin
- Defined in:
- lib/commands/common/thor/reparse.rb
Constant Summary collapse
- YamlDTKMetaFiles =
['dtk.model.yaml', 'module_refs.yaml', 'assemblies/*.yaml', 'assemblies/*/assembly.yaml']
Instance Method Summary collapse
Instance Method Details
#reparse_aux(location) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/commands/common/thor/reparse.rb', line 24 def reparse_aux(location) files_yaml = YamlDTKMetaFiles.map{|rel_path|Dir.glob("#{location}/#{rel_path}")}.flatten(1) files_yaml.each do |file| file_content = File.open(file).read begin YAML.load(file_content) rescue Exception => e e.to_s.gsub!(/\(<unknown>\)/,'') raise DTK::Client::DSLParsing::YAMLParsing.new("YAML parsing error #{e} in file", file) end end Response::Ok.new() end |