Module: Radiant
- Defined in:
- lib/radiant/gem_locator.rb,
lib/radiant.rb,
lib/radiant/cache.rb,
lib/radiant/setup.rb,
lib/radiant/engine.rb,
lib/radiant/admin_ui.rb,
lib/radiant/extension.rb,
lib/radiant/initializer.rb,
app/models/radiant/config.rb,
lib/radiant/extension_gem.rb,
lib/radiant/extension/script.rb,
lib/radiant/extension_loader.rb,
lib/radiant/extension_migrator.rb,
lib/radiant/resource_responses.rb,
lib/radiant/pagination/link_renderer.rb,
lib/generators-rails2/generator_base_extension.rb,
lib/plugins/extension_patches/lib/routing_extension.rb,
lib/generators-rails2/instance/templates/instance_boot.rb
Overview
The only difference between this and a regular Rails::GemPlugin is that
these won't act as engines. This allows us to prioritize their load paths
above the default Radiant core paths.
Defined Under Namespace
Modules: AvailableLocales, Cache, Configuration, GeneratorBaseExtension, Initializer, LegacyRoutes, Pagination, ResourceResponses, RoutingExtension, Taggable, Version
Classes: AdminUI, AppBoot, Boot, Config, Engine, Extension, ExtensionGem, ExtensionLoader, ExtensionMigrator, GemBoot, GemLocator, Setup, VendorBoot
Class Method Summary
collapse
Class Method Details
.app? ⇒ Boolean
34
35
36
|
# File 'lib/radiant.rb', line 34
def self.app?
true
end
|
.boot! ⇒ Object
16
17
18
19
20
21
|
# File 'lib/generators-rails2/instance/templates/instance_boot.rb', line 16
def boot!
unless booted?
preinitialize
pick_boot.run
end
end
|
.booted? ⇒ Boolean
23
24
25
|
# File 'lib/generators-rails2/instance/templates/instance_boot.rb', line 23
def booted?
defined? Radiant::Initializer
end
|
.loaded_via_gem? ⇒ Boolean
TODO Engines should have a similar feature
30
31
32
|
# File 'lib/radiant.rb', line 30
def self.loaded_via_gem?
false
end
|
.pick_boot ⇒ Object
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/generators-rails2/instance/templates/instance_boot.rb', line 27
def pick_boot
case
when app?
AppBoot.new
when vendor?
VendorBoot.new
else
GemBoot.new
end
end
|
.preinitialize ⇒ Object
46
47
48
|
# File 'lib/generators-rails2/instance/templates/instance_boot.rb', line 46
def preinitialize
load(preinitializer_path) if File.exist?(preinitializer_path)
end
|
.preinitializer_path ⇒ Object
54
55
56
|
# File 'lib/generators-rails2/instance/templates/instance_boot.rb', line 54
def preinitializer_path
"#{RAILS_ROOT}/config/preinitializer.rb"
end
|
.vendor? ⇒ Boolean
38
39
40
|
# File 'lib/generators-rails2/instance/templates/instance_boot.rb', line 38
def vendor?
File.exist?("#{RAILS_ROOT}/vendor/radiant")
end
|