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.16 etc/app.d/entities.rb
rbbt-util-5.21.14 etc/app.d/entities.rb
rbbt-util-5.21.13 etc/app.d/entities.rb
rbbt-util-5.21.12 etc/app.d/entities.rb
rbbt-util-5.21.11 etc/app.d/entities.rb
rbbt-util-5.21.9 etc/app.d/entities.rb
rbbt-util-5.21.8 etc/app.d/entities.rb
rbbt-util-5.21.7 etc/app.d/entities.rb
rbbt-util-5.21.6 etc/app.d/entities.rb
rbbt-util-5.21.5 etc/app.d/entities.rb
rbbt-util-5.21.4 etc/app.d/entities.rb
rbbt-util-5.21.3 etc/app.d/entities.rb
rbbt-util-5.21.2 etc/app.d/entities.rb
rbbt-util-5.21.1 etc/app.d/entities.rb
rbbt-util-5.21.0 etc/app.d/entities.rb
rbbt-util-5.20.26 etc/app.d/entities.rb
rbbt-util-5.20.25 etc/app.d/entities.rb
rbbt-util-5.20.24 etc/app.d/entities.rb
rbbt-util-5.20.23 etc/app.d/entities.rb
rbbt-util-5.20.22 etc/app.d/entities.rb