steam_hlds_log_parser 0.4.1 → 0.4.2

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
  SHA512:
3
- data.tar.gz: 07e4b392ab7437fcfdc19b459ed818ef2f9ea568f7bb77790f90aa2225f5bde3c99f28af74684d1ea8fcde0b033fae332a3b9e24401dd20001a055b3eb7cdbe7
4
- metadata.gz: 6b3effe39ddd007a2970b3ba3887e031b82042fec141a87d71f288e10f948535a4ba9abd7437a54722472f42f2b00cd59f6cd8622468c1b1a08afd0be591ed62
3
+ data.tar.gz: 3bc2eb5cc13ade49b5467b27a58ffed3630ffe3121b2bb0bf52dac7b5eb06c1d556ff3bacd8884eb397d0c541d1c6052265f6a3c5cdceb18ce862e3aa5e8e360
4
+ metadata.gz: 191dd0220f6b60bc2970e2af9c420cbe0d56d4c533d4e8ad8595883cdd28c38fd91ee40ce8bdc531738a46730e0e9c2955cac08e0dc424b8615f204e9091786c
5
5
  SHA1:
6
- data.tar.gz: a0df584749432ba49b668243c12eb2fd7f4b0bc0
7
- metadata.gz: d9aca93be069273408f47ad57a141f2b9b7bd3b4
6
+ data.tar.gz: 53510a0ac2927b3e16b2e4739ef057cc1f7d6aed
7
+ metadata.gz: 047028a751c2032a54fb6ffda1584cf231ef3128
data/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  # Steam Hlds Log Parser
2
2
 
3
- Creates a server with EventMachine which listens to HLDS logs, parse and returns readable content from your game server.
4
- The returned content can be sent to a website, IRC or flowdock for match live streaming.
3
+ Steam Hlds Log Parser listens to UDP log packets sent by your (local or remote) HLDS game server, processes data and returns clean or/and translated and readable content that you can use for your website, irc channel, match live streaming, bots, database...
5
4
 
6
- Mostly tested on Steam HLDS for Counter-Strike.
5
+ Should work with all Steam HLDS based games, and has been mostly tested on Counter-Strike 1.6.
7
6
 
8
- Note : content is sent in english or french at this time. Need i18n contributors!
7
+ Note : translated content is sent in english or french at this time. Need i18n contributors!
9
8
 
10
9
  ## Build Status
11
10
 
@@ -27,12 +26,14 @@ Or install it yourself as:
27
26
 
28
27
  $ gem install steam_hlds_log_parser
29
28
 
30
- ## Usage
29
+ ## Configuration
31
30
 
32
31
  1. Create your own displayer callback `class` which will receive parsed data
33
32
  Ask this `class` to write a file, send content to IRC or flowdock... whatever... and give it as `:displayer` Hash option
34
33
  2. Create a new client on desired IP / Port / Options
35
- 3. In your HLDS server: `logaddress 127.0.0.1 27035`
34
+ 3. Of course, you need to have server RCON. In your `server.cfg` (or in server console) add `logaddress 127.0.0.1 27035`. It specifies where the logs will be sent. This must be the IP / Port your ruby client will listen to.
35
+
36
+ If you are behind a router/firewall, you probably need to configure it.
36
37
 
37
38
  ## Example
38
39
 
@@ -59,6 +60,16 @@ Ask this `class` to write a file, send content to IRC or flowdock... whatever...
59
60
  parser = SteamHldsLogParser::Client.new("127.0.0.1", 27035, options)
60
61
  parser.start
61
62
 
63
+ ## Documentation
64
+
65
+ Steam HLDS Log Parser should be 100% documented.
66
+ However, if you find something to improve, feel free to contribute.
67
+ Full documentation can be found on [Steam HLDS Parser Log page on Rubydoc](http://rubydoc.info/gems/steam_hlds_log_parser).
68
+
69
+ ## Tests
70
+
71
+ Steam HLDS Log Parser uses RSpec as test / specification framework and should be 100% tested too.
72
+ Here again, feel free to improve it.
62
73
 
63
74
  ## Contributing
64
75
 
@@ -1,6 +1,10 @@
1
1
  module SteamHldsLogParser
2
2
 
3
3
  # Listens to HLDS logs received via UDP on configured port
4
+ #
5
+ # @attr_reader [String] host Client host / IP
6
+ # @attr_reader [Integer] port Client port to listen to
7
+ # @attr_reader [Hash] options Client options
4
8
  class Client
5
9
 
6
10
  attr_reader :host, :port, :options
@@ -8,8 +12,8 @@ module SteamHldsLogParser
8
12
  # Creates a new client
9
13
  #
10
14
  # @param [String] host Hostname / IP Address the server will be running
11
- # @param [Integer] port Port to listen to
12
- # @param [Hash] options Other options
15
+ # @param [Integer] port Port will be listening to
16
+ # @param [Hash] options Other configuration options
13
17
  #
14
18
  # @option options [Symbol] :locale (:en) Set the language of returned content
15
19
  # @option options [Boolean] :display_kills (true) Enable kills / frags detail
@@ -1,15 +1,19 @@
1
1
  module SteamHldsLogParser
2
2
 
3
3
  # Process data received by 'Client'
4
+ #
5
+ # @attr_reader [String] host Client host / IP
6
+ # @attr_reader [Integer] port Client port to listen to
7
+ # @attr_reader [Hash] options Client options
4
8
  class Handler < EM::Connection
5
9
 
6
10
  attr_reader :host, :port, :options
7
11
 
8
12
  # Initialize Handler from Client options
9
13
  #
10
- # @param [String] host Hostname / IP Address the server will be running
11
- # @param [Integer] port Port to listen to
12
- # @param [Hash] options Other options
14
+ # @param [String] host Hostname / IP Address the server is running
15
+ # @param [Integer] port Port is listening to
16
+ # @param [Hash] options Other client configuration options
13
17
  #
14
18
  def initialize(host, port, options)
15
19
  @host, @port, @options = host, port, options
@@ -1,4 +1,4 @@
1
1
  module SteamHldsLogParser
2
2
  # Gem Version
3
- VERSION = "0.4.1"
3
+ VERSION = "0.4.2"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steam_hlds_log_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas VIAL
@@ -100,9 +100,8 @@ files:
100
100
  - LICENSE.txt
101
101
  - README.md
102
102
  - Rakefile
103
- - example/example-1.rb
104
- - example/example-2.rb
105
- - lib/.DS_Store
103
+ - examples/example-1.rb
104
+ - examples/example-2.rb
106
105
  - lib/locales/en.yml
107
106
  - lib/locales/fr.yml
108
107
  - lib/steam_hlds_log_parser.rb
data/lib/.DS_Store DELETED
Binary file
File without changes
File without changes