Sha256: 93c997e626d3d8310b7d3fe9950ce571db5606b4a525de6a028882661ff00adf

Contents?: true

Size: 917 Bytes

Versions: 148

Compression:

Stored size: 917 Bytes

Contents

# to make Foreman#in_rake? helper available if Foreman's lib is available
require 'rails'
require 'angular-rails-templates'

require File.expand_path('bastion/engine', File.dirname(__FILE__))

#rubocop:disable Style/ClassVars
module Bastion
  @@plugins = {}

  def self.plugins
    @@plugins
  end

  def self.register_plugin(plugin)
    @@plugins[plugin[:name]] = plugin
  end

  def self.config
    url_root = ENV['RAILS_RELATIVE_URL_ROOT']
    base_config = {
      'markTranslated' => SETTINGS[:mark_translated] || false,
      'relativeUrlRoot' => url_root ? url_root + '/' : '/'
    }

    Bastion.plugins.each do |_name, plugin|
      base_config.merge!(plugin[:config_generator].call) if plugin[:config_generator]
      base_config.merge!(plugin[:config]) if plugin[:config]
    end

    base_config
  end

  def self.localization_path(locale)
    "bastion/angular-i18n/angular-locale_#{locale}.js"
  end
end

Version data entries

148 entries across 148 versions & 1 rubygems

Version Path
katello-4.14.1 engines/bastion/lib/bastion.rb
katello-4.14.0 engines/bastion/lib/bastion.rb
katello-4.14.0.rc3 engines/bastion/lib/bastion.rb
katello-4.14.0.rc2 engines/bastion/lib/bastion.rb
katello-4.14.0.rc1.1 engines/bastion/lib/bastion.rb
katello-4.14.0.rc1 engines/bastion/lib/bastion.rb
katello-4.13.1 engines/bastion/lib/bastion.rb
katello-4.13.0 engines/bastion/lib/bastion.rb
katello-4.12.1 engines/bastion/lib/bastion.rb
katello-4.13.0.rc1 engines/bastion/lib/bastion.rb
katello-4.12.0 engines/bastion/lib/bastion.rb
katello-4.12.0.rc3 engines/bastion/lib/bastion.rb
katello-4.12.0.rc2 engines/bastion/lib/bastion.rb
katello-4.12.0.rc1 engines/bastion/lib/bastion.rb
katello-4.11.1 engines/bastion/lib/bastion.rb
katello-4.11.0 engines/bastion/lib/bastion.rb
katello-4.11.0.rc2 engines/bastion/lib/bastion.rb
katello-4.11.0.rc1 engines/bastion/lib/bastion.rb
katello-4.10.0 engines/bastion/lib/bastion.rb
katello-4.9.2 engines/bastion/lib/bastion.rb