Sha256: c02d7a48acff4786b080f855f13a2e7e9f06084c3192805221fd35cf0d1e4a53

Contents?: true

Size: 1.13 KB

Versions: 85

Compression:

Stored size: 1.13 KB

Contents

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

85 entries across 85 versions & 1 rubygems

Version Path
rbbt-util-5.21.61 etc/app.d/entities.rb
rbbt-util-5.21.60 etc/app.d/entities.rb
rbbt-util-5.21.59 etc/app.d/entities.rb
rbbt-util-5.21.58 etc/app.d/entities.rb
rbbt-util-5.21.57 etc/app.d/entities.rb
rbbt-util-5.21.56 etc/app.d/entities.rb
rbbt-util-5.21.55 etc/app.d/entities.rb
rbbt-util-5.21.54 etc/app.d/entities.rb
rbbt-util-5.21.53 etc/app.d/entities.rb
rbbt-util-5.21.51 etc/app.d/entities.rb
rbbt-util-5.21.50 etc/app.d/entities.rb
rbbt-util-5.21.49 etc/app.d/entities.rb
rbbt-util-5.21.47 etc/app.d/entities.rb
rbbt-util-5.21.46 etc/app.d/entities.rb
rbbt-util-5.21.45 etc/app.d/entities.rb
rbbt-util-5.21.44 etc/app.d/entities.rb
rbbt-util-5.21.43 etc/app.d/entities.rb
rbbt-util-5.21.42 etc/app.d/entities.rb
rbbt-util-5.21.39 etc/app.d/entities.rb
rbbt-util-5.21.38 etc/app.d/entities.rb