You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2021/07/08 10:09:54 UTC
[whimsy] branch master updated: Simpler initialisation
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 b5d1d7b Simpler initialisation
b5d1d7b is described below
commit b5d1d7b50ce6961c49845ef678b7702d63c68fe5
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jul 8 11:09:46 2021 +0100
Simpler initialisation
---
lib/whimsy/asf/ldap.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index fc2f536..5e1bd21 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -923,7 +923,7 @@ module ASF
map{|i| u=i['uidNumber'];g=i['gidNumber']; u == g ? u : [u,g]}.flatten.map(&:to_i).
select{|i| i >= MINIMUM_USER_UID}.uniq.sort.lazy
enum = Enumerator.new do |output|
- last = numbers.next rescue MINIMUM_USER_UID # in case no valid entries exist
+ last = MINIMUM_USER_UID - 1 # in case no valid entries exist
loop do
curr = numbers.next
if curr <= last + 1
@@ -1502,6 +1502,7 @@ end
if __FILE__ == $0
$LOAD_PATH.unshift '/srv/whimsy/lib'
require 'whimsy/asf/config'
+ p ASF::Person.next_uidNumber
mem = ASF.members()
puts mem.length
puts mem.first.inspect