whimsy-asf 0.0.39 → 0.0.40
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 +27 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 600b45a5732c982a3dccb0fab84fc1f5bc1e789e
|
4
|
+
data.tar.gz: f88873c96d276a4be674f1714552bbf2fb994051
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41b288dc80b9074e2dd695813acef36efdff5ebaede86fb74776f8a34a9054b363eaf045bce95ae69194f493f758545cab3e3937d9c4e9b0627fefe1595280c8
|
7
|
+
data.tar.gz: 0278a082d398a5ab0834ac65a73d7b078a2e7374abf18853a8b87276e3717c14ed795386b152c81261c6f9e772e6cd2da862997537ba58f0f133c45b63c32076
|
data/asf.version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.40
|
data/lib/whimsy/asf/committee.rb
CHANGED
@@ -1,13 +1,17 @@
|
|
1
|
+
require 'time'
|
2
|
+
|
1
3
|
module ASF
|
2
4
|
|
3
5
|
class Base
|
4
6
|
end
|
5
7
|
|
6
8
|
class Committee < Base
|
7
|
-
attr_accessor :info, :
|
9
|
+
attr_accessor :info, :emeritus, :report, :roster, :established, :chairs
|
8
10
|
def initialize(*args)
|
9
11
|
@info = []
|
10
12
|
@emeritus = []
|
13
|
+
@chairs = []
|
14
|
+
@roster = {}
|
11
15
|
super
|
12
16
|
end
|
13
17
|
|
@@ -44,25 +48,30 @@ module ASF
|
|
44
48
|
return @committee_info
|
45
49
|
end
|
46
50
|
@committee_mtime = File.mtime(file)
|
51
|
+
@@svn_change = Time.parse(
|
52
|
+
`svn info #{file}`[/Last Changed Date: (.*) \(/, 1]).gmtime
|
47
53
|
|
48
54
|
info = File.read(file).split(/^\* /)
|
49
55
|
head, report = info.shift.split(/^\d\./)[1..2]
|
50
|
-
head.scan(/^\s+(\w.*?)\s\s
|
51
|
-
|
52
|
-
|
56
|
+
head.scan(/^\s+(\w.*?)\s\s+(.*)\s+<(\w+)@apache\.org>/).
|
57
|
+
each do |committee, name, id|
|
58
|
+
find(committee).chairs << {name: name, id: id}
|
59
|
+
end
|
53
60
|
@nonpmcs = head.sub(/.*?also has/m,'').
|
54
61
|
scan(/^\s+(\w.*?)\s\s+.*<\w+@apache\.org>/).flatten.uniq.
|
55
62
|
map {|name| find(name)}
|
56
63
|
|
57
64
|
info.each do |roster|
|
58
65
|
committee = find(@@namemap.call(roster[/(\w.*?)\s+\(/,1]))
|
66
|
+
committee.established = roster[/\(est\. (.*?)\)/, 1]
|
59
67
|
roster.gsub! /^.*\(\s*emeritus\s*\).*/i do |line|
|
60
68
|
committee.emeritus += line.scan(/<(.*?)@apache\.org>/).flatten
|
61
69
|
''
|
62
70
|
end
|
63
71
|
committee.info = roster.scan(/<(.*?)@apache\.org>/).flatten
|
64
|
-
committee.
|
65
|
-
scan(/^\s*(.*?)\s*<(.*?)@apache\.org
|
72
|
+
committee.roster = Hash[roster.gsub(/\(\w+\)/, '').
|
73
|
+
scan(/^\s*(.*?)\s*<(.*?)@apache\.org>\s+(\[(.*?)\])?/).
|
74
|
+
map {|list| [list[1], {name: list[0], date: list[3]}]}]
|
66
75
|
end
|
67
76
|
|
68
77
|
report.scan(/^([^\n]+)\n---+\n(.*?)\n\n/m).each do |period, committees|
|
@@ -92,9 +101,17 @@ module ASF
|
|
92
101
|
result
|
93
102
|
end
|
94
103
|
|
104
|
+
def self.svn_change
|
105
|
+
@@svn_change
|
106
|
+
end
|
107
|
+
|
95
108
|
def chair
|
96
109
|
Committee.load_committee_info
|
97
|
-
@
|
110
|
+
if @chairs.length >= 1
|
111
|
+
ASF::Person.find(@chairs.first[:id])
|
112
|
+
else
|
113
|
+
nil
|
114
|
+
end
|
98
115
|
end
|
99
116
|
|
100
117
|
def display_name
|
@@ -106,16 +123,13 @@ module ASF
|
|
106
123
|
@display_name ||= name
|
107
124
|
end
|
108
125
|
|
109
|
-
def chair=(person)
|
110
|
-
@chair = person
|
111
|
-
end
|
112
|
-
|
113
126
|
def info=(list)
|
114
127
|
@info = list
|
115
128
|
end
|
116
129
|
|
117
|
-
def names
|
118
|
-
|
130
|
+
def names
|
131
|
+
Committee.load_committee_info
|
132
|
+
Hash[@roster.map {|id, info| [id, info[:name]]}]
|
119
133
|
end
|
120
134
|
|
121
135
|
def nonpmc?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|