From bc57f32fa7cfdece8791bc30d3e75aa9e211cf78 Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Thu, 10 Jul 2008 14:22:30 +0200 Subject: [PATCH] Clean up directory layout This moves plugins to the plugin directory and all libs to the lib directory. Disabled plugins have been moved to plugins/disabled --- cybot.rb | 10 ++++++---- {configspace => lib}/configspace.rb | 0 {ircbase => lib/ircbase}/irc.rb | 0 pluginbase.rb => lib/pluginbase.rb | 0 {support => lib/support}/async.rb | 0 {support => lib/support}/htmlentities.rb | 0 {plugins-disabled => plugins/disabled}/feed.rb | 0 {plugins-disabled => plugins/disabled}/goners.rb | 0 {plugins-disabled => plugins/disabled}/logger.rb | 0 {plugins-disabled => plugins/disabled}/phrases.rb | 0 {plugins-disabled => plugins/disabled}/scribe.rb | 0 {plugins-disabled => plugins/disabled}/suck.rb | 0 {plugins-disabled => plugins/disabled}/textmate.rb | 0 {plugins-disabled => plugins/disabled}/topic.rb | 0 {plugins-disabled => plugins/disabled}/web.rb | 0 {lib => plugins}/irc.rb | 0 {lib => plugins}/plugin.rb | 0 {lib => plugins}/test.rb | 0 {lib => plugins}/user.rb | 0 19 files changed, 6 insertions(+), 4 deletions(-) rename {configspace => lib}/configspace.rb (100%) rename {ircbase => lib/ircbase}/irc.rb (100%) rename pluginbase.rb => lib/pluginbase.rb (100%) rename {support => lib/support}/async.rb (100%) rename {support => lib/support}/htmlentities.rb (100%) rename {plugins-disabled => plugins/disabled}/feed.rb (100%) rename {plugins-disabled => plugins/disabled}/goners.rb (100%) rename {plugins-disabled => plugins/disabled}/logger.rb (100%) rename {plugins-disabled => plugins/disabled}/phrases.rb (100%) rename {plugins-disabled => plugins/disabled}/scribe.rb (100%) rename {plugins-disabled => plugins/disabled}/suck.rb (100%) rename {plugins-disabled => plugins/disabled}/textmate.rb (100%) rename {plugins-disabled => plugins/disabled}/topic.rb (100%) rename {plugins-disabled => plugins/disabled}/web.rb (100%) rename {lib => plugins}/irc.rb (100%) rename {lib => plugins}/plugin.rb (100%) rename {lib => plugins}/test.rb (100%) rename {lib => plugins}/user.rb (100%) diff --git a/cybot.rb b/cybot.rb index f349b2d..a4387af 100755 --- a/cybot.rb +++ b/cybot.rb @@ -9,9 +9,11 @@ # Some modules we need. require 'thread' +$: << File.join(File.dirname(__FILE__), "lib") require 'pluginbase' -require 'configspace/configspace' -require 'lib/logging' +require 'configspace' +require 'logging' +#require 'irc' # Create a log instance $log = Logging.new @@ -23,7 +25,7 @@ # ===================== # Root plugins. We always need these. -RootPlugins = ['plugin', 'irc', 'user', 'test'] +RootPlugins = ['plugin', 'user', 'test', 'irc'] # Provide a namespace for plugins. module Plugins @@ -41,7 +43,7 @@ def load_plugin(name) # Try to load. n = name.downcase - Plugins.module_eval { load("lib/#{n}.rb") } + Plugins.module_eval { load("plugins/#{n}.rb") } # Find the class. if (klass = self.class.const_get(n.capitalize)) diff --git a/configspace/configspace.rb b/lib/configspace.rb similarity index 100% rename from configspace/configspace.rb rename to lib/configspace.rb diff --git a/ircbase/irc.rb b/lib/ircbase/irc.rb similarity index 100% rename from ircbase/irc.rb rename to lib/ircbase/irc.rb diff --git a/pluginbase.rb b/lib/pluginbase.rb similarity index 100% rename from pluginbase.rb rename to lib/pluginbase.rb diff --git a/support/async.rb b/lib/support/async.rb similarity index 100% rename from support/async.rb rename to lib/support/async.rb diff --git a/support/htmlentities.rb b/lib/support/htmlentities.rb similarity index 100% rename from support/htmlentities.rb rename to lib/support/htmlentities.rb diff --git a/plugins-disabled/feed.rb b/plugins/disabled/feed.rb similarity index 100% rename from plugins-disabled/feed.rb rename to plugins/disabled/feed.rb diff --git a/plugins-disabled/goners.rb b/plugins/disabled/goners.rb similarity index 100% rename from plugins-disabled/goners.rb rename to plugins/disabled/goners.rb diff --git a/plugins-disabled/logger.rb b/plugins/disabled/logger.rb similarity index 100% rename from plugins-disabled/logger.rb rename to plugins/disabled/logger.rb diff --git a/plugins-disabled/phrases.rb b/plugins/disabled/phrases.rb similarity index 100% rename from plugins-disabled/phrases.rb rename to plugins/disabled/phrases.rb diff --git a/plugins-disabled/scribe.rb b/plugins/disabled/scribe.rb similarity index 100% rename from plugins-disabled/scribe.rb rename to plugins/disabled/scribe.rb diff --git a/plugins-disabled/suck.rb b/plugins/disabled/suck.rb similarity index 100% rename from plugins-disabled/suck.rb rename to plugins/disabled/suck.rb diff --git a/plugins-disabled/textmate.rb b/plugins/disabled/textmate.rb similarity index 100% rename from plugins-disabled/textmate.rb rename to plugins/disabled/textmate.rb diff --git a/plugins-disabled/topic.rb b/plugins/disabled/topic.rb similarity index 100% rename from plugins-disabled/topic.rb rename to plugins/disabled/topic.rb diff --git a/plugins-disabled/web.rb b/plugins/disabled/web.rb similarity index 100% rename from plugins-disabled/web.rb rename to plugins/disabled/web.rb diff --git a/lib/irc.rb b/plugins/irc.rb similarity index 100% rename from lib/irc.rb rename to plugins/irc.rb diff --git a/lib/plugin.rb b/plugins/plugin.rb similarity index 100% rename from lib/plugin.rb rename to plugins/plugin.rb diff --git a/lib/test.rb b/plugins/test.rb similarity index 100% rename from lib/test.rb rename to plugins/test.rb diff --git a/lib/user.rb b/plugins/user.rb similarity index 100% rename from lib/user.rb rename to plugins/user.rb