gamespy_query 0.2.0pre5 → 0.2.0pre6

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.
@@ -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, sm_dedicated_only = true)
76
+ def process_master(game = "arma2oapc", geo = nil, remote = nil, dedicated_only = false, 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|
@@ -87,7 +87,7 @@ module GamespyQuery
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
90
+ gm_dat = dedicated_only || sm_dedicated_only ? dat.keys.select{|k| dat[k][:gamedata] && dat[k][:gamedata][:dedicated] == ded } : dat.keys
91
91
  sm = GamespyQuery::SocketMaster.new(gm_dat)
92
92
  sockets = sm.process!
93
93
  sockets.select{|s| s.valid? }.each do |s|
@@ -101,7 +101,7 @@ module GamespyQuery
101
101
  end
102
102
  end
103
103
 
104
- dat.values
104
+ dedicated_only ? gm_dat : dat.values
105
105
  end
106
106
  end
107
107
  end
@@ -1,4 +1,4 @@
1
1
  module GamespyQuery
2
2
  # Version of the library
3
- VERSION = "0.2.0pre5"
3
+ VERSION = "0.2.0pre6"
4
4
  end
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.0pre5
4
+ version: 0.2.0pre6
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors: