lib/sup.rb in sup-0.0.1 vs lib/sup.rb in sup-0.0.2
- old
+ new
@@ -1,22 +1,23 @@
require 'rubygems'
require 'yaml'
require 'zlib'
require 'thread'
require 'fileutils'
+
Thread.abort_on_exception = true # make debugging possible
class Object
- ## this is for debugging purposes because i keep calling nil.id and
- ## i want it to throw an exception
- def id
+ ## this is for debugging purposes because i keep calling #id on the
+ ## wrong object and i want it to throw an exception
+ def id
raise "wrong id called"
end
end
module Redwood
- VERSION = "0.0.1"
+ VERSION = "0.0.2"
BASE_DIR = File.join(ENV["HOME"], ".sup")
CONFIG_FN = File.join(BASE_DIR, "config.yaml")
SOURCE_FN = File.join(BASE_DIR, "sources.yaml")
LABEL_FN = File.join(BASE_DIR, "labels.txt")
@@ -26,11 +27,10 @@
YAML_DOMAIN = "masanjin.net"
YAML_DATE = "2006-10-01"
## one-stop shop for yamliciousness
-
def register_yaml klass, props
vars = props.map { |p| "@#{p}" }
path = klass.name.gsub(/::/, "/")
klass.instance_eval do
@@ -63,11 +63,10 @@
module_function :register_yaml, :save_yaml_obj, :load_yaml_obj
end
## set up default configuration file
-
if File.exists? Redwood::CONFIG_FN
$config = Redwood::load_yaml_obj Redwood::CONFIG_FN
else
$config = {
:accounts => {
@@ -90,10 +89,12 @@
end
require "sup/util"
require "sup/update"
require "sup/message"
+require "sup/source"
require "sup/mbox"
+require "sup/imap"
require "sup/person"
require "sup/account"
require "sup/thread"
require "sup/index"
require "sup/textfield"