Sha256: cb27c7dd6d60e710df06ed907b21551cf8a44c43420e8822272b4f8e557726d5
Contents?: true
Size: 1.88 KB
Versions: 5
Compression:
Stored size: 1.88 KB
Contents
module Kuroko2 class Engine < ::Rails::Engine isolate_namespace Kuroko2 config.before_configuration do require 'kaminari' require 'slim' require 'jbuilder' require 'garage' require 'jquery-rails' require 'momentjs-rails' require 'rails_bootstrap_sortable' require 'select2-rails' require 'font-awesome-rails' require 'visjs/rails' require 'dotenv-rails' require 'weak_parameters' end config.autoload_paths << root.join('lib/autoload').to_s config.eager_load_paths << root.join('lib/autoload').to_s initializer "kuroko2.configuration" do |app| URI.parse(Kuroko2.config.url).tap do |url| Kuroko2.config.url_host = url.host Kuroko2.config.url_scheme = url.scheme Kuroko2.config.url_port = url.port end config.active_record.table_name_prefix = Kuroko2.config.table_name_prefix if Kuroko2.config.custom_tasks Kuroko2.config.custom_tasks.each do |key, klass| unless Workflow::Node::TASK_REGISTORY.has_key?(key) Workflow::Node.register( key: key.to_sym, klass: Workflow::Task.const_get(klass, false) ) end end end config.action_mailer.default_url_options = { host: Kuroko2.config.url_host, protocol: Kuroko2.config.url_scheme, port: Kuroko2.config.url_port } config.action_mailer.delivery_method = Kuroko2.config.action_mailer.delivery_method.to_sym config.action_mailer.smtp_settings = Kuroko2.config.action_mailer.smtp_settings.to_h.symbolize_keys || {} if Kuroko2.config.extentions && Kuroko2.config.extentions.controller Kuroko2.config.extentions.controller.each do |extention| Kuroko2::ApplicationController.include(Module.const_get(extention, false)) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
kuroko2-0.3.2 | lib/kuroko2/engine.rb |
kuroko2-0.3.1 | lib/kuroko2/engine.rb |
kuroko2-0.3.0 | lib/kuroko2/engine.rb |
kuroko2-0.2.3 | lib/kuroko2/engine.rb |
kuroko2-0.2.2 | lib/kuroko2/engine.rb |