whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: RDoc comments for 'M' and 'O'
Date Sun, 18 Jun 2017 17:57:40 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new b6bce65  RDoc comments for 'M' and 'O'
b6bce65 is described below

commit b6bce6545c665551a1ead6c8cb8849bb7f3ff924
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sun Jun 18 13:57:26 2017 -0400

    RDoc comments for 'M' and 'O'
---
 lib/whimsy/asf/mail.rb     | 13 +++++++++++--
 lib/whimsy/asf/member.rb   | 16 ++++++++++++++++
 lib/whimsy/asf/orgchart.rb |  9 ++++++---
 3 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/lib/whimsy/asf/mail.rb b/lib/whimsy/asf/mail.rb
index 336d0d3..5ce77a3 100644
--- a/lib/whimsy/asf/mail.rb
+++ b/lib/whimsy/asf/mail.rb
@@ -3,6 +3,8 @@ require 'weakref'
 module ASF
 
   class Mail
+    # return a Hash containing complete list of all known emails, and the
+    # ASF::Person that is associated with that email.
     def self.list
       begin
         return Hash[@list.to_a] if @list
@@ -53,7 +55,11 @@ module ASF
       end
     end
 
-    def self.lists(public_private= false)
+    # get a list of all mailing lists.  If <tt>public_private</tt> is
+    # <tt>false</tt> this will be a simple list.  If <tt>public_private</tt>
is
+    # <tt>true</tt>, return a Hash where the values are either <tt>public</tt>
+    # or <tt>private</tt>.
+    def self.lists(public_private=false)
       Mail._load_lists
       public_private ? @lists : @lists.keys
     end
@@ -79,7 +85,10 @@ module ASF
       end
     end
 
-    # common configuration for sending mail
+    # common configuration for sending mail; loads <tt>:sendmail</tt>
+    # configuration from <tt>~/.whimsy</tt> if available; otherwise default
+    # to disable openssl verification as that is what it required in order
+    # to work on the infrastructure provided whimsy-vm.
     def self.configure
       # fetch overrides
       sendmail = ASF::Config.get(:sendmail)
diff --git a/lib/whimsy/asf/member.rb b/lib/whimsy/asf/member.rb
index 08c2ef7..50152e2 100644
--- a/lib/whimsy/asf/member.rb
+++ b/lib/whimsy/asf/member.rb
@@ -6,6 +6,7 @@ module ASF
     @@text = nil
     @@mtime = 0
 
+    # Return the members.txt value assocaited with a given id
     def self.find_text_by_id(value)
       new.each do |id, text|
         return text if id==value
@@ -13,10 +14,14 @@ module ASF
       nil
     end
 
+    # An iterator that returns a list of ids and associated members.txt entries.
     def self.each(&block)
       new.each(&block)
     end
 
+    # return a list of <tt>members.txt</tt> entries as a Hash.  Keys are
+    # availids.  Values are a Hash with the following keys:
+    # <tt>:text</tt>, <tt>:name</tt>, <tt>"status"</tt>.
     def self.list
       result = Hash[self.new.map {|id, text|
         # extract 1st line and remove any trailing /* comment */
@@ -31,6 +36,7 @@ module ASF
       result
     end
 
+    # Find the ASF::Person associated with a given email
     def self.find_by_email(value)
       value = value.downcase
       each do |id, text|
@@ -41,6 +47,10 @@ module ASF
       nil
     end
 
+    # Return a hash of non-active ASF members and their status.  Keys are
+    # availids.  Values are strings from the section header under which the
+    # member is listed: currently either <tt>Emeritus (Non-voting) Member</tt>
+    # or <tt>Deceased Member</tt>.
     def self.status
       begin
         @status = nil if @mtime != @@mtime
@@ -61,6 +71,7 @@ module ASF
       status
     end
 
+    # An iterator that returns a list of ids and associated members.txt entries.
     def each
       ASF::Member.text.to_s.split(/^ \*\) /).each do |section|
         id = section[/Avail ID: (.*)/,1]
@@ -69,16 +80,21 @@ module ASF
       nil
     end
 
+    # Determine if the person associated with a given id is an ASF member.
+    # Returns a boolean value.
     def self.find(id)
       each {|availid| return true if availid == id}
       return false
     end
 
+    # extract member emails from members.txt entry
     def self.emails(text)
       emails = text.to_s.scan(/Email: (.*(?:\n\s+\S+@.*)*)/).flatten.
         join(' ').split(/\s+/).grep(/@/)
     end
 
+    # Return the Last Changed Date for <tt>members.txt</tt> in svn as
+    # a <tt>Time</tt> object.
     def self.svn_change
       foundation = ASF::SVN['private/foundation']
       file = "#{foundation}/members.txt"
diff --git a/lib/whimsy/asf/orgchart.rb b/lib/whimsy/asf/orgchart.rb
index 31987ab..513bdf6 100644
--- a/lib/whimsy/asf/orgchart.rb
+++ b/lib/whimsy/asf/orgchart.rb
@@ -1,13 +1,16 @@
 ##
-# Part of the whimsy/ASF module of classes that provide simple access to ASF data.
+# Part of the whimsy/ASF module of classes that provide simple access to ASF
+# data.
 module ASF # :nodoc:
   
   ##
-  # Reads and provides access to the officers/personnel-duties/ROLENAME.yaml files.
+  # Reads and provides access to the
+  # <tt>officers/personnel-duties/ROLENAME.yaml</tt> files.
   class OrgChart
     @@duties = {}
     @@desc = {}
     
+    # parse any changed YAML role files.
     def self.load
       @@source ||= ASF::SVN['private/foundation/officers/personnel-duties']
       @@source.untaint
@@ -44,7 +47,7 @@ module ASF # :nodoc:
     end
     
     ##
-    # Access descriptions of the ['info'] section fields
+    # Access descriptions of the <tt>['info']</tt> section fields
     def self.desc
       self.load
       @@desc

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message