Sha256: c2a4d74a9d86ebe14a18b8da6c6140eaf05635491da9f951e05e8631da6df46c

Contents?: true

Size: 781 Bytes

Versions: 1

Compression:

Stored size: 781 Bytes

Contents

module ForemanHostRundeck
  class Engine < ::Rails::Engine

    config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
    config.autoload_paths += Dir["#{config.root}/app/services"]

    initializer 'foreman_host_rundeck.register_plugin', :after => :finisher_hook do |app|
      Foreman::Plugin.register :foreman_host_rundeck do
        requires_foreman '>= 1.6'

        # Add permissions
        security_block :foreman_host_rundeck do
          permission :view_foreman_host_rundeck, {:hosts_controller => [:index, :show]}
        end
      end
    end

    #Include concerns in this config.to_prepare block
    config.to_prepare do
      begin
        HostsController.send(:include, ForemanHostRundeck::HostsControllerExtensions)
       end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
foreman_host_rundeck-0.0.3 lib/foreman_host_rundeck/engine.rb