Module: Valkyrie

Defined in:
lib/valkyrie.rb,
lib/valkyrie/id.rb,
lib/valkyrie/types.rb,
lib/valkyrie/engine.rb,
lib/valkyrie/storage.rb,
lib/valkyrie/version.rb,
lib/valkyrie/resource.rb,
lib/valkyrie/change_set.rb,
lib/valkyrie/persistence.rb,
lib/valkyrie/value_mapper.rb,
lib/valkyrie/storage_adapter.rb,
lib/valkyrie/metadata_adapter.rb,
lib/valkyrie/adapter_container.rb,
lib/valkyrie/derivative_service.rb,
lib/valkyrie/local_file_service.rb,
lib/valkyrie/persist_derivatives.rb,
lib/valkyrie/resource/access_controls.rb,
lib/valkyrie/file_characterization_service.rb

Overview

This engine exists for the sole purpose of enabling the

`valkyrie_engine:install:migrations` rake task from an including Rails
application. It technically enables a whole host of other functionality -
don't use it, please.

Defined Under Namespace

Modules: Decorators, Indexers, Persistence, Storage, Types, Vocab Classes: AdapterContainer, ChangeSet, Config, DerivativeService, Engine, FileCharacterizationService, ID, LocalFileService, MetadataAdapter, PersistDerivatives, Resource, ResourceGenerator, StorageAdapter, ValueMapper

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.configObject


43
44
45
46
47
# File 'lib/valkyrie.rb', line 43

def config
  @config ||= Config.new(
    YAML.safe_load(ERB.new(File.read(config_root_path.join("config", "valkyrie.yml"))).result)[environment]
  )
end

.config_root_pathObject


53
54
55
56
57
58
59
# File 'lib/valkyrie.rb', line 53

def config_root_path
  if const_defined?(:Rails) && Rails.root
    Rails.root
  else
    Pathname.new(Dir.pwd)
  end
end

.environmentObject


49
50
51
# File 'lib/valkyrie.rb', line 49

def environment
  Rails.env
end

.loggerObject


61
62
63
# File 'lib/valkyrie.rb', line 61

def logger
  @logger ||= Logger.new(STDOUT)
end

.logger=(logger) ⇒ Object


65
66
67
# File 'lib/valkyrie.rb', line 65

def logger=(logger)
  @logger = logger
end