You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/09/13 00:53:49 UTC

[whimsy] branch master updated (31d5eb6 -> 6b02789)

This is an automated email from the ASF dual-hosted git repository.

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

      from  31d5eb6   add reply info
       new  023f4b1   Pin sinatra until apps pass mustermann checks
       new  6b02789   make array accessors return nil if not found

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 lib/whimsy/asf/ldap.rb        | 18 ++++++++++++++++++
 lib/whimsy/asf/mail.rb        |  4 +++-
 lib/whimsy/asf/member.rb      |  2 +-
 www/board/agenda/Gemfile      |  2 +-
 www/members/subscriptions.cgi |  2 +-
 www/roster/Gemfile            |  2 +-
 www/secmail/Gemfile           |  2 +-
 7 files changed, 26 insertions(+), 6 deletions(-)

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

[whimsy] 01/02: Pin sinatra until apps pass mustermann checks

Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 023f4b1d437df31c4d26cc8697fb331ac254f1dd
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon Sep 12 20:49:24 2016 -0400

    Pin sinatra until apps pass mustermann checks
---
 www/board/agenda/Gemfile | 2 +-
 www/roster/Gemfile       | 2 +-
 www/secmail/Gemfile      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/board/agenda/Gemfile b/www/board/agenda/Gemfile
index 06c4349..811d77a 100644
--- a/www/board/agenda/Gemfile
+++ b/www/board/agenda/Gemfile
@@ -14,7 +14,7 @@ end
 gem 'rake'
 gem 'wunderbar', '>= 1.0.16'
 gem 'ruby2js', '>= 2.0.13'
-gem 'sinatra'
+gem 'sinatra', '~> 1.4'
 gem 'nokogumbo'
 gem 'execjs', ('<2.5.1' if RUBY_VERSION =~ /^1/)
 gem 'listen', ('~> 3.0.7' if RUBY_VERSION =~ /^2\.[01]/)
diff --git a/www/roster/Gemfile b/www/roster/Gemfile
index 4640527..fc8614a 100644
--- a/www/roster/Gemfile
+++ b/www/roster/Gemfile
@@ -15,7 +15,7 @@ end
 gem 'rake'
 gem 'wunderbar', '>= 1.0.0'
 gem 'ruby2js', '>= 2.0.0'
-gem 'sinatra'
+gem 'sinatra', '~> 1.4'
 gem 'nokogumbo'
 gem 'execjs'
 gem 'mail'
diff --git a/www/secmail/Gemfile b/www/secmail/Gemfile
index 1246f8a..57e3fd6 100644
--- a/www/secmail/Gemfile
+++ b/www/secmail/Gemfile
@@ -4,7 +4,7 @@ gem 'mail'
 gem 'rake'
 gem 'zip'
 gem 'whimsy-asf', '~> 0.0.73'
-gem 'sinatra'
+gem 'sinatra', '~> 1.4'
 gem 'sanitize'
 gem 'wunderbar', '~> 1.0.26'
 gem 'ruby2js', '~> 2.0.12'

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

[whimsy] 02/02: make array accessors return nil if not found

Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6b02789fca97d5274a2fab0ebdc495640e2c92f9
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon Sep 12 20:52:37 2016 -0400

    make array accessors return nil if not found
---
 lib/whimsy/asf/ldap.rb        | 18 ++++++++++++++++++
 lib/whimsy/asf/mail.rb        |  4 +++-
 lib/whimsy/asf/member.rb      |  2 +-
 www/members/subscriptions.cgi |  2 +-
 4 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index dc2ed00..9b1bbdc 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -485,6 +485,12 @@ module ASF
       list.values
     end
 
+    # return person only if it actually exits
+    def self.[] name
+      person = super
+      person.attrs['dn'] ? nil : person
+    end
+
     def attrs
       @attrs ||= LazyHash.new {ASF.search_one(base, "uid=#{name}").first}
     end
@@ -621,6 +627,12 @@ module ASF
 
     attr_accessor :modifyTimestamp, :createTimestamp
 
+    # return group only if it actually exits
+    def self.[] name
+      group = super
+      group.members.empty? ? nil : group
+    end
+
     def members=(members)
       @members = WeakRef.new(members)
     end
@@ -700,6 +712,12 @@ module ASF
 
     attr_accessor :modifyTimestamp, :createTimestamp
 
+    # return committee only if it actually exits
+    def self.[] name
+      committee = super
+      committee.members.empty? ? nil : committee
+    end
+
     def members=(members)
       @members = WeakRef.new(members)
     end
diff --git a/lib/whimsy/asf/mail.rb b/lib/whimsy/asf/mail.rb
index c7629c7..cf8f156 100644
--- a/lib/whimsy/asf/mail.rb
+++ b/lib/whimsy/asf/mail.rb
@@ -21,7 +21,9 @@ module ASF
 
       # load all member emails in one pass
       ASF::Member.each do |id, text|
-        Member.emails(text).each {|mail| list[mail.downcase] ||= Person[id]}
+        Member.emails(text).each do |mail| 
+          list[mail.downcase] ||= Person.find(id)
+        end
       end
 
       # load all ICLA emails in one pass
diff --git a/lib/whimsy/asf/member.rb b/lib/whimsy/asf/member.rb
index 21bdd9f..08c2ef7 100644
--- a/lib/whimsy/asf/member.rb
+++ b/lib/whimsy/asf/member.rb
@@ -35,7 +35,7 @@ module ASF
       value = value.downcase
       each do |id, text|
         emails(text).each do |email|
-          return Person[id] if email.downcase == value
+          return Person.find(id) if email.downcase == value
         end
       end
       nil
diff --git a/www/members/subscriptions.cgi b/www/members/subscriptions.cgi
index 4fa869d..8477bc5 100755
--- a/www/members/subscriptions.cgi
+++ b/www/members/subscriptions.cgi
@@ -55,7 +55,7 @@ _html do
 
     ldap = ASF::Group['member'].members
 
-    members = ASF::Member.new.map {|id, text| ASF::Person[id]}
+    members = ASF::Member.new.map {|id, text| ASF::Person.find(id)}
     ASF::Person.preload('cn', members)
     maillist = ASF::Mail.list
 

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