Sha256: bc601bee23f3a7ef2245a527c931932b23ff370256500cfcaa9e3558e00368da

Contents?: true

Size: 831 Bytes

Versions: 14

Compression:

Stored size: 831 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]) if plugin[:config]
    end

    base_config
  end

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
katello-3.13.4 engines/bastion/lib/bastion.rb
katello-3.13.3 engines/bastion/lib/bastion.rb
katello-3.13.2 engines/bastion/lib/bastion.rb
katello-3.13.1 engines/bastion/lib/bastion.rb
katello-3.13.0 engines/bastion/lib/bastion.rb
katello-3.13.0.rc2.1 engines/bastion/lib/bastion.rb
katello-3.13.0.rc2 engines/bastion/lib/bastion.rb
katello-3.12.3 engines/bastion/lib/bastion.rb
katello-3.12.2 engines/bastion/lib/bastion.rb
katello-3.13.0.rc1 engines/bastion/lib/bastion.rb
katello-3.12.1 engines/bastion/lib/bastion.rb
katello-3.12.0 engines/bastion/lib/bastion.rb
katello-3.12.0.rc2 engines/bastion/lib/bastion.rb
katello-3.12.0.rc1 engines/bastion/lib/bastion.rb