gamespy_query 0.2.0pre4 → 0.2.0pre5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -0
- data/Rakefile +0 -0
- data/bin/gamespy_query +0 -0
- data/features/master/sync.feature +8 -0
- data/features/readme.md +4 -0
- data/features/support/rspec.rb +8 -0
- data/features/sync.feature +8 -0
- data/gamespy_query.gemspec +2 -0
- data/lib/gamespy_query/base.rb +2 -0
- data/lib/gamespy_query/socket.rb +0 -2
- data/lib/gamespy_query/socket_master.rb +4 -2
- data/lib/gamespy_query/version.rb +1 -1
- metadata +60 -9
data/Gemfile
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/bin/gamespy_query
CHANGED
File without changes
|
data/features/readme.md
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
# Include the spec
|
2
|
+
#require File.join(Rails.root, 'spec/spec_helper')
|
3
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
4
|
+
# in spec/support/ and its subdirectories.
|
5
|
+
Dir[File.join(File.dirname(__FILE__), "../../spec/support/**/*.rb")].each {|f| require f}
|
6
|
+
|
7
|
+
# Include the helper methods for shorthand (create, build etc)
|
8
|
+
#World(FactoryGirl::Syntax::Methods)
|
data/gamespy_query.gemspec
CHANGED
data/lib/gamespy_query/base.rb
CHANGED
data/lib/gamespy_query/socket.rb
CHANGED
@@ -40,8 +40,6 @@ module GamespyQuery
|
|
40
40
|
RX_CHALLENGE2 = /[^0-9\-]/si
|
41
41
|
RX_SPLITNUM = /^splitnum\x00(.)/i
|
42
42
|
|
43
|
-
PLATFORM_IR = /-mswin32/
|
44
|
-
|
45
43
|
# TODO: Support pings
|
46
44
|
# TODO: Handle .NET native sockets
|
47
45
|
STATE_INIT, STATE_SENT_CHALLENGE, STATE_RECEIVED_CHALLENGE, STATE_SENT_CHALLENGE_RESPONSE, STATE_RECEIVE_DATA, STATE_READY = 0, 1, 2, 3, 4, 5
|
@@ -73,7 +73,7 @@ module GamespyQuery
|
|
73
73
|
# @param [String] game Game to fetch info from
|
74
74
|
# @param [String] geo Geo location enabled?
|
75
75
|
# @param [Array] remote Hostname and path+filename strings if the list needs to be fetched from http server
|
76
|
-
def process_master(game = "arma2oapc", geo = nil, remote = nil)
|
76
|
+
def process_master(game = "arma2oapc", geo = nil, remote = nil, sm_dedicated_only = true)
|
77
77
|
master = GamespyQuery::Master.new(geo, game)
|
78
78
|
list = if remote
|
79
79
|
Net::HTTP.start(remote[0]) do |http|
|
@@ -86,7 +86,9 @@ module GamespyQuery
|
|
86
86
|
|
87
87
|
dat = master.process list
|
88
88
|
|
89
|
-
|
89
|
+
ded = "1"
|
90
|
+
gm_dat = sm_dedicated_only ? dat.keys.select{|k| dat[k][:gamedata] && dat[k][:gamedata][:dedicated] == ded } : dat.keys
|
91
|
+
sm = GamespyQuery::SocketMaster.new(gm_dat)
|
90
92
|
sockets = sm.process!
|
91
93
|
sockets.select{|s| s.valid? }.each do |s|
|
92
94
|
begin
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gamespy_query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.0pre5
|
5
5
|
prerelease: 5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cri
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: riot
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,10 +37,47 @@ dependencies:
|
|
32
37
|
version: '0'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: cucumber
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
36
78
|
- !ruby/object:Gem::Dependency
|
37
79
|
name: yard
|
38
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
39
81
|
none: false
|
40
82
|
requirements:
|
41
83
|
- - ! '>='
|
@@ -43,7 +85,12 @@ dependencies:
|
|
43
85
|
version: '0'
|
44
86
|
type: :development
|
45
87
|
prerelease: false
|
46
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
47
94
|
description: ''
|
48
95
|
email:
|
49
96
|
- sb@dev-heaven.net
|
@@ -57,6 +104,10 @@ files:
|
|
57
104
|
- README.md
|
58
105
|
- Rakefile
|
59
106
|
- bin/gamespy_query
|
107
|
+
- features/master/sync.feature
|
108
|
+
- features/readme.md
|
109
|
+
- features/support/rspec.rb
|
110
|
+
- features/sync.feature
|
60
111
|
- gamespy_query.gemspec
|
61
112
|
- lib/gamespy_query.rb
|
62
113
|
- lib/gamespy_query/base.rb
|
@@ -93,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
144
|
version: 1.3.1
|
94
145
|
requirements: []
|
95
146
|
rubyforge_project: gamespy_query
|
96
|
-
rubygems_version: 1.8.
|
147
|
+
rubygems_version: 1.8.24
|
97
148
|
signing_key:
|
98
149
|
specification_version: 3
|
99
150
|
summary: Ruby library for accessing Gamespy services
|