gamespy_query 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ GamespyQuery
2
+ =============
3
+
4
+ This library provides access to GameSpy master server (through gslist utility) and to GameSpy enabled game servers directly through UDPSocket.
@@ -15,7 +15,7 @@ module GamespyQuery
15
15
  end
16
16
 
17
17
  def geoip_path
18
- return "" unless defined?(Rails)
18
+ return File.join(Dir.pwd, "config") unless defined?(Rails)
19
19
 
20
20
  case RUBY_PLATFORM
21
21
  when /-mingw32$/, /-mswin32$/
@@ -38,10 +38,10 @@ module GamespyQuery
38
38
  geo = @geo ? @geo : "-Q 11 "
39
39
  unless File.exists?(File.join(geoip_path, "GeoIP.dat"))
40
40
  puts
41
- puts "Warning: GeoIP.dat database missing. Can't parse countries. #{GEOIP_PATH}"
41
+ puts "Warning: GeoIP.dat database missing. Can't parse countries. #{geoip_path}"
42
42
  geo = nil
43
43
  end
44
- reply = %x[gslist -p "#{GEOIP_PATH}" -n #{@game} #{geo}-X #{PARAMS.clone.map{|e| "#{DELIMIT}#{e}"}.join("")}]
44
+ reply = %x[gslist -p "#{geoip_path}" -n #{@game} #{geo}-X #{PARAMS.clone.map{|e| "#{DELIMIT}#{e}"}.join("")}]
45
45
  reply.gsub!("\\\\\\", "") if geo
46
46
  reply.split("\n")
47
47
  end
@@ -1,3 +1,3 @@
1
1
  module GamespyQuery
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  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.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -20,6 +20,7 @@ extra_rdoc_files: []
20
20
  files:
21
21
  - .gitignore
22
22
  - Gemfile
23
+ - README.md
23
24
  - Rakefile
24
25
  - gamespy_query.gemspec
25
26
  - lib/gamespy_query.rb