wc3_protocol 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81f988c362a4c6df84c3351fa4077afb0f8959c32828a235e9cd39a927c5ff52
4
- data.tar.gz: 1621e034c74f322c63362f76b8d965cf730799da7dc6dc37638f70e1b7f16f96
3
+ metadata.gz: 7732c694f73220d17322f119ac938c07487e42567c728c789526761caa59158a
4
+ data.tar.gz: 974c87ea87b089d2f012eae16cf7fe572c13a56665b7699ef6a160b757a1d402
5
5
  SHA512:
6
- metadata.gz: e1806522af79f4648f36754727e9e178176c39690b39dbb4693ef7c76d1a6f69df7b8212f0b0ba709a347fa422124194d37e09c585e493efe4570a028b81e733
7
- data.tar.gz: '048660985e4f47fa039c1976ea63bd23d3e370ce3eb93c8a9bff09df5ccee7b0f7c22b55313f786f00f71d7fbcac5418bbdfde4f3c321b9f1454121f5c8205fe'
6
+ metadata.gz: 3238585a8cb8deedb7831eb652cb2d0216411b94f9cdca281c272d4b5cfd50941081c92d736087684910b7889ba3a70dda7587a388cbf2d1e66bc44dd219d87f
7
+ data.tar.gz: 5d6f6964a0cfbfeec1910b06b61c4d66009a6cbcaf176d08150f1a7f4dbfb4e162ed67e1e821c849e2dc1f283679efd69d89937c55531cff336cf6d8fec4182c
data/.gitignore CHANGED
@@ -15,4 +15,5 @@
15
15
  .rspec_status
16
16
 
17
17
 
18
- /playground
18
+ /playground
19
+ /playground.rb
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
3
 
4
+ require_relative 'lib/wc3_protocol'
5
+
4
6
  #
5
7
  # run default task to see tasks to build and publish gem
6
8
  #
@@ -12,4 +14,9 @@ task :test do
12
14
  system 'rspec'
13
15
  end
14
16
 
17
+ task :playground do
18
+ g = Wc3Protocol::Broadcast.find_games
19
+ puts g.inspect
20
+ end
21
+
15
22
  RSpec::Core::RakeTask.new(:spec)
@@ -90,10 +90,11 @@ module Wc3Protocol
90
90
 
91
91
  # extract map name from 14th byte
92
92
  @game_map_name = decrypted_string[13..-1]
93
+ # cut string at NULL string termination byte
94
+ @game_map_name = @game_map_name[0..@game_map_name.index("\x00")-1]
93
95
 
94
96
  # Get last segment of map name that is split by '\\'
95
97
  last_map_name_segment = @game_map_name.split('\\').last
96
- last_map_name_segment = last_map_name_segment[0..(last_map_name_segment.index('.w3') + 4)]
97
98
 
98
99
  # use original map name if no segment is found
99
100
  @game_map_name = last_map_name_segment || @game_map_name
@@ -1,3 +1,3 @@
1
1
  module Wc3Protocol
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wc3_protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthäus J. N. Beyrle
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubygems_version: 3.1.4
100
+ rubygems_version: 3.4.10
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: The ruby gem to find and retrieve information of Warcraft3 games