This is an automated email from the ASF dual-hosted git repository.
sebb 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 8daee11 Committees.preload no longer used
8daee11 is described below
commit 8daee1199c676dc2e24eede18def6147d608aff8
Author: Sebb <[email protected]>
AuthorDate: Wed Feb 13 20:17:35 2019 +0000
Committees.preload no longer used
---
lib/whimsy/asf/ldap.rb | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index f4e61ad..49054bb 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -1238,24 +1238,9 @@ module ASF
class Committee < Base
# TODO what to do about this? Change to ou=project or drop?
- # It's used by the methods: self.preload, member[id]s
+ # It's used by the methods: member[id]s
@base = 'ou=pmc,ou=committees,ou=groups,dc=apache,dc=org'
- # fetch <tt>dn</tt>, <tt>member</tt>, <tt>modifyTimestamp</tt>, and
- # <tt>createTimestamp</tt> for all committees in LDAP.
- # TODO - delete? Not sure it's used anymore
- def self.preload
- Hash[ASF.search_one(base, "cn=*", %w(dn member modifyTimestamp
createTimestamp)).map do |results|
- cn = results['dn'].first[/^cn=(.*?),/, 1]
- committee = ASF::Committee.find(cn)
- committee.modifyTimestamp = results['modifyTimestamp'].first # it is
returned as an array of 1 entry
- committee.createTimestamp = results['createTimestamp'].first # it is
returned as an array of 1 entry
- members = results['member'] || []
- committee.members = members
- [committee, members]
- end]
- end
-
# Date this committee was last modified in LDAP.
attr_accessor :modifyTimestamp
@@ -1269,12 +1254,6 @@ module ASF
(ASF::Committee.pmcs+ASF::Committee.nonpmcs).map(&:name).include?(name)
? committee : nil
end
- # setter for members attribute, should only be used by
- # ASF::Committee.preload
- def members=(members)
- @members = WeakRef.new(members)
- end
-
# DEPRECATED. List of members for this committee. Use owners as it
# is less ambiguous.
def members