vrowser 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/bin/vrowser +18 -1
  3. metadata +69 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
data/bin/vrowser CHANGED
@@ -3,6 +3,7 @@
3
3
  # Author: kimoto
4
4
  require 'vrowser'
5
5
  require 'optparse'
6
+ require 'vrowser/http_daemon'
6
7
 
7
8
  options = {}
8
9
  parser = OptionParser.new{ |opts|
@@ -10,6 +11,11 @@ parser = OptionParser.new{ |opts|
10
11
  opts.on("-f", "--config-file=PATH", "specify config file"){ |v|
11
12
  options[:config_path] = v
12
13
  }
14
+
15
+ opts.on("-h", "--host=HOST", "host"){ |v| options[:host] = v }
16
+ opts.on("-p", "--port=PORT", "port"){ |v| options[:port] = v }
17
+ opts.on("-r", "--document-root=PATH", "root"){ |v| options[:document_root] = v }
18
+
13
19
  }
14
20
  parser.parse!
15
21
 
@@ -29,7 +35,18 @@ Vrowser.load_file(options[:config_path]) do |vrowser|
29
35
  puts vrowser.servers.map(&:name).join($/)
30
36
  when "json"
31
37
  vrowser.active_servers.select(:name, :host, :ping, :num_players, :type, :map, :players).order(:host).map(&:values).to_json.display
38
+ when "daemon"
39
+ unless options[:host] and options[:port] and options[:document_root]
40
+ raise ArgumentError
41
+ end
42
+
43
+ Vrowser::HTTPDaemon.start(
44
+ :Host => options[:host],
45
+ :Port => options[:port],
46
+ :DocumentRoot => options[:document_root],
47
+ :config_path => options[:config_path])
32
48
  else
33
- raise ArgumentError
49
+ raise ArgumentError(sub_command)
34
50
  end
35
51
  end
52
+
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - kimoto
@@ -18,7 +18,7 @@ date: 2012-02-06 00:00:00 +09:00
18
18
  default_executable: vrowser
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: thoughtbot-shoulda
21
+ name: ruby-qstat
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
@@ -28,8 +28,73 @@ dependencies:
28
28
  segments:
29
29
  - 0
30
30
  version: "0"
31
- type: :development
31
+ type: :runtime
32
32
  version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: sequel
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ version: "0"
44
+ type: :runtime
45
+ version_requirements: *id002
46
+ - !ruby/object:Gem::Dependency
47
+ name: retry-handler
48
+ prerelease: false
49
+ requirement: &id003 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ segments:
55
+ - 0
56
+ version: "0"
57
+ type: :runtime
58
+ version_requirements: *id003
59
+ - !ruby/object:Gem::Dependency
60
+ name: i18n
61
+ prerelease: false
62
+ requirement: &id004 !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ segments:
68
+ - 0
69
+ version: "0"
70
+ type: :runtime
71
+ version_requirements: *id004
72
+ - !ruby/object:Gem::Dependency
73
+ name: sqlite3
74
+ prerelease: false
75
+ requirement: &id005 !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ segments:
81
+ - 0
82
+ version: "0"
83
+ type: :runtime
84
+ version_requirements: *id005
85
+ - !ruby/object:Gem::Dependency
86
+ name: thoughtbot-shoulda
87
+ prerelease: false
88
+ requirement: &id006 !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ segments:
94
+ - 0
95
+ version: "0"
96
+ type: :development
97
+ version_requirements: *id006
33
98
  description: Server browser for many games (Left4Dead2, TeamFortress2, etc)
34
99
  email: sub+peerler@gmail.com
35
100
  executables: