Sha256: 21f0fc808f52a2f55c57c79229888d26fd3917bdc38b4a453cacd438a3b5b507

Contents?: true

Size: 1.93 KB

Versions: 13

Compression:

Stored size: 1.93 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'
    require 'rdf/vocab'
    require 'highcharts-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 'curation_concerns/noid'
      require 'curation_concerns/permissions'
      require 'curation_concerns/lockable'
      require 'power_converters'
      require 'dry/struct'
      require 'dry/equalizer'
      require 'dry/validation'
    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 = c.translate_uri_to_id
        ActiveFedora::Base.translate_id_to_uri = c.translate_id_to_uri
        ActiveFedora::Noid.config.template = c.noid_template
        ActiveFedora::Noid.config.statefile = c.minter_statefile
      end
    end

    rake_tasks do
      load File.expand_path('../../../tasks/workflow.rake', __FILE__)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 lib/curation_concerns/engine.rb
curation_concerns-1.7.7 lib/curation_concerns/engine.rb
curation_concerns-2.0.0 lib/curation_concerns/engine.rb
curation_concerns-2.0.0.rc2 lib/curation_concerns/engine.rb
curation_concerns-1.7.6 lib/curation_concerns/engine.rb
curation_concerns-1.7.5 lib/curation_concerns/engine.rb
curation_concerns-1.7.4 lib/curation_concerns/engine.rb
curation_concerns-1.7.3 lib/curation_concerns/engine.rb
curation_concerns-1.7.2 lib/curation_concerns/engine.rb
curation_concerns-2.0.0.rc1 lib/curation_concerns/engine.rb
curation_concerns-1.7.1 lib/curation_concerns/engine.rb
curation_concerns-1.7.0 lib/curation_concerns/engine.rb
curation_concerns-1.7.0.beta1 lib/curation_concerns/engine.rb