whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Bazley <s...@apache.org>
Subject [whimsy.git] [1/1] Commit 5d55ba2: Add modifyTimestamp to Committee as well
Date Sat, 23 Jan 2016 17:47:04 GMT
Commit 5d55ba20a1f07d4dba27a58ab97fa8c59bede304:
    Add modifyTimestamp to Committee as well


Branch: refs/heads/master
Author: Sebb <sebb@apache.org>
Committer: Sebb <sebb@apache.org>
Pusher: sebb <sebb@apache.org>

------------------------------------------------------------
lib/whimsy/asf/ldap.rb                                       | ++++++++++ -
------------------------------------------------------------
11 changes: 10 additions, 1 deletions.
------------------------------------------------------------


diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 62acec2..f865d04 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -395,15 +395,24 @@ def self.list(filter='cn=*')
     end
 
     def self.preload
-      Hash[ASF.search_one(base, "cn=*", %w(dn member)).map do |results|
+      Hash[ASF.search_one(base, "cn=*", %w(dn member modifyTimestamp)).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
         members = results['member']
         committee.members = members
         [committee, members]
       end]
     end
 
+    def modifyTimestamp=(ts)
+      @modifyTimestamp = ts
+    end
+
+    def modifyTimestamp
+      @modifyTimestamp
+    end
+
     def members=(members)
       @members = WeakRef.new(members)
     end

Mime
View raw message