= consoleappsupport
http://rubyforge.org/projects/consolesupport/
== DESCRIPTION:
The ConsoleAppSupport module provides some commonly-desired behavior
for command-line programs: currently command-line parsing; config file
loading; and log4r integration. Its primary audience is Ruby coders
who need to frequently and quickly write special-purpose scripts
that are nevertheless flexible and self-documenting.
== FEATURES:
This module currently provides the following configuration services for
command-line applications:
* Determines configuration options for a program by parsing specially-formatted
comments in the main source file, similarly to RDoc.
* Loads values for these configuration options by parsing the command line.
* Loads further values from a run-time config file. As usual, command-line
options override config file options, which override defaults.
The module also provides the following logging services for command-line
applications:
* Provides a Log4r object with the default configuration, pointed to STDOUT.
* Automatically loads a Logr4 config file, if config option "--log4r-file" is
defined and enabled.
* Displays RDoc usage message if config option "--help" is defined and enabled.
== SYNOPSIS:
1. 'require consoleappsupport' from somewhere in your code.
2. Define your program's configuration options in the initial comment block.
(see below, and examples/console_app_example.rb for examples)
3. 'include ConsoleAppSupport::ConsoleAppMixin' in your main application class.
4. Call super in your program's initialize method.
5. Use @opts[:option_name] to access the final configuration.
6. Use @log.[debug,info,etc.] to send log messages.
7. Call read_configuration_files at any time to reload the both the application
config file and the Log4r configuration file.
== REQUIREMENTS:
log4r
== INSTALL:
sudo gem consoleappsupport
== LICENSE:
The consoleappsupport gem is distributed under the MIT license.
A copy is included in LICENSE.txt
http://rubyforge.org/projects/consolesupport/
== DESCRIPTION:
The ConsoleAppSupport module provides some commonly-desired behavior
for command-line programs: currently command-line parsing; config file
loading; and log4r integration. Its primary audience is Ruby coders
who need to frequently and quickly write special-purpose scripts
that are nevertheless flexible and self-documenting.
== FEATURES:
This module currently provides the following configuration services for
command-line applications:
* Determines configuration options for a program by parsing specially-formatted
comments in the main source file, similarly to RDoc.
* Loads values for these configuration options by parsing the command line.
* Loads further values from a run-time config file. As usual, command-line
options override config file options, which override defaults.
The module also provides the following logging services for command-line
applications:
* Provides a Log4r object with the default configuration, pointed to STDOUT.
* Automatically loads a Logr4 config file, if config option "--log4r-file" is
defined and enabled.
* Displays RDoc usage message if config option "--help" is defined and enabled.
== SYNOPSIS:
1. 'require consoleappsupport' from somewhere in your code.
2. Define your program's configuration options in the initial comment block.
(see below, and examples/console_app_example.rb for examples)
3. 'include ConsoleAppSupport::ConsoleAppMixin' in your main application class.
4. Call super in your program's initialize method.
5. Use @opts[:option_name] to access the final configuration.
6. Use @log.[debug,info,etc.] to send log messages.
7. Call read_configuration_files at any time to reload the both the application
config file and the Log4r configuration file.
== REQUIREMENTS:
log4r
== INSTALL:
sudo gem consoleappsupport
== LICENSE:
The consoleappsupport gem is distributed under the MIT license.
A copy is included in LICENSE.txt