whimsy-asf 0.0.28 → 0.0.29

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3a8906d01060615578b69bec11d4f3477afa5de
4
- data.tar.gz: 7e6a121bfebc1a4b911f8820d7c207a5a87536e8
3
+ metadata.gz: ad85a450b2c0f9eb8db1ea052ff18a897a9cb860
4
+ data.tar.gz: a171e20900e07773512c3c2f15defe92a0e5a5b2
5
5
  SHA512:
6
- metadata.gz: d0f0a7b47cab1138e7ae5a6d0205f71a3b1ce81246259a893900d71155cf8a2889f54c0dc03fe9847d06f74384c6453cbdf96137eef1b9bb981d9bd81274fd8c
7
- data.tar.gz: a31dd5f6649829e9a08509ed748f56541868dba7dd5e2711f272873c780aa223c17c562d6cb4c857cb2934f464c066f19ff5112225f342e2b48392edfbed4a19
6
+ metadata.gz: 529060e1226ff2791961a7fee509bf0a73213d09fb5bfc55224b815a34da3f5ee0e37d177806edc2aa81141f2218a504b952a22f3f2c415e413a095a895d2890
7
+ data.tar.gz: a5d70499742e73d75163eb4142f60f9571fd4b5178c40dbabaece33e903f4f640f4e56f57cc0e87c26afe9ea39d83700c7395359f865871bc24aad54f2ac3e1a
data/asf.version CHANGED
@@ -1 +1 @@
1
- 0.0.28
1
+ 0.0.29
@@ -19,15 +19,28 @@ class ASF::Board::Agenda
19
19
  list = nil
20
20
 
21
21
  absent = attr['text'].scan(/Absent:\n\n.*?\n\n/m).join
22
+ directors = attr['text'].scan(/^ +Directors[ \S]*?:\n\n.*?\n\n/m).join
23
+ officers = attr['text'].scan(/^ +Executive[ \S]*?:\n\n.*?\n\n/m).join
22
24
 
23
25
  # attempt to identify the people mentioned in the Roll Call
24
26
  people = attr['text'].scan(/ {8}(\w.*)/).flatten.each do |sname|
25
27
  next if sname == 'none'
26
-
27
28
  name = sname
29
+
30
+ role = :guest
31
+ role = :director if directors.include? name
32
+ role = :officer if officers.include? name
33
+
34
+ sort_name = name.split(' ').rotate(-1).join(' ')
35
+ if sort_name.start_with? '('
36
+ sort_name = sort_name.split(' ').rotate(-1).join(' ')
37
+ end
38
+
28
39
  if @quick
29
40
  attr['people'][name.gsub(/\W/, '_')] = {
30
41
  name: name,
42
+ sortName: sort_name,
43
+ role: role,
31
44
  attending: !absent.include?(name)
32
45
  }
33
46
  else
@@ -70,12 +83,19 @@ class ASF::Board::Agenda
70
83
 
71
84
  attr['people'][person.id] = {
72
85
  name: name,
86
+ sortName: sort_name,
87
+ role: role,
73
88
  member: person.asf_member?,
74
89
  attending: !absent.include?(name)
75
90
  }
76
91
  end
77
92
  end
78
93
  end
94
+
95
+ if attr['people']
96
+ attr['people'] = Hash[attr['people'].
97
+ sort_by {|id, person| person[:sortName]}]
98
+ end
79
99
  elsif attr['title'] == 'Call to order'
80
100
  attr['timestamp'] = timestamp(attr['text'][/\d+:\d+([ap]m)?/])
81
101
  end
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.28
4
+ version: 0.0.29
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-05-17 00:00:00.000000000 Z
11
+ date: 2015-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri