csgolytics 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/csgolytics/log_reader.rb +5 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3f58b7d3cbf460542c90e1394b6fcd3fa51847e
4
- data.tar.gz: c2f631aac88ad8c707176cfc24fcc90748156748
3
+ metadata.gz: 6f2434f9ff05f83a8afa7b24dd8c6a1fdaf1a610
4
+ data.tar.gz: bf2d50e27143639aa79f24955de772318e055206
5
5
  SHA512:
6
- metadata.gz: 370e715cd51f8f0aabec72cd38b52adc0bf4a48a3d625ae0cbfc9fe34818749ad49fd58f966a6c7eb97d8ca7ac0c7edc0ff210662b0d4160ea148d3b8dab2661
7
- data.tar.gz: dc9d064cbf47b7b2eef2561c7872f82caa25481df830acc8c161c0c1c4d986ba3aba798684f884e7046d9582eb4c42362404a576bab9f19821130c8cd69dd376
6
+ metadata.gz: b873048397904601f22ed3357c37c1f405d59e45623c7c0d1ea81c16019a92eda289707afae038863275f987d206dffcb41dc9a2b96368954eeeaab42f6e3059
7
+ data.tar.gz: 6b8118e920da08db389bd40708986c85256a604c3d6800a98a9c714885fb76719b6686bab421ae1f78f1679a00f6bd081c1895955104fe9c30d005ac89cdc661
@@ -52,8 +52,11 @@ class CSGOLytics::LogReader
52
52
  f = File.open(fpath)
53
53
  f.seek(offset)
54
54
  while l = (f.readline rescue nil)
55
+ l.encode!('UTF-8', 'UTF-8', :invalid => :replace)
56
+ l.chomp!
57
+
55
58
  @callbacks.each do |cb|
56
- cb[l.chomp]
59
+ cb[l]
57
60
  end
58
61
 
59
62
  File.write(offset_file_path + "~", f.tell)
@@ -66,6 +69,7 @@ class CSGOLytics::LogReader
66
69
  end
67
70
  rescue Exception => e
68
71
  $stderr.puts "ERROR: #{e.to_s}"
72
+ $stderr.puts e.backtrace
69
73
  end
70
74
 
71
75
  sleep POLL_INTERVAL
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csgolytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Asmuth