Module: Configuration

Defined in:
lib/httpimagestore/configuration.rb,
lib/httpimagestore/configuration/s3.rb,
lib/httpimagestore/configuration/file.rb,
lib/httpimagestore/configuration/path.rb,
lib/httpimagestore/configuration/output.rb,
lib/httpimagestore/configuration/handler.rb,
lib/httpimagestore/configuration/identify.rb,
lib/httpimagestore/configuration/thumbnailer.rb

Defined Under Namespace

Modules: ConditionalInclusion, ImageMetaData, SDL4RTagExtensions Classes: BadAttributeValueError, FileSource, FileSourceStoreBase, FileStorageOutsideOfRootDirError, FileStore, Global, Handler, Identify, Image, ImageNotLoadedError, InclusionMatcher, InputSource, Matcher, NoAttributeError, NoImageDataForVariableError, NoRequestBodyToGenerateMetaVariableError, NoSuchFileError, NoValueError, NoValueForPathTemplatePlaceholerError, NoValueForSpecTemplatePlaceholerError, NoVariableToGenerateMetaVariableError, OutputImage, OutputMultiBase, OutputOK, OutputStorePath, OutputStoreURL, OutputText, Path, PathNotDefinedError, PathRenderingError, RequestState, S3, S3AccessDenied, S3NoSuchBucketError, S3NoSuchKeyError, S3NotConfiguredError, S3Source, S3SourceStoreBase, S3Store, Scope, SourceStoreBase, StatementCollisionError, StorePathNotSetForImage, StoreURLNotSetForImage, SyntaxError, Thumbnail, Thumnailer, UnexpectedAttributesError, UnexpectedValueError, VariableNotDefinedError, ZeroBodyLengthError

Constant Summary collapse

ConfigurationError =

runtime errors

Class.new ArgumentError

Class Method Summary collapse

Class Method Details

.from_file(config_file, defaults = {}) ⇒ Object



134
135
136
# File 'lib/httpimagestore/configuration.rb', line 134

def self.from_file(config_file, defaults = {})
	read Pathname.new(config_file), defaults
end

.parse(root, defaults = {}) ⇒ Object



142
143
144
145
146
# File 'lib/httpimagestore/configuration.rb', line 142

def self.parse(root, defaults = {})
	configuration = OpenStruct.new
	configuration.defaults = defaults
	Global.new(configuration).parse(root)
end

.read(config, defaults = {}) ⇒ Object



138
139
140
# File 'lib/httpimagestore/configuration.rb', line 138

def self.read(config, defaults = {})
	parse SDL4R::read(config), defaults
end