tf2_line_parser 0.0.8 → 0.0.9

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 ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NGIwZWM4NGI4OTAwMzE1ZGNhZmFlOTFlZDQ2NWI1MWM0NDNlNWI0ZQ==
5
+ data.tar.gz: !binary |-
6
+ ODEzMzM5ZWM4MDFjODE0YTIxZDIxZmE0M2VlY2YyODFhZWI5ZDMxZQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ YThkODE1ZTFmNGE3ZDE5YzI2ZmRmNTE1OGI3ZmY3NGIzNTEyZjRmOWRiZTQ3
10
+ N2FkMjgxNTlhOWUwMTVjODM3N2E3YjZiOTA2NzBlZTZmZTRkOWQxYTVmZWI0
11
+ MmNmMTQ5ZDZhNjMyZGM2ODNmY2JhMDUwN2IwNzZiNGRkNmE2MTk=
12
+ data.tar.gz: !binary |-
13
+ ZWE5ODNiNTQzYWNmZjRmYjEwYThhYmY3M2MwOGI0YjFiM2FjNzc4MzhiOWY3
14
+ NTdhYmQ1Y2ExYTZhNmMxZmMzYzkxYjZlYzIyN2NjYTRkZDZkN2M0M2VkZjIx
15
+ MTZmYTE2ODY4NjVkZjMwMjJlMGM3NTY4N2Y5ZGI2MTlkMzZiMGM=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tf2_line_parser (0.0.7)
4
+ tf2_line_parser (0.0.8)
5
5
  activesupport
6
6
 
7
7
  GEM
@@ -4,16 +4,23 @@ module TF2LineParser
4
4
  class Damage < Event
5
5
 
6
6
  def self.regex
7
- @regex ||= /#{regex_time} #{regex_player} triggered "damage" \(damage "(?'value'\d+)"\)/
7
+ @regex ||= /#{regex_time} #{regex_player} triggered "damage" #{regex_damage_against}\(damage "(?'value'\d+)"\)/
8
+ end
9
+
10
+ def self.regex_damage_against
11
+ @regex_damage_against ||= /(against #{regex_target} )?/
8
12
  end
9
13
 
10
14
  def self.attributes
11
- @attributes ||= [:time, :player_nick, :player_steamid, :player_team, :value]
15
+ @attributes ||= [:time, :player_nick, :player_steamid, :player_team, :target_nick, :target_steamid, :target_team, :value]
12
16
  end
13
17
 
14
- def initialize(time, player_name, player_steam_id, player_team, value)
18
+ def initialize(time, player_name, player_steamid, player_team, target_name, target_steamid, target_team, value)
15
19
  @time = parse_time(time)
16
- @player = Player.new(player_name, player_steam_id, player_team)
20
+ @player = Player.new(player_name, player_steamid, player_team)
21
+ if target_name
22
+ @target = Player.new(target_name, target_steamid, target_team)
23
+ end
17
24
  @value = value.to_i
18
25
  end
19
26
 
@@ -1,3 +1,3 @@
1
1
  module TF2LogLineParser
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end