Module: Radiant::Initializer
- Includes:
- Rails::Initializer
- Defined in:
- lib/radiant/initializer.rb
Class Method Summary collapse
Instance Method Summary collapse
- #add_plugin_load_paths ⇒ Object
- #admin ⇒ Object
- #after_initialize ⇒ Object
- #extension_loader ⇒ Object
- #initialize_i18n ⇒ Object
-
#initialize_metal ⇒ Object
override Rails initializer to insert extension metals.
- #initialize_routing ⇒ Object
- #load_plugins ⇒ Object
- #set_autoload_paths ⇒ Object
Class Method Details
.admin ⇒ Object
207 208 209 |
# File 'lib/radiant/initializer.rb', line 207 def self.admin AdminUI.instance end |
.configuration ⇒ Object
211 212 213 |
# File 'lib/radiant/initializer.rb', line 211 def self.configuration Radiant::Configuration end |
Instance Method Details
#add_plugin_load_paths ⇒ Object
186 187 188 189 190 191 |
# File 'lib/radiant/initializer.rb', line 186 def add_plugin_load_paths # checks for plugins within extensions: extension_loader.add_plugin_paths super ActiveSupport::Dependencies.load_once_paths -= extension_loader.extension_load_paths end |
#admin ⇒ Object
221 222 223 |
# File 'lib/radiant/initializer.rb', line 221 def admin configuration.admin end |
#after_initialize ⇒ Object
201 202 203 204 205 |
# File 'lib/radiant/initializer.rb', line 201 def after_initialize super extension_loader.activate_extensions configuration.check_extension_dependencies end |
#extension_loader ⇒ Object
225 226 227 |
# File 'lib/radiant/initializer.rb', line 225 def extension_loader ExtensionLoader.instance {|l| l.initializer = self } end |
#initialize_i18n ⇒ Object
179 180 181 182 183 184 |
# File 'lib/radiant/initializer.rb', line 179 def initialize_i18n extension_loader.add_locale_paths radiant_locale_paths = Dir[File.join(RADIANT_ROOT, 'config', 'locales', '*.{rb,yml}')] configuration.i18n.load_path = radiant_locale_paths + extension_loader.configuration.i18n.load_path super end |
#initialize_metal ⇒ Object
override Rails initializer to insert extension metals
168 169 170 171 172 173 174 175 176 177 |
# File 'lib/radiant/initializer.rb', line 168 def Rails::Rack::Metal. = configuration. Rails::Rack::Metal. = ["#{RADIANT_ROOT}/app/metal"] # reset Rails default to RADIANT_ROOT Rails::Rack::Metal. += plugin_loader. Rails::Rack::Metal. += extension_loader. configuration.middleware.insert_before( :"ActionController::ParamsParser", Rails::Rack::Metal, :if => Rails::Rack::Metal..any?) end |
#initialize_routing ⇒ Object
216 217 218 219 |
# File 'lib/radiant/initializer.rb', line 216 def initialize_routing extension_loader.add_controller_paths super end |
#load_plugins ⇒ Object
193 194 195 196 197 198 199 |
# File 'lib/radiant/initializer.rb', line 193 def load_plugins super extension_loader.load_extensions add_gem_load_paths load_gems check_gem_dependencies end |
#set_autoload_paths ⇒ Object
162 163 164 165 |
# File 'lib/radiant/initializer.rb', line 162 def set_autoload_paths extension_loader.add_extension_paths super end |