]> gitweb.michael.orlitzky.com - mailshears.git/commitdiff
Restructure the lib directory to avoid name collisions.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 9 Apr 2012 00:50:11 +0000 (20:50 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 9 Apr 2012 00:50:11 +0000 (20:50 -0400)
bin/mailshears
lib/mailshears.rb [new file with mode: 0644]
lib/mailshears/errors.rb [moved from lib/errors.rb with 100% similarity]
lib/mailshears/exit_codes.rb [moved from lib/exit_codes.rb with 100% similarity]
lib/mailshears/filesystem.rb [moved from lib/filesystem.rb with 100% similarity]
lib/mailshears/mailstore.rb [moved from lib/mailstore.rb with 100% similarity]
lib/mailshears/plugin.rb [moved from lib/plugin.rb with 100% similarity]
lib/mailshears/plugins/dovecot_mailstore.rb [moved from lib/plugins/dovecot_mailstore.rb with 95% similarity]
lib/mailshears/plugins/roundcube_db.rb [moved from lib/plugins/roundcube_db.rb with 100% similarity]
lib/mailshears/postfixadmin_db.rb [moved from lib/postfixadmin_db.rb with 100% similarity]

index 5a8ee0a6752064292274d585e16dc38c4bb39d51..96a3c303777269d9a1a32c8110f6821478fbae15 100755 (executable)
 # filesystem, but not the database.
 #
 
-# Needed for rm_rf.
-require 'fileutils'
+require 'mailshears'
 
 # Load our config file.
 require 'configuration'
 
-# And the necessary classes.
-require 'errors.rb'
-require 'exit_codes.rb'
-require 'postfixadmin_db'
-
-Configuration::PLUGINS.each do |plugin_file|
-  require "plugins/#{plugin_file}"
-end
-
 pgadb = PostfixadminDb.new(Configuration::DBHOST,
                            Configuration::DBPORT,
                            Configuration::DBOPTS,
diff --git a/lib/mailshears.rb b/lib/mailshears.rb
new file mode 100644 (file)
index 0000000..75e38f0
--- /dev/null
@@ -0,0 +1,11 @@
+# Load the rest of the code we'll use.
+
+# And the necessary classes.
+require 'mailshears/errors.rb'
+require 'mailshears/exit_codes.rb'
+require 'mailshears/postfixadmin_db'
+
+Configuration::PLUGINS.each do |plugin_file|
+  require "mailshears/plugins/#{plugin_file}"
+end
+
similarity index 100%
rename from lib/errors.rb
rename to lib/mailshears/errors.rb
similarity index 100%
rename from lib/mailstore.rb
rename to lib/mailshears/mailstore.rb
similarity index 100%
rename from lib/plugin.rb
rename to lib/mailshears/plugin.rb
similarity index 95%
rename from lib/plugins/dovecot_mailstore.rb
rename to lib/mailshears/plugins/dovecot_mailstore.rb
index df541b835c4c876b86521dfdc48e7cacc6bc2a8c..c50b1173050fc81ac100ae4954eafe578fa08e21 100644 (file)
@@ -1,7 +1,10 @@
-require 'errors'
-require 'filesystem'
-require 'mailstore'
-require 'plugin'
+# Needed for rm_rf.
+require 'fileutils'
+
+require 'mailshears/errors'
+require 'mailshears/filesystem'
+require 'mailshears/mailstore'
+require 'mailshears/plugin'
 
 class DovecotMailstore < Mailstore