Sha256: 75f9e73196d53471d7f0eb511968abae349d3291e8935ef6ae4bf5fdcaee1c68

Contents?: true

Size: 1.92 KB

Versions: 4

Compression:

Stored size: 1.92 KB

Contents

require 'sufia/models/resque'
module Sufia
  module Models
    def self.config(&block)
      @@config ||= Engine::Configuration.new

      yield @@config if block

      return @@config
    end

    class Engine < ::Rails::Engine

      # Set some configuration defaults
      config.enable_ffmpeg = false
      config.noid_template = '.reeddeeddk'
      config.ffmpeg_path = 'ffmpeg'
      config.fits_message_length = 5
      config.temp_file_base = nil
      config.minter_statefile = '/tmp/minter-state'
      config.id_namespace = "sufia"
      config.fits_path = "fits.sh"
      config.enable_contact_form_delivery = false
      config.dropbox_api_key = nil
      config.queue = Sufia::Resque::Queue

      config.autoload_paths += %W(
        #{config.root}/lib/sufia/models/jobs
        #{config.root}/app/models/datastreams
      )

      rake_tasks do
        load File.expand_path('../../../tasks/sufia-models_tasks.rake', __FILE__)
      end

      initializer "patches" do
        require 'sufia/models/active_fedora/redis'
        require 'sufia/models/active_record/redis'
        require 'sufia/models/active_support/core_ext/marshal'
      end

      initializer 'requires' do
        require 'sufia/models/model_methods'
        require 'sufia/models/noid'
        require 'sufia/models/file_content'
        require 'sufia/models/file_content/extract_metadata'
        require 'sufia/models/file_content/versions'
        require 'sufia/models/generic_file/actions'
        require 'sufia/models/generic_file/audit'
        require 'sufia/models/generic_file/characterization'
        require 'sufia/models/generic_file/export'
        require 'sufia/models/generic_file/permissions'
        require 'sufia/models/generic_file/thumbnail'
        require 'sufia/models/generic_file'
        require 'sufia/models/user'
        require 'sufia/models/id_service'
        require 'sufia/models/solr_document_behavior'
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
sufia-2.0.1 sufia-models/lib/sufia/models/engine.rb
sufia-models-2.0.1 lib/sufia/models/engine.rb
sufia-2.0.0 sufia-models/lib/sufia/models/engine.rb
sufia-models-2.0.0 lib/sufia/models/engine.rb