Sha256: f4fd34233202856af4d873defc1a38dd8656ded858849d042a74f7e9cf98263c

Contents?: true

Size: 1.24 KB

Versions: 120

Compression:

Stored size: 1.24 KB

Contents

# frozen_string_literal: true

require "sassc-rails"
require "slim-rails"

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

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

    config.assets.paths ||= []
    config.assets.paths << "#{Gem.loaded_specs['playbook_ui'].full_gem_path}/fonts"
    config.assets.paths << "#{Gem.loaded_specs['playbook_ui'].full_gem_path}/app/pb_kits/playbook/pb_*"

    config.sass.load_paths ||= []
    config.sass.load_paths << "#{Gem.loaded_specs['playbook_ui'].full_gem_path}/app/pb_kits/playbook"

    initializer "playbook_ui.add_view_paths", after: :add_view_paths do |_app|
      ActiveSupport.on_load(:action_controller) do
        append_view_path "#{Gem.loaded_specs['playbook_ui'].full_gem_path}/app/pb_kits/playbook"
      end
    end

    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

120 entries across 120 versions & 1 rubygems

Version Path
playbook_ui-7.0.1.pre.alpha4 lib/playbook/engine.rb
playbook_ui-7.0.1.pre.alpha3 lib/playbook/engine.rb
playbook_ui-7.0.1.pre.alpha2 lib/playbook/engine.rb
playbook_ui-6.4.2 lib/playbook/engine.rb
playbook_ui-7.0.1.pre.alpha1 lib/playbook/engine.rb
playbook_ui-6.4.1 lib/playbook/engine.rb
playbook_ui-6.4.0 lib/playbook/engine.rb
playbook_ui-6.3.1 lib/playbook/engine.rb
playbook_ui-6.3.0 lib/playbook/engine.rb
playbook_ui-6.2.1 lib/playbook/engine.rb
playbook_ui-6.2.0 lib/playbook/engine.rb
playbook_ui-6.1.0.pre.alpha5 lib/playbook/engine.rb
playbook_ui-6.1.0.pre.alpha4 lib/playbook/engine.rb
playbook_ui-6.1.0.pre.alpha3 lib/playbook/engine.rb
playbook_ui-6.1.0.pre.alpha2 lib/playbook/engine.rb
playbook_ui-6.1.0.pre.alpha1 lib/playbook/engine.rb
playbook_ui-6.1.0 lib/playbook/engine.rb
playbook_ui-6.0.1.pre.alpha6 lib/playbook/engine.rb
playbook_ui-6.0.1.pre.alpha5 lib/playbook/engine.rb
playbook_ui-6.0.1.pre.alpha4 lib/playbook/engine.rb