Module: Whisper
- Defined in:
- lib/whisper.rb,
lib/whisper/blog.rb,
lib/whisper/page.rb,
lib/whisper/text.rb,
lib/whisper/entry.rb,
lib/whisper/common.rb,
lib/whisper/config.rb,
lib/whisper/router.rb,
lib/whisper/comment.rb,
lib/whisper/dir_set.rb,
lib/whisper/handler.rb,
lib/whisper/version.rb,
lib/whisper/entry_set.rb,
lib/whisper/timed_map.rb,
lib/whisper/cached_file.rb,
lib/whisper/comment_set.rb,
lib/whisper/dir_scanner.rb,
lib/whisper/email_sender.rb,
lib/whisper/author_tracker.rb,
lib/whisper/email_receiver.rb,
lib/whisper/server.rb,
lib/whisper/mbox.rb
Defined Under Namespace
Modules: Dependency, Loggy Classes: AuthorTracker, Blog, CachedFile, Comment, CommentSet, Config, DirScanner, DirSet, EmailReceiver, EmailSender, Entry, EntrySet, Handler, InvalidPageError, Logger, Mbox, Page, Router, Server, Text, TimedMap
Constant Summary collapse
- ENTRY_METADATA_EXTENSION =
".yaml"
- ENTRY_CONTENT_EXTENSION =
".textile"
- VERSION =
"0.6"
Class Method Summary collapse
Class Method Details
.init(config) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/whisper.rb', line 5 def init config ## load the formatters formatter_fn = File.join(config.formatter_dir, "formatter.rb") begin load formatter_fn rescue SystemCallError Logger.instance.warn "no formatter plugins file #{formatter_fn} found" end entryset = Whisper::EntrySet.new config.post_dir commentset = Whisper::CommentSet.new config.comment_dir router = Whisper::Router.new config.root = Whisper::AuthorTracker.new config. blog = Whisper::Blog.new config, entryset, commentset, router, sender = Whisper::EmailSender.new entryset, commentset, router, , blog.template_for("entry-email", "txt"), blog.template_for("comment-email", "txt"), config receiver = Whisper::EmailReceiver.new entryset, commentset, sender, , config.comment_mbox, config.mbox_offset_filename, config.comment_dir blog.install_default_routes! sender { entryset: entryset, commentset: commentset, router: router, authors: , blog: blog, sender: sender, receiver: receiver } end |