Sha256: cd08e7460e70330dd119064734401edeaff8421a4ce201add1e97bbdb73fc150

Contents?: true

Size: 746 Bytes

Versions: 4

Compression:

Stored size: 746 Bytes

Contents

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

      config.generators.api_only = true

      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

4 entries across 4 versions & 1 rubygems

Version Path
sis_core-1.0.5 lib/sis/core/engine.rb
sis_core-1.0.4 lib/sis/core/engine.rb
sis_core-1.0.1 lib/sis/core/engine.rb
sis_core-1.0.0 lib/sis/core/engine.rb