Sha256: 7db5541b3695d02a558fd6596e42fd371f24363be0bd6ce3ed5161fdda10f996

Contents?: true

Size: 812 Bytes

Versions: 15

Compression:

Stored size: 812 Bytes

Contents

# Rails dependencies
require 'sass-rails'

module Kadmin
  class Engine < ::Rails::Engine
    isolate_namespace Kadmin

    # push engine factory paths always at the top of the path stack
    initializer 'kadmin.factories', after: 'factory_bot.set_factory_paths' do
      factory_paths = File.expand_path('../../../test/factories', __FILE__) # path relative to installation location
      FactoryBot.definition_file_paths.unshift(factory_paths) if defined?(FactoryBot)
    end

    initializer 'kadmin.install' do
      Kadmin.logger = Rails.logger
    end

    initializer :append_migrations do |app|
      unless app.root.to_s.match(root.to_s)
        config.paths['db/migrate'].expanded.each do |expanded_path|
          app.config.paths['db/migrate'] << expanded_path
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kadmin-1.3.0 lib/kadmin/engine.rb
kadmin-1.2.1 lib/kadmin/engine.rb
kadmin-1.2.0 lib/kadmin/engine.rb
kadmin-1.1.1 lib/kadmin/engine.rb
kadmin-1.1.0 lib/kadmin/engine.rb
kadmin-1.0.9 lib/kadmin/engine.rb
kadmin-1.0.8 lib/kadmin/engine.rb
kadmin-1.0.7 lib/kadmin/engine.rb
kadmin-1.0.6 lib/kadmin/engine.rb
kadmin-1.0.5 lib/kadmin/engine.rb
kadmin-1.0.4 lib/kadmin/engine.rb
kadmin-1.0.3 lib/kadmin/engine.rb
kadmin-1.0.2 lib/kadmin/engine.rb
kadmin-1.0.1 lib/kadmin/engine.rb
kadmin-1.0.0 lib/kadmin/engine.rb