Module: Engine2
- Defined in:
- lib/engine2/core.rb,
lib/engine2/meta.rb,
lib/engine2/model.rb,
lib/engine2/action.rb,
lib/engine2/scheme.rb,
lib/engine2/handler.rb,
lib/engine2/version.rb,
lib/engine2/templates.rb,
lib/engine2/type_info.rb,
lib/engine2/models/Files.rb,
lib/engine2/meta/form_meta.rb,
lib/engine2/meta/link_meta.rb,
lib/engine2/meta/list_meta.rb,
lib/engine2/meta/save_meta.rb,
lib/engine2/meta/view_meta.rb,
lib/engine2/meta/infra_meta.rb,
lib/engine2/models/UserInfo.rb,
lib/engine2/meta/decode_meta.rb,
lib/engine2/meta/delete_meta.rb
Defined Under Namespace
Modules: BlobSupportMeta, MemoryModel, MetaAPISupport, MetaAngularSupport, MetaApproveSupport, MetaListSupport, MetaMenuSupport, MetaModelSupport, MetaOnChangeSupport, MetaPanelSupport, MetaQuerySupport, MetaTabSupport, MetaViewSupport, Model, TimeStampMeta
Classes: Action, ActionBundle, ActionMenuBuilder, BlobStoreMeta, BulkDeleteMeta, ConfirmMeta, CreateMeta, DecodeEntryMeta, DecodeListMeta, DecodeMeta, DeleteMeta, DeleteMetaBase, DownloadBlobStoreMeta, DownloadFileStoreMeta, DownloadForeignBlobStoreMeta, DummyMeta, E2Error, E2Files, FileStoreMeta, ForeignBlobStoreMeta, FormMeta, Handler, InsertMeta, ListMeta, LoginFormMeta, LoginMeta, LogoutFormMeta, LogoutMeta, ManyToOneListMeta, MenuBuilder, MenuMeta, Meta, ModifyMeta, SaveMeta, Schemes, SearchTemplates, StarToManyBulkUnlinkMeta, StarToManyFieldLinkListMeta, StarToManyFieldMeta, StarToManyFieldUnlinkMeta, StarToManyLinkListMeta, StarToManyLinkMeta, StarToManyListMeta, StarToManyUnlinkMeta, StarToManyUnlinkMetaBase, Templates, TypeAheadMeta, TypeInfo, UpdateMeta, UploadBlobStoreMeta, UploadFileStoreMeta, UserInfo, ViewMeta
Constant Summary
collapse
- VERSION =
[MAJOR, MINOR, TINY].join('.').freeze
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.core_loading ⇒ Object
Returns the value of attribute core_loading.
435
436
437
|
# File 'lib/engine2/core.rb', line 435
def core_loading
@core_loading
end
|
Class Method Details
.boot(&blk) ⇒ Object
455
456
457
|
# File 'lib/engine2/core.rb', line 455
def self.boot &blk
@boot_blk = blk
end
|
.bootstrap(app = APP_LOCATION) ⇒ Object
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
|
# File 'lib/engine2/core.rb', line 459
def self.bootstrap app = APP_LOCATION
require 'engine2/pre_bootstrap'
t = Time.now
Action.count = 0
SCHEMES.clear
load "#{app}/boot.rb"
Sequel::DATABASES.each &:load_schema_cache_from_file
load 'engine2/models/Files.rb'
load 'engine2/models/UserInfo.rb'
Dir["#{app}/models/*"].each{|m| load m}
puts "MODELS, Time: #{Time.now - t}"
Sequel::DATABASES.each &:dump_schema_cache_to_file
SCHEMES.merge!
Engine2.send(:remove_const, :ROOT) if defined? ROOT
Engine2.const_set(:ROOT, Action.new(nil, :api, DummyMeta, {}))
@boot_blk.(ROOT)
ROOT.setup_action_tree
puts "BOOTSTRAP #{app}, Time: #{Time.new - t}"
self.core_loading = false
require 'engine2/post_bootstrap'
end
|
.connect(*args) ⇒ Object
444
445
446
447
448
|
# File 'lib/engine2/core.rb', line 444
def self.connect *args
db = Sequel.connect *args
db.models = {}
db
end
|
.database(name) ⇒ Object
440
441
442
|
# File 'lib/engine2/core.rb', line 440
def self.database name
Object.const_set(name, yield) unless Object.const_defined?(name)
end
|
6
7
8
|
# File 'lib/engine2/version.rb', line 6
def self.version
VERSION
end
|