whimsy-asf 0.0.73 → 0.0.74
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/asf.version +1 -1
- data/lib/whimsy/asf/committee.rb +10 -5
- data/lib/whimsy/asf/ldap.rb +6 -2
- data/lib/whimsy/asf/mail.rb +2 -2
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a3cda4938653e84801388a33933a5ff5753ccd8
|
4
|
+
data.tar.gz: cbd46d98523e091ae41001899b2b88c086a8bc73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e098ec455420ce5293b5457c9056c63ceb44f3187a0242f9d5e0798cd314b1ea8f4ea734f042359ec442e9e4e49578ff4bb948e29742b349db8c99a4e3d52620
|
7
|
+
data.tar.gz: fd7b79fddc1883e8a57248496867ecef4ddd7aaf918d927796df7cacd4c6a9f049906547d74e62420ac749ef90733f5e215248693b5a78673ee4309a1dd662b0
|
data/asf.version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.74
|
data/lib/whimsy/asf/committee.rb
CHANGED
@@ -48,9 +48,13 @@ module ASF
|
|
48
48
|
board = ASF::SVN['private/committers/board']
|
49
49
|
file = "#{board}/committee-info.txt"
|
50
50
|
return unless File.exist? file
|
51
|
+
|
52
|
+
list = Hash.new {|hash, name| hash[name] = find(name)}
|
53
|
+
|
51
54
|
if @committee_info and File.mtime(file) == @committee_mtime
|
52
55
|
return @committee_info
|
53
56
|
end
|
57
|
+
|
54
58
|
@committee_mtime = File.mtime(file)
|
55
59
|
@@svn_change = Time.parse(
|
56
60
|
`svn info #{file}`[/Last Changed Date: (.*) \(/, 1]).gmtime
|
@@ -62,15 +66,16 @@ module ASF
|
|
62
66
|
# extract the committee chairs (e-mail address is required here)
|
63
67
|
head.scan(/^[ \t]+(\w.*?)[ \t][ \t]+(.*)[ \t]+<(.*?)@apache\.org>/).
|
64
68
|
each do |committee, name, id|
|
65
|
-
|
69
|
+
list[committee].chairs << {name: name, id: id}
|
66
70
|
end
|
71
|
+
|
67
72
|
# Extract the non-PMC committees (e-mail address may be absent)
|
68
73
|
@nonpmcs = head.sub(/.*?also has/m,'').
|
69
74
|
scan(/^[ \t]+(\w.*?)(?:[ \t][ \t]|[ \t]?$)/).flatten.uniq.
|
70
|
-
map {|name|
|
75
|
+
map {|name| list[name]}
|
71
76
|
|
72
77
|
info.each do |roster|
|
73
|
-
committee =
|
78
|
+
committee = list[@@namemap.call(roster[/(\w.*?)\s+\(/,1])]
|
74
79
|
committee.established = roster[/\(est\. (.*?)\)/, 1]
|
75
80
|
roster.gsub! /^.*\(\s*emeritus\s*\).*/i do |line|
|
76
81
|
committee.emeritus += line.scan(/<(.*?)@apache\.org>/).flatten
|
@@ -85,7 +90,7 @@ module ASF
|
|
85
90
|
report.scan(/^([^\n]+)\n---+\n(.*?)\n\n/m).each do |period, committees|
|
86
91
|
committees.scan(/^ \s*(.*)/).each do |committee|
|
87
92
|
committee, comment = committee.first.split(/\s+#\s+/,2)
|
88
|
-
committee =
|
93
|
+
committee = list[committee]
|
89
94
|
if comment
|
90
95
|
committee.report = "#{period}: #{comment}"
|
91
96
|
elsif period == 'Next month'
|
@@ -96,7 +101,7 @@ module ASF
|
|
96
101
|
end
|
97
102
|
end
|
98
103
|
|
99
|
-
@committee_info =
|
104
|
+
@committee_info = list.values
|
100
105
|
end
|
101
106
|
|
102
107
|
def self.nonpmcs
|
data/lib/whimsy/asf/ldap.rb
CHANGED
@@ -172,6 +172,8 @@ module ASF
|
|
172
172
|
|
173
173
|
# pre-fetch a given attribute, for a given list of people
|
174
174
|
def self.preload(attributes, people={})
|
175
|
+
list = Hash.new {|hash, name| hash[name] = find(name)}
|
176
|
+
|
175
177
|
attributes = [attributes].flatten
|
176
178
|
|
177
179
|
if people.empty?
|
@@ -183,14 +185,16 @@ module ASF
|
|
183
185
|
zero = Hash[attributes.map {|attribute| [attribute,nil]}]
|
184
186
|
|
185
187
|
data = ASF.search_one(base, filter, attributes + ['uid'])
|
186
|
-
data = Hash[data.map! {|hash| [
|
188
|
+
data = Hash[data.map! {|hash| [list[hash['uid'].first], hash]}]
|
187
189
|
data.each {|person, hash| person.attrs.merge!(zero.merge(hash))}
|
188
190
|
|
189
191
|
if people.empty?
|
190
|
-
(
|
192
|
+
(list.values - data.keys).each do |person|
|
191
193
|
person.attrs.merge! zero
|
192
194
|
end
|
193
195
|
end
|
196
|
+
|
197
|
+
list.values
|
194
198
|
end
|
195
199
|
|
196
200
|
def attrs
|
data/lib/whimsy/asf/mail.rb
CHANGED
@@ -8,8 +8,8 @@ module ASF
|
|
8
8
|
list = Hash.new
|
9
9
|
|
10
10
|
# load info from LDAP
|
11
|
-
ASF::Person.preload(['mail', 'asf-altEmail'])
|
12
|
-
|
11
|
+
people = ASF::Person.preload(['mail', 'asf-altEmail'])
|
12
|
+
people.each do |name, person|
|
13
13
|
(person.mail+person.alt_email).each do |mail|
|
14
14
|
list[mail.downcase] = person
|
15
15
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whimsy-asf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.74
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
@@ -14,84 +14,84 @@ dependencies:
|
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: ruby-ldap
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: tzinfo
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: tzinfo-data
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: wunderbar
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description: |2
|
@@ -137,12 +137,12 @@ require_paths:
|
|
137
137
|
- lib
|
138
138
|
required_ruby_version: !ruby/object:Gem::Requirement
|
139
139
|
requirements:
|
140
|
-
- -
|
140
|
+
- - ">="
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0'
|
143
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
|
-
- -
|
145
|
+
- - ">="
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|