Sha256: 0af6564dd1201384630762440953b007e57d7251159c7132a3809a26aad090e1

Contents?: true

Size: 1 KB

Versions: 1

Compression:

Stored size: 1 KB

Contents

require 'action_mailer/railtie'
require 'sass-rails'
require 'slim-rails'

module Playbook
  class Engine < ::Rails::Engine
    isolate_namespace Playbook

    config.generators do |g|
      g.test_framework :rspec
    end

    config.sass.load_paths ||= []
    config.assets.paths ||= []
    config.assets.paths << "#{Gem.loaded_specs['playbook_ui'].full_gem_path}/fonts"
    config.sass.load_paths << "#{Gem.loaded_specs['playbook_ui'].full_gem_path}/sass-mixins"
    config.sass.load_paths << "#{Gem.loaded_specs['playbook_ui'].full_gem_path}/components"

    initializer "webpacker.proxy" do |app|
        insert_middleware = begin
                            Playbook.webpacker.config.dev_server.present?
                          rescue
                            nil
                          end
        next unless insert_middleware

        app.middleware.insert_before(
          0, Webpacker::DevServerProxy,
          ssl_verify_none: true,
          webpacker: Playbook.webpacker
        )
      end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
playbook_ui-2.5.0 lib/playbook/engine.rb