Project

General

Profile

Revision 720671b8

Added by Ondřej Pražák over 6 years ago

Fixes #13288 - Fix for pattrenfly UI

View differences:

lib/foreman_pipeline/engine.rb
8 8
  class Engine < ::Rails::Engine
9 9
    isolate_namespace ForemanPipeline
10 10

  
11
    initializer 'foreman_pipeline.assets_dispatcher', :before => :build_middleware_stack do |app|
12
      app.middleware.use ::ActionDispatch::Static, "#{ForemanPipeline::Engine.root}/app/assets/javascripts/foreman_pipeline"
13
    end
14

  
11 15
    initializer 'foreman_pipeline.mount_engine', :after => :build_middleware_stack do |app|
12 16
      app.routes_reloader.paths << "#{ForemanPipeline::Engine.root}/config/mount_engine.rb"
13 17
    end
......
20 24
      app.config.autoload_paths += Dir["#{config.root}/app/views/foreman"]
21 25
    end
22 26

  
23
    initializer 'foreman_pipeline.register_plugin', :after => :finisher_hook do
27
    initializer 'foreman_pipeline.register_plugin', :before => :finisher_hook do
24 28
      require 'foreman_pipeline/plugin'
25 29
      require 'foreman_pipeline/permissions'
26 30
      require 'foreman_pipeline/roles'
27 31
    end
28 32

  
29
    initializer 'foreman_pipeline.assets', :group => :all do |app|
33
    initializer 'foreman_pipeline.assets.precompile' do |app|
34
       app.config.assets.precompile += %w(foreman_pipeline/foreman_pipeline.js
35
                                          foreman_pipeline/foreman_pipeline.css)
36
    end
37

  
38
    initializer 'foreman_pipeline.configure_assets', :group => :assets do |app|
30 39
      SETTINGS[:foreman_pipeline] = {
31 40
        :assets => {
32 41
          :precompile => [
33
            'foreman_pipeline/foreman_pipeline.js'
42
            'foreman_pipeline/foreman_pipeline.js',
43
            'foreman_pipeline/foreman_pipeline.css'
34 44
          ]
35 45
        }
36 46
      }
......
69 79
      ::ComputeResource.send :include, ForemanPipeline::Concerns::ComputeResourceExtension
70 80
    end
71 81

  
82

  
72 83
    rake_tasks do
73 84
      load "#{ForemanPipeline::Engine.root}/lib/foreman_pipeline/tasks/foreman_pipeline_seed.rake"
74 85
      load "#{ForemanPipeline::Engine.root}/lib/foreman_pipeline/tasks/foreman_pipeline_test.rake"

Also available in: Unified diff