tf2_line_parser 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/Gemfile.lock +19 -21
- data/lib/tf2_line_parser/events/airshot.rb +2 -2
- data/lib/tf2_line_parser/events/assist.rb +1 -1
- data/lib/tf2_line_parser/events/capture_block.rb +1 -1
- data/lib/tf2_line_parser/events/charge_deployed.rb +1 -1
- data/lib/tf2_line_parser/events/chat.rb +2 -2
- data/lib/tf2_line_parser/events/console_say.rb +1 -1
- data/lib/tf2_line_parser/events/current_score.rb +1 -1
- data/lib/tf2_line_parser/events/damage.rb +4 -4
- data/lib/tf2_line_parser/events/domination.rb +1 -1
- data/lib/tf2_line_parser/events/event.rb +8 -8
- data/lib/tf2_line_parser/events/final_score.rb +1 -1
- data/lib/tf2_line_parser/events/heal.rb +1 -1
- data/lib/tf2_line_parser/events/kill.rb +3 -3
- data/lib/tf2_line_parser/events/match_end.rb +1 -1
- data/lib/tf2_line_parser/events/medic_death.rb +2 -2
- data/lib/tf2_line_parser/events/pickup_item.rb +2 -2
- data/lib/tf2_line_parser/events/player_action_event.rb +1 -1
- data/lib/tf2_line_parser/events/point_capture.rb +1 -1
- data/lib/tf2_line_parser/events/revenge.rb +1 -1
- data/lib/tf2_line_parser/events/role_change.rb +2 -2
- data/lib/tf2_line_parser/events/round_event_with_variables.rb +1 -1
- data/lib/tf2_line_parser/events/round_event_without_variables.rb +1 -1
- data/lib/tf2_line_parser/events/round_length.rb +2 -2
- data/lib/tf2_line_parser/events/round_stalemate.rb +1 -1
- data/lib/tf2_line_parser/events/round_start.rb +1 -1
- data/lib/tf2_line_parser/events/round_win.rb +2 -2
- data/lib/tf2_line_parser/events/score.rb +2 -2
- data/lib/tf2_line_parser/events/spawn.rb +1 -1
- data/lib/tf2_line_parser/events/suicide.rb +2 -2
- data/lib/tf2_line_parser/events/unknown.rb +2 -2
- data/lib/tf2_line_parser/line.rb +0 -1
- data/lib/tf2_line_parser/version.rb +1 -1
- metadata +3 -3
- data/lib/tidy_bytes_monkey_patch.rb +0 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7a3d7673389c53ef93a60cf7bbd17a7a7313458b
|
|
4
|
+
data.tar.gz: 22167823c824d411974e72db7f8f36e02d124eed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e487f28fc1dc13a60996ab319cb8445b1e65d8b774feda994ff9c71ddd476e15dcf1dc813c60e1d0a1aa46e6b4f356cc50d5b25079e3987eecfd7de7704e36e7
|
|
7
|
+
data.tar.gz: 5736a367b60aa7f04d49f561f99fd0b7ca2c8c701f52ac63ec2b87a8aa7ab92914175b7637ff151aa492595432fb89531a7ede7e25ed7fc9ee2b27f05758b4b9
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,43 +1,41 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
tf2_line_parser (0.1.
|
|
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.
|
|
11
|
-
i18n (~> 0.
|
|
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.
|
|
14
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
|
15
15
|
tzinfo (~> 1.1)
|
|
16
16
|
coderay (1.1.0)
|
|
17
|
-
coveralls (0.7.
|
|
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.
|
|
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.
|
|
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
|
|
39
|
-
mime-types (>= 1.16
|
|
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.
|
|
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.
|
|
56
|
-
tins (~>
|
|
57
|
-
thor (0.
|
|
53
|
+
term-ansicolor (1.2.2)
|
|
54
|
+
tins (~> 0.8)
|
|
55
|
+
thor (0.18.1)
|
|
58
56
|
thread_safe (0.3.4)
|
|
59
|
-
tins (
|
|
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
|
|
@@ -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,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 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,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
|
|
@@ -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,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,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,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
|
data/lib/tf2_line_parser/line.rb
CHANGED
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.
|
|
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:
|
|
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
|