whimsy-asf 0.0.46 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/asf.version +1 -1
- data/lib/whimsy/asf/agenda/front.rb +8 -37
- 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: ea0528b059d622eb760257d915b5044cb034de40
|
|
4
|
+
data.tar.gz: 5614665e728a93c19d56bfb08209bbe537d27c4b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ae73afac5989aff6ef50e3b331ebe62dd1ce8ee131b4aa9fd93c837ac37f506900e0e8f8e21c897757d37c948a5dda8f15e32e0a975f47b005b9dfaa992d835
|
|
7
|
+
data.tar.gz: 9199f3a82ce498a7a123a735a97c96d4bccc4f064721e0c7fb3a20da6cdddc423cc5b42a533ee1c8e80fa0ff389efdb471bba1d945243dea3a912fc8530da8f8
|
data/asf.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.47
|
|
@@ -23,9 +23,9 @@ class ASF::Board::Agenda
|
|
|
23
23
|
officers = attr['text'].scan(/^ +Executive[ \S]*?:\n\n.*?\n\n/m).join
|
|
24
24
|
|
|
25
25
|
# attempt to identify the people mentioned in the Roll Call
|
|
26
|
-
people = attr['text'].scan(/ {8}(\w.*)/).flatten.each do |
|
|
27
|
-
next if
|
|
28
|
-
name
|
|
26
|
+
people = attr['text'].scan(/ {8}(\w.*)/).flatten.each do |name|
|
|
27
|
+
next if name == 'none'
|
|
28
|
+
name.gsub! /\s*\(.*?\)/, ''
|
|
29
29
|
|
|
30
30
|
role = :guest
|
|
31
31
|
role = :director if directors.include? name
|
|
@@ -42,41 +42,12 @@ class ASF::Board::Agenda
|
|
|
42
42
|
}
|
|
43
43
|
else
|
|
44
44
|
|
|
45
|
-
#
|
|
46
|
-
|
|
45
|
+
# look up name
|
|
46
|
+
search = ASF::Person.list("cn=#{name}")
|
|
47
47
|
|
|
48
|
-
#
|
|
49
|
-
if
|
|
50
|
-
|
|
51
|
-
person = search.first if search.length == 1
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# finally try harder to match the name
|
|
55
|
-
if not person
|
|
56
|
-
sname = sname.strip.downcase.split(/\s+/)
|
|
57
|
-
|
|
58
|
-
if not list
|
|
59
|
-
ASF::Person.preload('cn')
|
|
60
|
-
list = ASF::Person.list
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
search = []
|
|
64
|
-
list.select do |person|
|
|
65
|
-
next if person == 'none'
|
|
66
|
-
pname = person.public_name.downcase.split(/\s+/)
|
|
67
|
-
if sname.all? {|t1| pname.any? {|t2| t2.start_with? t1}}
|
|
68
|
-
search << person
|
|
69
|
-
elsif pname.all? {|t1| sname.any? {|t2| t2.start_with? t1}}
|
|
70
|
-
search << person
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
person = search.first if search.length == 1
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# save results in both the cache and the attributes
|
|
78
|
-
if person
|
|
79
|
-
@@people_cache[name] = person
|
|
48
|
+
# if found, save results in the attributes
|
|
49
|
+
if search.length == 1
|
|
50
|
+
person = search.first
|
|
80
51
|
|
|
81
52
|
attr['people'][person.id] = {
|
|
82
53
|
name: name,
|
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.47
|
|
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-09-
|
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|