Sha256: 5d25244c68a7f0dd086dede3ae5f60c9707afc83908a94393e24c89affd951bc

Contents?: true

Size: 1.42 KB

Versions: 13

Compression:

Stored size: 1.42 KB

Contents

# frozen_string_literal: true

require 'blacklight'
require 'traject'
require 'active_model'
require 'arclight/exceptions'
require 'arclight/normalized_date'
require 'arclight/normalized_id'
require 'arclight/normalized_title'
require 'arclight/digital_object'
require 'gretel'

module Arclight
  ##
  # This is the defining class for the Arclight Rails Engine
  class Engine < ::Rails::Engine
    config.oembed_resource_exclude_patterns = [/\.pdf$/, /\.ppt$/]

    Arclight::Engine.config.catalog_controller_group_query_params = {
      group: true,
      'group.field': '_root_',
      'group.ngroups': true,
      'group.limit': 3,
      fl: '*,collection:[subquery]',
      'collection.q': '{!terms f=id v=$row._root_}',
      'collection.defType': 'lucene',
      'collection.fl': '*',
      'collection.rows': 1
    }

    initializer 'arclight.helpers' do
      config.after_initialize do
        ActiveSupport.on_load(:action_view) { include ArclightHelper }
      end
    end

    initializer 'arclight.assets', before: 'assets' do |app|
      app.config.assets.precompile << 'arclight/arclight.js'
      app.config.assets.precompile << 'arclight/oembed_controller.js'
      app.config.assets.precompile << 'arclight/truncate_controller.js'
    end

    initializer 'arclight.importmap', before: 'importmap' do |app|
      app.config.importmap.paths << Engine.root.join('config/importmap.rb') if app.config.respond_to?(:importmap)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
arclight-1.4.0 lib/arclight/engine.rb
arclight-1.3.0 lib/arclight/engine.rb
arclight-1.2.0 lib/arclight/engine.rb
arclight-1.1.3 lib/arclight/engine.rb
arclight-1.1.2 lib/arclight/engine.rb
arclight-1.1.1 lib/arclight/engine.rb
arclight-1.1.0 lib/arclight/engine.rb
arclight-1.0.1 lib/arclight/engine.rb
arclight-1.0.0 lib/arclight/engine.rb
arclight-1.0.0.beta6 lib/arclight/engine.rb
arclight-1.0.0.beta4 lib/arclight/engine.rb
arclight-1.0.0.beta3 lib/arclight/engine.rb
arclight-1.0.0.beta2 lib/arclight/engine.rb