Sha256: e142d04d1007a2bd856087810628350fabafeae625cadc2a6cf531ae4dec72bf

Contents?: true

Size: 1.39 KB

Versions: 6

Compression:

Stored size: 1.39 KB

Contents

module Blacklight
  class Engine < Rails::Engine
    engine_name "blacklight"

    require 'bootstrap-sass'
    require 'blacklight/rails/routes'

    # BlacklightHelper is needed by all helpers, so we inject it
    # into action view base here. 
    initializer 'blacklight.helpers' do |app|
      ActionView::Base.send :include, BlacklightHelper
    end

    config.autoload_paths += %W(
      #{config.root}/app/presenters
      #{config.root}/app/controllers/concerns
      #{config.root}/app/models/concerns
    )

    # This makes our rake tasks visible.
    rake_tasks do
      Dir.chdir(File.expand_path(File.join(File.dirname(__FILE__), '..'))) do
        Dir.glob(File.join('railties', '*.rake')).each do |railtie|
          load railtie
        end
      end
    end
    
    initializer "blacklight.secret_key" do |app|
      if app.respond_to?(:secrets)
        Blacklight.secret_key ||= app.secrets.secret_key_base
      elsif app.config.respond_to?(:secret_key_base)
        Blacklight.secret_key ||= app.config.secret_key_base
      end
    end

    Blacklight::Engine.config.sms_mappings = {
      'Virgin' => 'vmobl.com',
      'AT&T' => 'txt.att.net',
      'Verizon' => 'vtext.com',
      'Nextel' => 'messaging.nextel.com',
      'Sprint' => 'messaging.sprintpcs.com',
      'T Mobile' => 'tmomail.net',
      'Alltel' => 'message.alltel.com',
      'Cricket' => 'mms.mycricket.com'
    }

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
blacklight-5.17.0 lib/blacklight/engine.rb
blacklight-5.16.4 lib/blacklight/engine.rb
blacklight-5.16.3 lib/blacklight/engine.rb
blacklight-5.16.2 lib/blacklight/engine.rb
blacklight-5.16.1 lib/blacklight/engine.rb
blacklight-5.16.0 lib/blacklight/engine.rb