Sha256: a22dd8f0a81b20575f5d08731f03c305e57b0c9aed254b97aac2b3832b4faf75

Contents?: true

Size: 1.75 KB

Versions: 14

Compression:

Stored size: 1.75 KB

Contents

# Load blacklight which will give curation_concerns views a higher preference than those in blacklight
require 'blacklight'
require 'hydra-editor'
require 'jquery-ui-rails'
require 'qa'
require 'sprockets/es6'

module CurationConcerns
  # Ensures that routes to curation_concerns are prefixed with `curation_concerns_`
  # def self.use_relative_model_naming?
  #   false
  # end

  class Engine < ::Rails::Engine
    isolate_namespace CurationConcerns
    require 'awesome_nested_set'
    require 'breadcrumbs_on_rails'

    config.autoload_paths += %W(
      #{config.root}/app/actors/concerns
      #{config.root}/lib
    )

    initializer 'curation_concerns.initialize' do
      require 'curation_concerns/rails/routes'
    end

    initializer 'curation_concerns.assets.precompile' do |app|
      app.config.assets.paths << config.root.join('app', 'assets', 'images')

      app.config.assets.precompile += %w(*.png *.gif)
    end

    initializer 'requires' do
      require 'active_fedora/noid'
      require 'curation_concerns/noid'
      require 'curation_concerns/permissions'
      require 'curation_concerns/lockable'
    end

    initializer 'configure' do
      CurationConcerns.config.tap do |c|
        Hydra::Derivatives.ffmpeg_path    = c.ffmpeg_path
        Hydra::Derivatives.temp_file_base = c.temp_file_base
        Hydra::Derivatives.fits_path      = c.fits_path
        Hydra::Derivatives.enable_ffmpeg  = c.enable_ffmpeg

        ActiveFedora::Base.translate_uri_to_id = ActiveFedora::Noid.config.translate_uri_to_id
        ActiveFedora::Base.translate_id_to_uri = ActiveFedora::Noid.config.translate_id_to_uri
        ActiveFedora::Noid.config.template = c.noid_template
        ActiveFedora::Noid.config.statefile = c.minter_statefile
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
curation_concerns-1.0.0.beta9 lib/curation_concerns/engine.rb
curation_concerns-1.0.0.beta8 lib/curation_concerns/engine.rb
curation_concerns-1.0.0.beta7 lib/curation_concerns/engine.rb
curation_concerns-1.0.0.beta6 lib/curation_concerns/engine.rb
curation_concerns-1.0.0.beta5 lib/curation_concerns/engine.rb
curation_concerns-1.0.0.beta4 lib/curation_concerns/engine.rb
curation_concerns-1.0.0.beta3 lib/curation_concerns/engine.rb
curation_concerns-1.0.0.beta2 lib/curation_concerns/engine.rb
curation_concerns-1.0.0.beta1 lib/curation_concerns/engine.rb
curation_concerns-0.14.0 lib/curation_concerns/engine.rb
curation_concerns-0.14.0.pre4 lib/curation_concerns/engine.rb
curation_concerns-0.14.0.pre3 lib/curation_concerns/engine.rb
curation_concerns-0.14.0.pre2 lib/curation_concerns/engine.rb
curation_concerns-0.14.0.pre1 lib/curation_concerns/engine.rb