Strelka

module
Included Modules
Strelka::Constants
Extended With
Loggability
Strelka::MethodUtilities

A Ruby application framework for Mongrel2.

Author/s

Constants

REVISION

Version-control revision constant

VERSION

Library version constant

Attributes

config[RW]

Public Class Methods

anchor
App( appname )

Look up the application class of appname, optionally limiting it to the gem named gemname. Returns the first matching class, or raises an exception if no app class was found.

# File lib/strelka.rb, line 71
def self::App( appname )
        return Strelka::Discovery.load( appname )
end
anchor
load_config( configfile, defaults=nil )

Convenience method – Load the Configurability::Config from configfile and install it.

# File lib/strelka.rb, line 59
def self::load_config( configfile, defaults=nil )
        defaults ||= Configurability.gather_defaults
        self.log.info "Loading universal config from %p with defaults for sections: %p." %
                [ configfile, defaults.keys ]
        self.config = Configurability::Config.load( configfile, defaults )
        self.config.install
end
anchor
version_string( include_buildnum=false )

Get the library version. If include_buildnum is true, the version string will include the VCS rev ID.

# File lib/strelka.rb, line 45
def self::version_string( include_buildnum=false )
        vstring = "%s %s" % [ self.name, VERSION ]
        vstring << " (build %s)" % [ REVISION[/: ([[:xdigit:]]+)/, 1] || '0' ] if include_buildnum
        return vstring
end