whimsy-asf 0.0.5 → 0.0.6

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.
data/asf.version CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
@@ -52,6 +52,12 @@ class ASF::Board::Agenda
52
52
 
53
53
  def parse(file)
54
54
  @file = file
55
+
56
+ if not @file.valid_encoding?
57
+ filter = Proc.new {|c| c.unpack('U').first rescue 0xFFFD}
58
+ @file = @file.chars.map(&filter).pack('U*').force_encoding('utf-8')
59
+ end
60
+
55
61
  @@parsers.each { |parser| instance_exec(&parser) }
56
62
 
57
63
  # add index markers for major sections
@@ -37,6 +37,10 @@ class ASF::Board::Agenda
37
37
  ASF::Committee.find(attrs['title']).chair.mail.first
38
38
  rescue
39
39
  end
40
+
41
+ if attrs['report'].to_s.include? "\uFFFD"
42
+ attrs['warnings'] = ['UTF-8 encoding error']
43
+ end
40
44
  end
41
45
  end
42
46
  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.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-29 00:00:00.000000000 Z
12
+ date: 2014-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri