First round of modernizing after a long absence.
Much work to be done.
This commit is contained in:
parent
0c8f66ac29
commit
3f96c8bb0f
21 changed files with 556 additions and 2054 deletions
25
lib/ezmlm.rb
25
lib/ezmlm.rb
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/ruby
|
||||
# vim: set nosta noet ts=4 sw=4:
|
||||
#
|
||||
# A Ruby programmatic interface to the ezmlm-idx mailing list system
|
||||
#
|
||||
|
|
@ -6,13 +7,6 @@
|
|||
#
|
||||
# $Id$
|
||||
#
|
||||
# == Authors
|
||||
#
|
||||
# * Michael Granger <mgranger@laika.com>
|
||||
# * Jeremiah Jordan <jjordan@laika.com>
|
||||
#
|
||||
# :include: LICENSE
|
||||
#
|
||||
#---
|
||||
#
|
||||
# Please see the file LICENSE in the base directory for licensing details.
|
||||
|
|
@ -24,19 +18,10 @@ require 'pathname'
|
|||
### Toplevel namespace module
|
||||
module Ezmlm
|
||||
|
||||
# SVN Revision
|
||||
SVNRev = %q$Rev$
|
||||
|
||||
# SVN Id
|
||||
SVNId = %q$Id$
|
||||
|
||||
# Package version
|
||||
VERSION = '0.0.1'
|
||||
|
||||
VERSION = '0.1.0'
|
||||
|
||||
require 'ezmlm/list'
|
||||
require 'ezmlm/listdaemon'
|
||||
|
||||
|
||||
###############
|
||||
module_function
|
||||
|
|
@ -44,23 +29,23 @@ module Ezmlm
|
|||
|
||||
### Find all directories that look like an Ezmlm list directory under the specified +listsdir+
|
||||
### and return Pathname objects for each.
|
||||
###
|
||||
def find_directories( listsdir )
|
||||
listsdir = Pathname.new( listsdir )
|
||||
return Pathname.glob( listsdir + '*' ).select do |entry|
|
||||
entry.directory? && ( entry + 'mailinglist' ).exist?
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
### Iterate over each directory that looks like an Ezmlm list in the specified +listsdir+ and
|
||||
### yield it as an Ezmlm::List object.
|
||||
###
|
||||
def each_list( listsdir )
|
||||
find_directories( listsdir ).each do |entry|
|
||||
yield( Ezmlm::List.new(entry) )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end # module Ezmlm
|
||||
|
||||
# vim: set nosta noet ts=4 sw=4:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue