Fixes for documentation and test directories that didn't make it into the repo.
This commit is contained in:
parent
28948e513f
commit
c9450e8415
20 changed files with 36 additions and 80 deletions
9
Rakefile
9
Rakefile
|
|
@ -23,6 +23,7 @@ $version = ( LIBDIR + "#{PROJECT}.rb" ).read.split(/\n/).
|
|||
select{|line| line =~ /VERSION =/}.first.match(/([\d|.]+)/)[1]
|
||||
|
||||
task :default => [ :spec, :docs, :package ]
|
||||
task :spec => [ :compile ]
|
||||
|
||||
|
||||
########################################################################
|
||||
|
|
@ -34,11 +35,7 @@ require 'rubygems/package_task'
|
|||
spec = Gem::Specification.new do |s|
|
||||
s.email = 'mahlon@martini.nu'
|
||||
s.homepage = 'https://bitbucket.org/mahlon/Ruby-Ezmlm'
|
||||
s.authors = [
|
||||
'Mahlon E. Smith <mahlon@martini.nu>',
|
||||
'Michael Granger <ged@faeriemud.org>',
|
||||
'Jeremiah Jordan <jeremiah.m.jordan@gmail.com>'
|
||||
]
|
||||
s.authors = [ 'Mahlon E. Smith', 'Michael Granger', 'Jeremiah Jordan' ]
|
||||
s.platform = Gem::Platform::RUBY
|
||||
s.summary = "Interact with Ezmlm-IDX mailing lists."
|
||||
s.name = PROJECT
|
||||
|
|
@ -84,7 +81,7 @@ begin
|
|||
rdoc.rdoc_dir = 'docs'
|
||||
rdoc.main = "README.rdoc"
|
||||
# rdoc.options = [ '-f', 'fivefish' ]
|
||||
rdoc.rdoc_files = [ 'lib', *FileList['ext/*/*.c'], *FileList['*.rdoc'] ]
|
||||
rdoc.rdoc_files = [ 'lib', *FileList['ext/**.c'], *FileList['*.rdoc'], *FileList['*.md'] ]
|
||||
end
|
||||
|
||||
RDoc::Task.new do |rdoc|
|
||||
|
|
|
|||
18
USAGE.md
18
USAGE.md
|
|
@ -10,14 +10,14 @@ Examples
|
|||
--------
|
||||
|
||||
|
||||
*Print the list address for all lists in a directory*:
|
||||
### Print the list address for all lists in a directory:
|
||||
|
||||
Ezmlm.each_list( '/lists' ) do |list|
|
||||
puts list.address
|
||||
end
|
||||
|
||||
|
||||
*Check if I'm subscribed to a list, and if so, unsubscribe*:
|
||||
### Check if I'm subscribed to a list, and if so, unsubscribe:
|
||||
|
||||
(You don't really have to check first, subscribe and unsubscribe are
|
||||
idempotent.)
|
||||
|
|
@ -31,14 +31,14 @@ idempotent.)
|
|||
puts "The list now has %d subscribers!" % [ list.subscribers.size ]
|
||||
|
||||
|
||||
*Iterate over the subscriber list*:
|
||||
### Iterate over the subscriber list:
|
||||
|
||||
list.subscribers.each do |subscriber|
|
||||
# ...
|
||||
end
|
||||
|
||||
|
||||
*Make the list moderated, and add a moderator*:
|
||||
### Make the list moderated, and add a moderator:
|
||||
|
||||
list.moderated = true
|
||||
list.add_moderator( 'mahlon@martini.nu' )
|
||||
|
|
@ -48,7 +48,7 @@ All other list behavior tunables operate in a similar fashion, see RDoc
|
|||
for details.
|
||||
|
||||
|
||||
*Archiving!*
|
||||
### Archiving!
|
||||
|
||||
All of the archival pieces take advantage of Ezmlm-IDX extensions.
|
||||
If you want to use these features, you'll want to enable archiving
|
||||
|
|
@ -67,12 +67,12 @@ rebuild the necessary files - afterwards, they are kept up to date
|
|||
automatically.
|
||||
|
||||
|
||||
*How many messages are in the archive?*:
|
||||
### How many messages are in the archive?:
|
||||
|
||||
list.message_count #=> 123
|
||||
|
||||
|
||||
*Fetch message number 100 from the archive*:
|
||||
### Fetch message number 100 from the archive:
|
||||
|
||||
message = list.message( 100 ) or abort "No such message."
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ Mikel Lindsaar (https://github.com/mikel/mail). See its documentation
|
|||
for specifics.
|
||||
|
||||
|
||||
*Iterate over messages in a specific thread*:
|
||||
### Iterate over messages in a specific thread:
|
||||
|
||||
Messages know what thread they belong to. Once you have a thread object
|
||||
from a message, it is an enumerable. Iterate or sort on it using
|
||||
|
|
@ -110,7 +110,7 @@ Threads are also aware of who participated in the conversation, via the
|
|||
'authors' and 'each_author' methods.
|
||||
|
||||
|
||||
*Iterate over messages from a specific author:*
|
||||
### Iterate over messages from a specific author:
|
||||
|
||||
Messages know who authored them. Once you have an author object from a
|
||||
message, it is an enumerable. Iterate or sort on it using standard Ruby
|
||||
|
|
|
|||
18
lib/ezmlm.rb
18
lib/ezmlm.rb
|
|
@ -1,5 +1,6 @@
|
|||
# vim: set nosta noet ts=4 sw=4:
|
||||
|
||||
require 'pathname'
|
||||
|
||||
# A Ruby interface to the ezmlm-idx mailing list system.
|
||||
#
|
||||
|
|
@ -9,24 +10,11 @@
|
|||
# puts "\"%s\" <%s>" % [ list.name, list.address ]
|
||||
# end
|
||||
#
|
||||
#
|
||||
# == Version
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#---
|
||||
#
|
||||
# Please see the file LICENSE in the base directory for licensing details.
|
||||
#
|
||||
|
||||
require 'pathname'
|
||||
|
||||
|
||||
### Toplevel namespace module
|
||||
module Ezmlm
|
||||
# $Id$
|
||||
|
||||
# Package version
|
||||
VERSION = '1.0.0'
|
||||
VERSION = '1.0.1'
|
||||
|
||||
# Suck in the components.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -2,26 +2,19 @@
|
|||
# vim: set nosta noet ts=4 sw=4:
|
||||
|
||||
|
||||
# A Ruby interface to a single Ezmlm-idx mailing list directory.
|
||||
#
|
||||
# list = Ezmlm::List.new( '/path/to/listdir' )
|
||||
#
|
||||
#
|
||||
# == Version
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#---
|
||||
|
||||
require 'pathname'
|
||||
require 'time'
|
||||
require 'etc'
|
||||
require 'ezmlm' unless defined?( Ezmlm )
|
||||
|
||||
|
||||
### A Ruby interface to an ezmlm-idx mailing list directory
|
||||
###
|
||||
# A Ruby interface to a single Ezmlm-idx mailing list directory.
|
||||
#
|
||||
# list = Ezmlm::List.new( '/path/to/listdir' )
|
||||
#
|
||||
#---
|
||||
class Ezmlm::List
|
||||
# $Id$
|
||||
|
||||
# Valid subdirectories/sections for subscriptions.
|
||||
SUBSCRIPTION_DIRS = %w[ deny mod digest allow ]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#!/usr/bin/ruby
|
||||
# vim: set nosta noet ts=4 sw=4:
|
||||
|
||||
require 'pathname'
|
||||
require 'ezmlm' unless defined?( Ezmlm )
|
||||
|
||||
|
||||
# A collection of messages authored from a unique user.
|
||||
#
|
||||
|
|
@ -11,20 +14,9 @@
|
|||
# author.name #=> "Help - navigate on interface?"
|
||||
# author.first.date.to_s #=> "2017-05-07T14:55:05-07:00"
|
||||
#
|
||||
#
|
||||
# == Version
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#---
|
||||
|
||||
require 'pathname'
|
||||
require 'ezmlm' unless defined?( Ezmlm )
|
||||
|
||||
|
||||
### A collection of messages for a specific author.
|
||||
###
|
||||
class Ezmlm::List::Author
|
||||
# $Id$
|
||||
include Enumerable
|
||||
|
||||
### Instantiate a new list of messages given
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#!/usr/bin/ruby
|
||||
# vim: set nosta noet ts=4 sw=4:
|
||||
|
||||
require 'pathname'
|
||||
require 'ezmlm' unless defined?( Ezmlm )
|
||||
require 'mail'
|
||||
|
||||
# An individual list message.
|
||||
#
|
||||
|
|
@ -12,20 +15,9 @@
|
|||
# This class passes all heavy lifting to the Mail::Message library.
|
||||
# Please see it for specifics on usage.
|
||||
#
|
||||
# == Version
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#---
|
||||
|
||||
require 'pathname'
|
||||
require 'ezmlm' unless defined?( Ezmlm )
|
||||
require 'mail'
|
||||
|
||||
|
||||
### A Ruby interface to an individual list message.
|
||||
###
|
||||
class Ezmlm::List::Message
|
||||
# $Id$
|
||||
|
||||
### Instantiate a new messag from a +list+ and a +message_number+.
|
||||
###
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#!/usr/bin/ruby
|
||||
# vim: set nosta noet ts=4 sw=4:
|
||||
|
||||
require 'pathname'
|
||||
require 'ezmlm' unless defined?( Ezmlm )
|
||||
|
||||
|
||||
# A collection of messages for a specific archive thread.
|
||||
#
|
||||
|
|
@ -8,20 +11,9 @@
|
|||
# thread.subject #=> "Help - navigate on interface?"
|
||||
# thread.first.date.to_s #=> "2017-05-07T14:55:05-07:00"
|
||||
#
|
||||
#
|
||||
# == Version
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#---
|
||||
|
||||
require 'pathname'
|
||||
require 'ezmlm' unless defined?( Ezmlm )
|
||||
|
||||
|
||||
### A collection of messages for a specific archive thread.
|
||||
###
|
||||
class Ezmlm::List::Thread
|
||||
# $Id$
|
||||
include Enumerable
|
||||
|
||||
### Instantiate a new thread of messages given
|
||||
|
|
|
|||
0
spec/data/testlist/allow/subscribers/.placeholder
Normal file
0
spec/data/testlist/allow/subscribers/.placeholder
Normal file
0
spec/data/testlist/bounce/.placeholder
Normal file
0
spec/data/testlist/bounce/.placeholder
Normal file
0
spec/data/testlist/deny/subscribers/.placeholder
Normal file
0
spec/data/testlist/deny/subscribers/.placeholder
Normal file
0
spec/data/testlist/digest/bounce/.placeholder
Normal file
0
spec/data/testlist/digest/bounce/.placeholder
Normal file
0
spec/data/testlist/digest/subscribers/.placeholder
Normal file
0
spec/data/testlist/digest/subscribers/.placeholder
Normal file
0
spec/data/testlist/mod/accepted/.placeholder
Normal file
0
spec/data/testlist/mod/accepted/.placeholder
Normal file
0
spec/data/testlist/mod/pending/.placeholder
Normal file
0
spec/data/testlist/mod/pending/.placeholder
Normal file
0
spec/data/testlist/mod/rejected/.placeholder
Normal file
0
spec/data/testlist/mod/rejected/.placeholder
Normal file
0
spec/data/testlist/mod/subscribers/.placeholder
Normal file
0
spec/data/testlist/mod/subscribers/.placeholder
Normal file
0
spec/data/testlist/mod/unconfirmed/.placeholder
Normal file
0
spec/data/testlist/mod/unconfirmed/.placeholder
Normal file
0
spec/data/testlist/subscribers/.placeholder
Normal file
0
spec/data/testlist/subscribers/.placeholder
Normal file
0
spec/data/testlist/text/.placeholder
Normal file
0
spec/data/testlist/text/.placeholder
Normal file
|
|
@ -3,6 +3,7 @@
|
|||
require 'simplecov' if ENV['COVERAGE']
|
||||
require 'rspec'
|
||||
require 'fileutils'
|
||||
require 'tmpdir'
|
||||
|
||||
require_relative '../lib/ezmlm'
|
||||
|
||||
|
|
@ -30,7 +31,8 @@ module SpecHelpers
|
|||
### Create a copy of a fresh listdir into /tmp.
|
||||
###
|
||||
def make_listdir
|
||||
dirname = "/tmp/%s.%d.%0.4f" % [
|
||||
dirname = "%s/%s.%d.%0.4f" % [
|
||||
Dir.tmpdir,
|
||||
'ezmlm_list',
|
||||
Process.pid,
|
||||
(Time.now.to_f % 3600),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue