Sha256: 6cd077034d1f2828b9f4e123a791a2324548ba02db750b151252f87e91c02e99
Contents?: true
Size: 1.3 KB
Versions: 37
Compression:
Stored size: 1.3 KB
Contents
#{{{ Require files Rbbt.etc.requires.read.split("\n").each do |file| next if file.empty? Log.debug("requiring #{ file }") require file end if Rbbt.etc.requires.exists? Entity.entity_list_cache = Rbbt.var.sinatra.find.entity_lists Entity.entity_map_cache = Rbbt.var.sinatra.find.entity_maps Entity.entity_property_cache = Rbbt.var.sinatra.find.entity_properties #{{{ Prepare REST entities Rbbt.etc.entities.read.split("\n").each do |name| next if name.empty? begin mod = Kernel.const_get name Log.debug("Including Entity::REST for #{ name }") mod.module_eval do include Entity::REST end rescue Log.warn "Could extend REST entity: #{ name }" end end if Rbbt.etc.entities.exists? #{{{ Prepare REST entity property persist $annotation_repo = Rbbt.var.sinatra.annotation_repo.find (Rbbt.etc.persist_properties.yaml || {}).each do |name,list| next if name.empty? mod = Kernel.const_get name mod.module_eval do list.each do |elem| prop, type, repo = elem.split(",").collect{|e| e.strip} Log.debug("Persist #{name} #{prop}: #{[type, repo].compact * ", "}") if repo == 'repo' options = {:annotation_repo => $annotation_repo} else options = {} end persist prop, type, options end end end if Rbbt.etc.persist_properties.exists?
Version data entries
37 entries across 37 versions & 1 rubygems