whimsy-asf 0.0.22 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
data/asf.version CHANGED
@@ -1 +1 @@
1
- 0.0.22
1
+ 0.0.23
@@ -26,22 +26,26 @@ class ASF::Board::Agenda
26
26
  end
27
27
 
28
28
  if attrs['title'] =~ /Action Items/
29
- list = {}
30
29
 
31
30
  # extract action items associated with projects
32
- attrs['text'].to_s.split(/^\s+\* /).each do |action|
33
- next unless action =~ /\[ (\S*) \]\s*Status:/
34
- pmc = $1
35
- indent = action.scan(/\n +/).min
36
- action.gsub! indent, "\n" if indent
37
- action[/(\[ #{pmc} \])\s*Status:/, 1] = ''
38
- action.chomp!
39
- action.sub! /\s+Status:\Z/, ''
40
- list[pmc] ||= []
41
- list[pmc] << action
42
- end
31
+ text = attrs['text'].sub(/\A\s*\n/, '').sub(/\s+\Z/, '')
32
+ unindent = text.sub(/s+\Z/,'').scan(/^ *\S/).map(&:length).min || 1
33
+ text.gsub! /^ {#{unindent-1}}/, ''
34
+
35
+ attrs['actions'] = text.sub(/^\* /, '').split(/^\n\* /).map do |text|
36
+ match1 = /(.*?)(\n\s*Status:(.*))/m.match(text)
37
+ match2 = /(.*?)(\[ ([^\]]+) \])?\s*\Z/m.match(match1[1])
38
+ match3 = /(.*?): (.*)\Z/m.match(match2[1])
39
+ match4 = /(.*?)( (\d+-\d+-\d+))?$/.match(match2[3])
43
40
 
44
- attrs['actions'] = list
41
+ {
42
+ owner: match3[1],
43
+ text: match3[2].strip,
44
+ status: match1[3].to_s.strip,
45
+ pmc: (match4[1] if match4),
46
+ date: (match4[3] if match4)
47
+ }
48
+ end
45
49
  end
46
50
  end
47
51
  end
@@ -69,7 +69,11 @@ class ASF::Board::Agenda
69
69
  @sections[section][:index] = index if @sections[section]
70
70
  end
71
71
 
72
- # cleanup text and comment whitespace
72
+ # look for flags
73
+ flagged_reports = Hash[@file[/ \d\. Committee Reports.*?\n\s+A\./m].
74
+ scan(/# Apache (.*?) \[(.*)\]/)]
75
+
76
+ # cleanup text and comment whitespace, add flags
73
77
  @sections.each do |section, hash|
74
78
  text = hash['text'] || hash['report']
75
79
  if text
@@ -86,6 +90,10 @@ class ASF::Board::Agenda
86
90
  unindent = text.sub(/s+\Z/,'').scan(/^ *\S/).map(&:length).min || 1
87
91
  text.gsub! /^ {#{unindent-1}}/, ''
88
92
  end
93
+
94
+ # add flags
95
+ flags = flagged_reports[hash['title']]
96
+ hash['flags'] = flags.split(', ') if flags
89
97
  end
90
98
 
91
99
  unless @quick
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: whimsy-asf
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.22
5
+ version: 0.0.23
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sam Ruby
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-04-23 00:00:00.000000000 Z
12
+ date: 2015-04-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  version_requirements: !ruby/object:Gem::Requirement