tf2_line_parser 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +5 -0
  3. data/Gemfile.lock +19 -21
  4. data/lib/tf2_line_parser/events/airshot.rb +2 -2
  5. data/lib/tf2_line_parser/events/assist.rb +1 -1
  6. data/lib/tf2_line_parser/events/capture_block.rb +1 -1
  7. data/lib/tf2_line_parser/events/charge_deployed.rb +1 -1
  8. data/lib/tf2_line_parser/events/chat.rb +2 -2
  9. data/lib/tf2_line_parser/events/console_say.rb +1 -1
  10. data/lib/tf2_line_parser/events/current_score.rb +1 -1
  11. data/lib/tf2_line_parser/events/damage.rb +4 -4
  12. data/lib/tf2_line_parser/events/domination.rb +1 -1
  13. data/lib/tf2_line_parser/events/event.rb +8 -8
  14. data/lib/tf2_line_parser/events/final_score.rb +1 -1
  15. data/lib/tf2_line_parser/events/heal.rb +1 -1
  16. data/lib/tf2_line_parser/events/kill.rb +3 -3
  17. data/lib/tf2_line_parser/events/match_end.rb +1 -1
  18. data/lib/tf2_line_parser/events/medic_death.rb +2 -2
  19. data/lib/tf2_line_parser/events/pickup_item.rb +2 -2
  20. data/lib/tf2_line_parser/events/player_action_event.rb +1 -1
  21. data/lib/tf2_line_parser/events/point_capture.rb +1 -1
  22. data/lib/tf2_line_parser/events/revenge.rb +1 -1
  23. data/lib/tf2_line_parser/events/role_change.rb +2 -2
  24. data/lib/tf2_line_parser/events/round_event_with_variables.rb +1 -1
  25. data/lib/tf2_line_parser/events/round_event_without_variables.rb +1 -1
  26. data/lib/tf2_line_parser/events/round_length.rb +2 -2
  27. data/lib/tf2_line_parser/events/round_stalemate.rb +1 -1
  28. data/lib/tf2_line_parser/events/round_start.rb +1 -1
  29. data/lib/tf2_line_parser/events/round_win.rb +2 -2
  30. data/lib/tf2_line_parser/events/score.rb +2 -2
  31. data/lib/tf2_line_parser/events/spawn.rb +1 -1
  32. data/lib/tf2_line_parser/events/suicide.rb +2 -2
  33. data/lib/tf2_line_parser/events/unknown.rb +2 -2
  34. data/lib/tf2_line_parser/line.rb +0 -1
  35. data/lib/tf2_line_parser/version.rb +1 -1
  36. metadata +3 -3
  37. data/lib/tidy_bytes_monkey_patch.rb +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2825ff230816070e4e8366d22597a64357f120a8
4
- data.tar.gz: 3243bedc7c00fb567f1960c1ba69578d0fb2260b
3
+ metadata.gz: 7a3d7673389c53ef93a60cf7bbd17a7a7313458b
4
+ data.tar.gz: 22167823c824d411974e72db7f8f36e02d124eed
5
5
  SHA512:
6
- metadata.gz: c85bba52b3f353a25408c7b5d25d6c7769c6bdc2c18875f6cf18c1b9c7d9b5cae29066fd0f619c397135130bd33ae0366b023441794597be8e93bfce4c2a2904
7
- data.tar.gz: aa4400c2b4245f4c1a3bd7bfb13ca7d54ffb56f959055233dcca404dfca5c6b45d8ec4212bd800eae83d76a5680cbd211ea24a732be7a0787d6c8d1f1d0f7187
6
+ metadata.gz: e487f28fc1dc13a60996ab319cb8445b1e65d8b774feda994ff9c71ddd476e15dcf1dc813c60e1d0a1aa46e6b4f356cc50d5b25079e3987eecfd7de7704e36e7
7
+ data.tar.gz: 5736a367b60aa7f04d49f561f99fd0b7ca2c8c701f52ac63ec2b87a8aa7ab92914175b7637ff151aa492595432fb89531a7ede7e25ed7fc9ee2b27f05758b4b9
data/.travis.yml CHANGED
@@ -1,6 +1,11 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  rvm:
3
4
  - 1.9.3
5
+ - 2.0
6
+ - 2.1
7
+ - 2.2
4
8
  - rbx
5
9
  - jruby-19mode
6
10
  script: ./script/ci
11
+ sudo: false
data/Gemfile.lock CHANGED
@@ -1,43 +1,41 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tf2_line_parser (0.1.2)
4
+ tf2_line_parser (0.1.3)
5
5
  activesupport
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (4.1.5)
11
- i18n (~> 0.6, >= 0.6.9)
10
+ activesupport (4.2.0)
11
+ i18n (~> 0.7)
12
12
  json (~> 1.7, >= 1.7.7)
13
13
  minitest (~> 5.1)
14
- thread_safe (~> 0.1)
14
+ thread_safe (~> 0.3, >= 0.3.4)
15
15
  tzinfo (~> 1.1)
16
16
  coderay (1.1.0)
17
- coveralls (0.7.1)
17
+ coveralls (0.7.2)
18
18
  multi_json (~> 1.3)
19
- rest-client
19
+ rest-client (= 1.6.7)
20
20
  simplecov (>= 0.7)
21
- term-ansicolor
22
- thor
21
+ term-ansicolor (= 1.2.2)
22
+ thor (= 0.18.1)
23
23
  diff-lcs (1.2.5)
24
24
  docile (1.1.5)
25
- i18n (0.6.11)
25
+ i18n (0.7.0)
26
26
  json (1.8.1)
27
27
  method_source (0.8.2)
28
- mime-types (2.3)
29
- minitest (5.4.0)
28
+ mime-types (2.4.3)
29
+ minitest (5.5.0)
30
30
  multi_json (1.10.1)
31
- netrc (0.7.7)
32
31
  pry (0.10.1)
33
32
  coderay (~> 1.1.0)
34
33
  method_source (~> 0.8.1)
35
34
  slop (~> 3.4)
36
35
  pry-nav (0.2.4)
37
36
  pry (>= 0.9.10, < 0.11.0)
38
- rest-client (1.7.2)
39
- mime-types (>= 1.16, < 3.0)
40
- netrc (~> 0.7)
37
+ rest-client (1.6.7)
38
+ mime-types (>= 1.16)
41
39
  rspec (2.13.0)
42
40
  rspec-core (~> 2.13.0)
43
41
  rspec-expectations (~> 2.13.0)
@@ -46,17 +44,17 @@ GEM
46
44
  rspec-expectations (2.13.0)
47
45
  diff-lcs (>= 1.1.3, < 2.0)
48
46
  rspec-mocks (2.13.1)
49
- simplecov (0.9.0)
47
+ simplecov (0.9.1)
50
48
  docile (~> 1.1.0)
51
- multi_json
49
+ multi_json (~> 1.0)
52
50
  simplecov-html (~> 0.8.0)
53
51
  simplecov-html (0.8.0)
54
52
  slop (3.6.0)
55
- term-ansicolor (1.3.0)
56
- tins (~> 1.0)
57
- thor (0.19.1)
53
+ term-ansicolor (1.2.2)
54
+ tins (~> 0.8)
55
+ thor (0.18.1)
58
56
  thread_safe (0.3.4)
59
- tins (1.3.2)
57
+ tins (0.13.2)
60
58
  tzinfo (1.2.2)
61
59
  thread_safe (~> 0.1)
62
60
 
@@ -4,11 +4,11 @@ module TF2LineParser
4
4
  class Airshot < Damage
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_player} triggered "damage" #{regex_damage_against}\(damage "(?'value'\d+)"\)(?:( #{regex_realdamage})?( #{regex_weapon})?( #{regex_airshot})?)$/
7
+ @regex ||= /#{regex_time} #{regex_player} triggered "damage" #{regex_damage_against}\(damage "(?'value'\d+)"\)(?:( #{regex_realdamage})?( #{regex_weapon})?( #{regex_airshot})?)$/.freeze
8
8
  end
9
9
 
10
10
  def self.regex_airshot
11
- @regex_airshot ||= /(\(airshot "(?'airshot'\w*)"\))?/
11
+ @regex_airshot ||= /(\(airshot "(?'airshot'\w*)"\))?/.freeze
12
12
  end
13
13
 
14
14
  def self.attributes
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class Assist < PVPEvent
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_player} triggered "kill assist" against #{regex_target}/
7
+ @regex ||= /#{regex_time} #{regex_player} triggered "kill assist" against #{regex_target}/.freeze
8
8
  end
9
9
 
10
10
  end
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class CaptureBlock < Event
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_player} triggered "captureblocked" #{regex_cap}/
7
+ @regex ||= /#{regex_time} #{regex_player} triggered "captureblocked" #{regex_cap}/.freeze
8
8
  end
9
9
 
10
10
  def self.attributes
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class ChargeDeployed < Event
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_player} triggered "chargedeployed"/
7
+ @regex ||= /#{regex_time} #{regex_player} triggered "chargedeployed"/.freeze
8
8
  end
9
9
 
10
10
  def self.attributes
@@ -19,7 +19,7 @@ module TF2LineParser
19
19
  class Say < Chat
20
20
 
21
21
  def self.regex
22
- @regex ||= /#{regex_time} #{regex_player} say #{regex_message}/
22
+ @regex ||= /#{regex_time} #{regex_player} say #{regex_message}/.freeze
23
23
  end
24
24
 
25
25
  end
@@ -27,7 +27,7 @@ module TF2LineParser
27
27
  class TeamSay < Chat
28
28
 
29
29
  def self.regex
30
- @regex ||= /#{regex_time} #{regex_player} say_team #{regex_message}/
30
+ @regex ||= /#{regex_time} #{regex_player} say_team #{regex_message}/.freeze
31
31
  end
32
32
 
33
33
  end
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class ConsoleSay < Event
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_console} say #{regex_message}/
7
+ @regex ||= /#{regex_time} #{regex_console} say #{regex_message}/.freeze
8
8
  end
9
9
 
10
10
  def self.attributes
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class CurrentScore < Score
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_team} current score #{regex_score} with .*/
7
+ @regex ||= /#{regex_time} #{regex_team} current score #{regex_score} with .*/.freeze
8
8
  end
9
9
 
10
10
  end
@@ -4,19 +4,19 @@ module TF2LineParser
4
4
  class Damage < Event
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_player} triggered "damage" #{regex_damage_against}\(damage "(?'value'\d+)"\)(?:( #{regex_realdamage})?( #{regex_weapon})?)$/
7
+ @regex ||= /#{regex_time} #{regex_player} triggered "damage" #{regex_damage_against}\(damage "(?'value'\d+)"\)(?:( #{regex_realdamage})?( #{regex_weapon})?)$/.freeze
8
8
  end
9
9
 
10
10
  def self.regex_damage_against
11
- @regex_damage_against ||= /(against #{regex_target} )?/
11
+ @regex_damage_against ||= /(against #{regex_target} )?/.freeze
12
12
  end
13
13
 
14
14
  def self.regex_realdamage
15
- @regex_realdamage ||= /(\(realdamage "(?'realdamage'\w*)"\))?/
15
+ @regex_realdamage ||= /(\(realdamage "(?'realdamage'\w*)"\))?/.freeze
16
16
  end
17
17
 
18
18
  def self.regex_weapon
19
- @regex_weapon ||= /(\(weapon "(?'weapon'\w*)"\))?/
19
+ @regex_weapon ||= /(\(weapon "(?'weapon'\w*)"\))?/.freeze
20
20
  end
21
21
 
22
22
  def self.attributes
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class Domination < PVPEvent
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_player} triggered "domination" against #{regex_target}.*/
7
+ @regex ||= /#{regex_time} #{regex_player} triggered "domination" against #{regex_target}.*/.freeze
8
8
  end
9
9
 
10
10
  end
@@ -10,31 +10,31 @@ module TF2LineParser
10
10
 
11
11
 
12
12
  def self.time_format
13
- @time_format ||= '%m/%d/%Y - %T'
13
+ @time_format ||= '%m/%d/%Y - %T'.freeze
14
14
  end
15
15
 
16
16
  def self.regex_time
17
- @regex_time ||= 'L (?\'time\'.*):'
17
+ @regex_time ||= 'L (?\'time\'.*):'.freeze
18
18
  end
19
19
 
20
20
  def self.regex_player
21
- @regex_player ||= '"(?\'player_nick\'.+)<(?\'player_uid\'\d+)><(?\'player_steamid\'(\[\S+\]|STEAM_\S+))><(?\'player_team\'Red|Blue|Spectator)>"'
21
+ @regex_player ||= '"(?\'player_nick\'.+)<(?\'player_uid\'\d+)><(?\'player_steamid\'(\[\S+\]|STEAM_\S+))><(?\'player_team\'Red|Blue|Spectator)>"'.freeze
22
22
  end
23
23
 
24
24
  def self.regex_target
25
- @regex_target ||= '"(?\'target_nick\'.+)<(?\'target_uid\'\d+)><(?\'target_steamid\'(\[\S+\]|STEAM_\S+))><(?\'target_team\'Red|Blue)>"'
25
+ @regex_target ||= '"(?\'target_nick\'.+)<(?\'target_uid\'\d+)><(?\'target_steamid\'(\[\S+\]|STEAM_\S+))><(?\'target_team\'Red|Blue)>"'.freeze
26
26
  end
27
27
 
28
28
  def self.regex_cap
29
- @regex_cap ||= '\(cp "(?\'cp_number\'\d+)"\) \(cpname "(?\'cp_name\'.\w*)'
29
+ @regex_cap ||= '\(cp "(?\'cp_number\'\d+)"\) \(cpname "(?\'cp_name\'.\w*)'.freeze
30
30
  end
31
31
 
32
32
  def self.regex_console
33
- @regex_console ||= '"Console<0><Console><Console>"'
33
+ @regex_console ||= '"Console<0><Console><Console>"'.freeze
34
34
  end
35
35
 
36
36
  def self.regex_message
37
- @regex_message ||= '"(?\'message\'.*)"'
37
+ @regex_message ||= '"(?\'message\'.*)"'.freeze
38
38
  end
39
39
 
40
40
  def self.types
@@ -42,7 +42,7 @@ module TF2LineParser
42
42
  @types ||= [Damage, Heal, PickupItem, Assist, Kill, CaptureBlock, PointCapture, ChargeDeployed,
43
43
  MedicDeath, RoleChange, Spawn, Airshot, Suicide, Say, TeamSay, Domination, Revenge, RoundWin, CurrentScore,
44
44
  RoundLength, RoundStart, ConsoleSay, MatchEnd, FinalScore,
45
- RoundStalemate, Unknown]
45
+ RoundStalemate, Unknown].freeze
46
46
  end
47
47
 
48
48
  def self.regex_results(matched_line)
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class FinalScore < Score
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_team} final score #{regex_score} with .*/
7
+ @regex ||= /#{regex_time} #{regex_team} final score #{regex_score} with .*/.freeze
8
8
  end
9
9
 
10
10
  end
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class Heal < Event
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_player} triggered "healed" against #{regex_target} \(healing "(?'value'\d+)"\)/
7
+ @regex ||= /#{regex_time} #{regex_player} triggered "healed" against #{regex_target} \(healing "(?'value'\d+)"\)/.freeze
8
8
  end
9
9
 
10
10
  def self.attributes
@@ -4,15 +4,15 @@ module TF2LineParser
4
4
  class Kill < PVPEvent
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_player} killed #{regex_target} #{regex_weapon} #{regex_customkill}/
7
+ @regex ||= /#{regex_time} #{regex_player} killed #{regex_target} #{regex_weapon} #{regex_customkill}/.freeze
8
8
  end
9
9
 
10
10
  def self.regex_weapon
11
- @regex_weapon ||= 'with "(?\'weapon\'\w*)"'
11
+ @regex_weapon ||= 'with "(?\'weapon\'\w*)"'.freeze
12
12
  end
13
13
 
14
14
  def self.regex_customkill
15
- @regex_customkill ||= /(\(customkill "(?'customkill'\w*)"\))?/
15
+ @regex_customkill ||= /(\(customkill "(?'customkill'\w*)"\))?/.freeze
16
16
  end
17
17
 
18
18
  def self.attributes
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class MatchEnd < RoundEventWithVariables
5
5
 
6
6
  def self.round_variable_regex
7
- @round_variable_regex ||= /reason "(?'reason'.*)"/
7
+ @round_variable_regex ||= /reason "(?'reason'.*)"/.freeze
8
8
  end
9
9
 
10
10
  def self.round_type
@@ -4,11 +4,11 @@ module TF2LineParser
4
4
  class MedicDeath < Event
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_player} triggered "medic_death" against #{regex_target} #{regex_medic_death_info}/
7
+ @regex ||= /#{regex_time} #{regex_player} triggered "medic_death" against #{regex_target} #{regex_medic_death_info}/.freeze
8
8
  end
9
9
 
10
10
  def self.regex_medic_death_info
11
- @regex_healing ||= '\(healing "(?\'healing\'\d+)"\) \(ubercharge "(?\'ubercharge\'\d+)"\)'
11
+ @regex_healing ||= '\(healing "(?\'healing\'\d+)"\) \(ubercharge "(?\'ubercharge\'\d+)"\)'.freeze
12
12
  end
13
13
 
14
14
  def self.attributes
@@ -4,11 +4,11 @@ module TF2LineParser
4
4
  class PickupItem < PlayerActionEvent
5
5
 
6
6
  def self.action_text
7
- @action_text ||= "picked up item"
7
+ @action_text ||= "picked up item".freeze
8
8
  end
9
9
 
10
10
  def self.regex_action
11
- @regex_item ||= '\"(?\'item\'.*)\"'
11
+ @regex_item ||= '\"(?\'item\'.*)\"'.freeze
12
12
  end
13
13
 
14
14
  def self.item
@@ -5,7 +5,7 @@ module TF2LineParser
5
5
  class PlayerActionEvent < Event
6
6
 
7
7
  def self.regex
8
- @regex ||= /#{regex_time} #{regex_player} #{action_text} #{regex_action}/
8
+ @regex ||= /#{regex_time} #{regex_player} #{action_text} #{regex_action}/.freeze
9
9
  end
10
10
 
11
11
  def self.attributes
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class PointCapture < Event
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} Team "(?'team'Red|Blue)" triggered "pointcaptured" \(cp "(?'cp_number'\d+)"\) \(cpname "(?'cp_name'.*)"\) \(numcappers/
7
+ @regex ||= /#{regex_time} Team "(?'team'Red|Blue)" triggered "pointcaptured" \(cp "(?'cp_number'\d+)"\) \(cpname "(?'cp_name'.*)"\) \(numcappers/.freeze
8
8
  end
9
9
 
10
10
  def self.attributes
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class Revenge < PVPEvent
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_player} triggered "revenge" against #{regex_target}.*/
7
+ @regex ||= /#{regex_time} #{regex_player} triggered "revenge" against #{regex_target}.*/.freeze
8
8
  end
9
9
 
10
10
  end
@@ -4,11 +4,11 @@ module TF2LineParser
4
4
  class RoleChange < PlayerActionEvent
5
5
 
6
6
  def self.action_text
7
- @action_text ||= "changed role to"
7
+ @action_text ||= "changed role to".freeze
8
8
  end
9
9
 
10
10
  def self.regex_action
11
- @regex_role ||= '\"(?\'role\'.*)\"'
11
+ @regex_role ||= '\"(?\'role\'.*)\"'.freeze
12
12
  end
13
13
 
14
14
  def self.item
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class RoundEventWithVariables < Event
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} World triggered "#{round_type}" #{round_variable_regex}/
7
+ @regex ||= /#{regex_time} World triggered "#{round_type}" #{round_variable_regex}/.freeze
8
8
  end
9
9
 
10
10
  def self.attributes
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class RoundEventWithoutVariables < Event
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} World triggered "#{round_type}"/
7
+ @regex ||= /#{regex_time} World triggered "#{round_type}"/.freeze
8
8
  end
9
9
 
10
10
  def self.attributes
@@ -4,11 +4,11 @@ module TF2LineParser
4
4
  class RoundLength < RoundEventWithVariables
5
5
 
6
6
  def self.round_type
7
- @round_type ||= "Round_Length"
7
+ @round_type ||= "Round_Length".freeze
8
8
  end
9
9
 
10
10
  def self.round_variable_regex
11
- @round_variable_regex ||= /\(seconds \"(?'length'.*)"\)/
11
+ @round_variable_regex ||= /\(seconds \"(?'length'.*)"\)/.freeze
12
12
  end
13
13
 
14
14
  def self.round_variable
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class RoundStalemate < RoundEventWithoutVariables
5
5
 
6
6
  def self.round_type
7
- @round_type ||= "Round_Stalemate"
7
+ @round_type ||= "Round_Stalemate".freeze
8
8
  end
9
9
 
10
10
  end
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class RoundStart < RoundEventWithoutVariables
5
5
 
6
6
  def self.round_type
7
- @round_type ||= "Round_Start"
7
+ @round_type ||= "Round_Start".freeze
8
8
  end
9
9
 
10
10
  end
@@ -4,11 +4,11 @@ module TF2LineParser
4
4
  class RoundWin < RoundEventWithVariables
5
5
 
6
6
  def self.round_type
7
- @round_type ||= "Round_Win"
7
+ @round_type ||= "Round_Win".freeze
8
8
  end
9
9
 
10
10
  def self.round_variable_regex
11
- @round_variable_regex ||= /\(winner "(?'team'Red|Blue)"\)/
11
+ @round_variable_regex ||= /\(winner "(?'team'Red|Blue)"\)/.freeze
12
12
  end
13
13
 
14
14
  def self.round_variable
@@ -4,11 +4,11 @@ module TF2LineParser
4
4
  class Score < Event
5
5
 
6
6
  def self.regex_score
7
- @regex_score ||= '\"(?\'score\'\d+)\"'
7
+ @regex_score ||= '\"(?\'score\'\d+)\"'.freeze
8
8
  end
9
9
 
10
10
  def self.regex_team
11
- @regex_team ||= 'Team \"(?\'team\'Red|Blue)\"'
11
+ @regex_team ||= 'Team \"(?\'team\'Red|Blue)\"'.freeze
12
12
  end
13
13
 
14
14
  def self.attributes
@@ -4,7 +4,7 @@ module TF2LineParser
4
4
  class Spawn < RoleChange
5
5
 
6
6
  def self.action_text
7
- @action_text ||= "spawned as"
7
+ @action_text ||= "spawned as".freeze
8
8
  end
9
9
 
10
10
  end
@@ -4,11 +4,11 @@ module TF2LineParser
4
4
  class Suicide < PlayerActionEvent
5
5
 
6
6
  def self.action_text
7
- @action_text ||= "committed suicide with"
7
+ @action_text ||= "committed suicide with".freeze
8
8
  end
9
9
 
10
10
  def self.regex_action
11
- @regex_role ||= '\"(?\'method\'\w*)\"'
11
+ @regex_role ||= '\"(?\'method\'\w*)\"'.freeze
12
12
  end
13
13
 
14
14
  def self.item
@@ -4,11 +4,11 @@ module TF2LineParser
4
4
  class Unknown < Event
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_unknown}/
7
+ @regex ||= /#{regex_time} #{regex_unknown}/.freeze
8
8
  end
9
9
 
10
10
  def self.regex_unknown
11
- "(?'unknown'.*)"
11
+ "(?'unknown'.*)".freeze
12
12
  end
13
13
 
14
14
  def self.attributes
@@ -1,7 +1,6 @@
1
1
  require 'time'
2
2
  require 'active_support/multibyte/chars'
3
3
  require 'active_support/multibyte/unicode'
4
- require 'tidy_bytes_monkey_patch'
5
4
 
6
5
  module TF2LineParser
7
6
 
@@ -1,3 +1,3 @@
1
1
  module TF2LineParser
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tf2_line_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-30 00:00:00.000000000 Z
11
+ date: 2015-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -115,7 +115,6 @@ files:
115
115
  - lib/tf2_line_parser/parser.rb
116
116
  - lib/tf2_line_parser/player.rb
117
117
  - lib/tf2_line_parser/version.rb
118
- - lib/tidy_bytes_monkey_patch.rb
119
118
  - script/bundler
120
119
  - script/ci
121
120
  - spec/fixtures/logs/airshot.log
@@ -163,3 +162,4 @@ test_files:
163
162
  - spec/lib/tf2_line_parser/parser_spec.rb
164
163
  - spec/lib/tf2_line_parser/player_spec.rb
165
164
  - spec/spec_helper.rb
165
+ has_rdoc:
@@ -1,21 +0,0 @@
1
- module ActiveSupport
2
- module Multibyte
3
- module Unicode
4
-
5
- def tidy_byte(byte)
6
- if byte.is_a? Integer
7
- if byte < 160
8
- [database.cp1252[byte] || byte].pack("U").unpack("C*")
9
- elsif byte < 192
10
- [194, byte]
11
- else
12
- [195, byte - 64]
13
- end
14
- else
15
- byte
16
- end
17
- end
18
-
19
- end
20
- end
21
- end