tf2_line_parser 0.6.2 → 0.6.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e3baffd4d9ebddf470c688dcc95d494a7067f97a751840a11937037a4c628c4
4
- data.tar.gz: 06ff3fdc7686e001118279e09c66cbec031984076255edd5a125933f88a63e12
3
+ metadata.gz: f62b3222dd89877b6ce919788a689fb437bfbc7ca75a981f4d35fade570ec629
4
+ data.tar.gz: 4ddd3fcfea754c47b36fd4fd726f210cc9a5b407fa88273029c475e8388f0940
5
5
  SHA512:
6
- metadata.gz: d821617dfb99fe6a74ab3d109b6394a6ed76bcc729e7bfd3dba2eaaacf0a607be3765a318ce6cf8e3da2ac8c6d91d243e324a689729978a30598b8a07997a103
7
- data.tar.gz: '047989cfbe3fd4fb6257d059c79aa2046692e18cca068b76873864f5c740a209ebc765ea9f01983156581ce1187754f33c9eee61fc44e83b6da8b09f6e70f7ef'
6
+ metadata.gz: 99198496cdaf2a68406b0a106b189133c02bf753d816738d99a2f7abd0065d6f0df640f3fce4fb1604ba49898d18b2855015b80e4ae5b7ddb1b03163b2fb05f6
7
+ data.tar.gz: c509657ae00cbf328d70b1685aee1d4dd9e0119a328331534b7bad6f47c656d2ce9b58c54caf8903c51c95afba28c9ae9d7d9e2b8a5574b3d763295baa162972
@@ -38,7 +38,7 @@ module TF2LineParser
38
38
  # ordered by how common the messages are
39
39
  @types ||= [ShotFired, ShotHit, PositionReport, HeadshotDamage, Airshot, Damage, AirshotHeal, Heal, PickupItem, Assist, Kill, CaptureBlock, PointCapture, ChargeDeployed,
40
40
  MedicDeath, MedicDeathEx, EmptyUber, ChargeReady, ChargeEnded, FirstHealAfterSpawn, LostUberAdvantage, BuiltObject, PlayerExtinguished, JoinedTeam, EnteredGame, RoleChange, Spawn, Suicide, KilledObject, Say, TeamSay, Domination, Revenge, RoundWin, CurrentScore,
41
- RoundLength, RoundStart, RoundSetupBegin, RoundSetupEnd, MiniRoundStart, MiniRoundSelected, WorldIntermissionWinLimit, IntermissionWinLimit, Connect, Disconnect, RconCommand, ConsoleSay, MatchEnd, FinalScore,
41
+ RoundLength, RoundStart, RoundSetupBegin, RoundSetupEnd, MiniRoundStart, MiniRoundSelected, MiniRoundLength, MiniRoundWin, WorldIntermissionWinLimit, IntermissionWinLimit, Connect, Disconnect, RconCommand, ConsoleSay, MatchEnd, FinalScore,
42
42
  RoundStalemate, Unknown].freeze
43
43
  end
44
44
 
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TF2LineParser
4
+ module Events
5
+ class MiniRoundLength < RoundEventWithVariables
6
+ def self.round_type
7
+ @round_type ||= 'Mini_Round_Length'
8
+ end
9
+
10
+ def self.round_variable_regex
11
+ @round_variable_regex ||= /\(seconds "(?'length'.*)"\)/.freeze
12
+ end
13
+
14
+ def self.round_variable
15
+ @round_variable ||= :length
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TF2LineParser
4
+ module Events
5
+ class MiniRoundWin < RoundEventWithVariables
6
+ def self.round_type
7
+ @round_type ||= 'Mini_Round_Win'
8
+ end
9
+
10
+ def self.round_variable_regex
11
+ @round_variable_regex ||= /\(winner "(?'team'Red|Blue)"\)/.freeze
12
+ end
13
+
14
+ def self.round_variable
15
+ @round_variable ||= :team
16
+ end
17
+ end
18
+ end
19
+ end
@@ -43,6 +43,8 @@ module TF2LineParser
43
43
  'Round_Setup_End' => [Events::RoundSetupEnd],
44
44
  'Mini_Round_Start' => [Events::MiniRoundStart],
45
45
  'Mini_Round_Selected' => [Events::MiniRoundSelected],
46
+ 'Mini_Round_Length' => [Events::MiniRoundLength],
47
+ 'Mini_Round_Win' => [Events::MiniRoundWin],
46
48
  'Intermission_Win_Limit' => [Events::WorldIntermissionWinLimit, Events::IntermissionWinLimit],
47
49
  'Round_Stalemate' => [Events::RoundStalemate],
48
50
  'Game_Over' => [Events::MatchEnd],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TF2LineParser
4
- VERSION = '0.6.2'
4
+ VERSION = '0.6.3'
5
5
  end
@@ -476,6 +476,20 @@ module TF2LineParser
476
476
  parse(line)
477
477
  end
478
478
 
479
+ it 'recognizes mini round length' do
480
+ line = 'L 03/28/2026 - 02:06:43: World triggered "Mini_Round_Length" (seconds "835.50")'
481
+ length = '835.50'
482
+ expect(Events::MiniRoundLength).to receive(:new).with(anything, length)
483
+ parse(line)
484
+ end
485
+
486
+ it 'recognizes mini round win' do
487
+ line = 'L 03/28/2026 - 02:06:43: World triggered "Mini_Round_Win" (winner "Blue")'
488
+ team = 'Blue'
489
+ expect(Events::MiniRoundWin).to receive(:new).with(anything, team)
490
+ parse(line)
491
+ end
492
+
479
493
  it 'recognizes intermission win limit' do
480
494
  line = 'L 02/07/2013 - 21:52:41: Team "RED" triggered "Intermission_Win_Limit" due to mp_windifference'
481
495
  team = 'RED'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tf2_line_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arie
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-03-22 00:00:00.000000000 Z
10
+ date: 2026-03-28 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: coveralls_reborn
@@ -111,8 +111,10 @@ files:
111
111
  - lib/tf2_line_parser/events/match_end.rb
112
112
  - lib/tf2_line_parser/events/medic_death.rb
113
113
  - lib/tf2_line_parser/events/medic_death_ex.rb
114
+ - lib/tf2_line_parser/events/mini_round_length.rb
114
115
  - lib/tf2_line_parser/events/mini_round_selected.rb
115
116
  - lib/tf2_line_parser/events/mini_round_start.rb
117
+ - lib/tf2_line_parser/events/mini_round_win.rb
116
118
  - lib/tf2_line_parser/events/pickup_item.rb
117
119
  - lib/tf2_line_parser/events/player_action_event.rb
118
120
  - lib/tf2_line_parser/events/player_extinguished.rb