Module: Apollo::RbConfig

Defined in:
lib/apollo_crawler/config.rb

Constant Summary collapse

PROGRAM_DIRECTORY =

Directory for storing apollo-crawler data

File.expand_path("~/.apollo-crawler")
PROGRAM_PLUGINS_DIRECTORY =
File.join(PROGRAM_DIRECTORY, "plugins")
PROGRAM_TEMP_DIRECTORY =
File.join(PROGRAM_DIRECTORY, "tmp")
PROGRAM_DIRECTORIES =

Basic PROGRAM_DIRECTORY structure, lazy created

[
	PROGRAM_DIRECTORY,
	PROGRAM_PLUGINS_DIRECTORY,
	PROGRAM_TEMP_DIRECTORY
]
PROGRAM_CONFIG_PATH =
File.join(RbConfig::PROGRAM_DIRECTORY, "config.rb")
CACHES_DIR =

Caches - caches implementations

File.join(File.dirname(__FILE__), "caches")
CACHE_CLASS_OPTIONS_MONGO =

Cache implementation used for chaching pages retreived

Filesystem backend CACHE_CLASS = Apollo::Cache::FilesystemCache

Memcached - expects localhost:11211 CACHE_CLASS = Apollo::Cache::MemcachedCache

Pure naive ruby in-memory implementation CACHE_CLASS = Apollo::Cache::MemoryCache

Null caching - no caching at all CACHE_CLASS = Apollo::Cache::NullCache

{
	:host => 'apollo-crawler.no-ip.org', 
	:port => 27017, 
	:pool_size => 5, 
	:pool_timeout => 5,
	:db => 'apollo-crawler',
	:collection => 'fetched_docs'
}
CACHE_CLASS_OPTIONS_SQLITE3 =
{
	:db => 'apollo-crawler-db',
	:collection => 'fetched_docs'
}
CACHE_CLASS =

Used caching mechanism by default

Apollo::Cache::MemcachedCache
CACHE_CLASS_OPTIONS =
nil
CRAWLERS_DIR =

Crawlers - Built-in out-of box working crawlers

File.join(File.dirname(__FILE__), "crawler")
CRAWLER_TEMPLATE_NAME =

Template used for generated crawlers

"crawler_template.trb"
CRAWLER_TEMPLATE_PATH =

Path of template

File.join(CRAWLERS_DIR, CRAWLER_TEMPLATE_NAME)
FETCHERS_DIR =

Fetchers - used for fetching documents

File.join(File.dirname(__FILE__), "fetcher")
DEFAULT_FETCHER =
Apollo::Fetcher::SmartFetcher
FORMATTERS_DIR =

Formatters - used for formatting crawled documents results

File.join(File.dirname(__FILE__), "formatter")
DEFAULT_FORMATTER =

Default formatter if no other specified

Apollo::Formatter::JsonFormatter
DEFAULT_LOGGER =

Loggers - used for formatting output messages

Apollo::Logger::ConsoleLogger