[whimsy] branch master updated: Sort fingerprints because the order seems to vary between fetches

2016-12-21 Thread sebb
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
   new  3869a12   Sort fingerprints because the order seems to vary between 
fetches
3869a12 is described below

commit 3869a12078277ec882ce2a7864d5b38cef1ff139
Author: Sebb 
AuthorDate: Wed Dec 21 23:16:09 2016 +

Sort fingerprints because the order seems to vary between fetches
---
 www/roster/public_ldap_people.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/roster/public_ldap_people.rb b/www/roster/public_ldap_people.rb
index 487b506..55a1433 100644
--- a/www/roster/public_ldap_people.rb
+++ b/www/roster/public_ldap_people.rb
@@ -39,7 +39,8 @@ def makeEntry(hash, e)
 end
 # only add entry if there is a fingerprint
 if not e.pgp_key_fingerprints.empty?
-  hash[e.id][:key_fingerprints] = e.pgp_key_fingerprints
+  # need to sort to avoid random changes which seem to occur for 
fingerprints
+  hash[e.id][:key_fingerprints] = e.pgp_key_fingerprints.sort
 end
   end
 end

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


[whimsy] branch master updated: WHIMSY-71 Extract key fingerprints

2016-12-21 Thread sebb
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
   new  1e1bee2   WHIMSY-71 Extract key fingerprints
1e1bee2 is described below

commit 1e1bee21b3d8a27bb1b8e59f24615de58ae09d7e
Author: Sebb 
AuthorDate: Wed Dec 21 15:15:20 2016 +

WHIMSY-71 Extract key fingerprints
---
 www/roster/public_ldap_people.rb | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/www/roster/public_ldap_people.rb b/www/roster/public_ldap_people.rb
index ca798f8..487b506 100644
--- a/www/roster/public_ldap_people.rb
+++ b/www/roster/public_ldap_people.rb
@@ -5,6 +5,9 @@
 # "uid": {
 #   "name": "Public Name",
 #   "noLogin": true // present only if the login is not valid
+#   "key_fingerprints": [ // if any are provided
+#   "abcd    ", ...
+#   ]
 # }
 # ...
 # }
@@ -15,7 +18,7 @@ require_relative 'public_json_common'
 # ASF people
 peo = {}
 
-peeps = ASF::Person.preload(['cn', 'loginShell', 'asf-personalURL', 
'createTimestamp', 'modifyTimestamp']) # for performance
+peeps = ASF::Person.preload(['cn', 'loginShell', 'asf-personalURL', 
'createTimestamp', 'modifyTimestamp', 'asf-pgpKeyFingerprint']) # for 
performance
 
 if peeps.empty?
   Wunderbar.error "No results retrieved, output not created"
@@ -34,6 +37,10 @@ def makeEntry(hash, e)
 if not e.urls.empty?
   hash[e.id][:urls] = e.urls
 end
+# only add entry if there is a fingerprint
+if not e.pgp_key_fingerprints.empty?
+  hash[e.id][:key_fingerprints] = e.pgp_key_fingerprints
+end
   end
 end
 

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


[whimsy] branch master updated: Typo

2016-12-21 Thread sebb
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
   new  2d9207e   Typo
2d9207e is described below

commit 2d9207ee10bfb1e891a0978e5526037d083ea503
Author: Sebb 
AuthorDate: Wed Dec 21 14:13:51 2016 +

Typo
---
 lib/whimsy/asf/icla.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/whimsy/asf/icla.rb b/lib/whimsy/asf/icla.rb
index 453e05f..cdd3c1c 100644
--- a/lib/whimsy/asf/icla.rb
+++ b/lib/whimsy/asf/icla.rb
@@ -95,7 +95,7 @@ module ASF
   return @@availids if @@availids
   availids = []
   each {|icla| availids << icla.id unless icla.id == 'notinavail'}
-  @availids = availids
+  @@availids = availids
 end
 
 # iterate over all of the ICLAs

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


[whimsy] branch master updated: Display correct scope instead of always using 'one'

2016-12-21 Thread sebb
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
   new  5221645   Display correct scope instead of always using 'one'
5221645 is described below

commit 5221645e922755a83f2a69c11094ec55cbb98c6e
Author: Sebb 
AuthorDate: Wed Dec 21 12:30:12 2016 +

Display correct scope instead of always using 'one'
---
 lib/whimsy/asf/ldap.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 9b1bbdc..41bb1a5 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -294,7 +294,9 @@ module ASF
   # search with a specified scope, with automatic retry/failover
   def self.search_scope(scope, base, filter, attrs=nil)
 
-cmd = "ldapsearch -x -LLL -b #{base} -s one #{filter} " +
+# Dummy command, used for logging purposes only
+sname = %w(base one sub children)[scope] rescue scope
+cmd = "ldapsearch -x -LLL -b #{base} -s #{sname} #{filter} " +
   "#{[attrs].flatten.join(' ')}"
 
 # try once per host, with a minimum of two tries

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