Sha256: 99c5ffd4559a6e1d3c35e08614862bc8d4818b60d63689f29aab396ec78a6893

Contents?: true

Size: 800 Bytes

Versions: 24

Compression:

Stored size: 800 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__))

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

24 entries across 24 versions & 1 rubygems

Version Path
bastion-6.1.23 lib/bastion.rb
bastion-6.1.22 lib/bastion.rb
bastion-6.1.21 lib/bastion.rb
bastion-6.1.20 lib/bastion.rb
bastion-6.1.19 lib/bastion.rb
bastion-6.1.18 lib/bastion.rb
bastion-6.1.17 lib/bastion.rb
bastion-6.1.16 lib/bastion.rb
bastion-6.1.15 lib/bastion.rb
bastion-6.1.14 lib/bastion.rb
bastion-6.1.13 lib/bastion.rb
bastion-6.1.12 lib/bastion.rb
bastion-6.1.11 lib/bastion.rb
bastion-6.1.10 lib/bastion.rb
bastion-6.1.9 lib/bastion.rb
bastion-6.1.8 lib/bastion.rb
bastion-6.1.7 lib/bastion.rb
bastion-6.1.6 lib/bastion.rb
bastion-6.1.5 lib/bastion.rb
bastion-6.1.4 lib/bastion.rb