Sha256: c19f44a5225e00d1598ee37343a123c7933a3fd4be6a6516a643816b091dec43

Contents?: true

Size: 880 Bytes

Versions: 6

Compression:

Stored size: 880 Bytes

Contents

module Sis
  module Core
    class Engine < ::Rails::Engine
      isolate_namespace Sis::Core

      config.generators.api_only = true
      config.eager_load_paths << Sis::Core::Engine.root.join('lib')
      config.autoload_paths << Sis::Core::Engine.root.join('lib')

      config.generators do |g|
        g.test_framework :rspec
        g.fixture_replacement :factory_bot
        g.factory_bot dir: 'spec/factories'
      end

      initializer 'sis_core.factories', after: 'factory_bot.set_factory_paths' do
        FactoryBot.definition_file_paths << File.expand_path('../../../spec/factories', __dir__) if defined?(FactoryBot)
      end

      initializer :append_migrations do |app|
        unless app.root.to_s.match(root.to_s + File::SEPARATOR)
          app.config.paths['db/migrate'].concat(config.paths['db/migrate'].expanded)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sis_core-1.0.11 lib/sis/core/engine.rb
sis_core-1.0.10 lib/sis/core/engine.rb
sis_core-1.0.9 lib/sis/core/engine.rb
sis_core-1.0.8 lib/sis/core/engine.rb
sis_core-1.0.7 lib/sis/core/engine.rb
sis_core-1.0.6 lib/sis/core/engine.rb