goat 0.3.18 → 0.3.19
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.
- data/bin/state-srv +14 -2
- data/goat.gemspec +1 -1
- data/lib/goat/goat.js +2 -2
- metadata +4 -4
data/bin/state-srv
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'eventmachine'
|
5
5
|
require 'json'
|
6
|
+
require 'optparse'
|
6
7
|
require 'set'
|
7
8
|
require 'term/ansicolor'
|
8
9
|
|
@@ -355,7 +356,7 @@ module Goat
|
|
355
356
|
include EM::P::LineText2
|
356
357
|
include Goat::JSONMessages
|
357
358
|
|
358
|
-
def self.start(host
|
359
|
+
def self.start(host, port)
|
359
360
|
EM.start_server(host, port, self)
|
360
361
|
end
|
361
362
|
|
@@ -397,8 +398,19 @@ module Goat
|
|
397
398
|
end
|
398
399
|
end
|
399
400
|
|
401
|
+
$host = '127.0.0.1'
|
402
|
+
$port = 8011
|
403
|
+
|
404
|
+
OptionParser.new do |opts|
|
405
|
+
# this is the second jankiest optparser I've ever used
|
406
|
+
opts.on('-pMANDATORY', Integer) {|r| $port = r}
|
407
|
+
opts.on('-HMANDATORY', String) {|h| $host = h}
|
408
|
+
opts.on('-v') {} # suppress optparse wanting to use -v as version
|
409
|
+
opts.on('-h') {usage; exit 1}
|
410
|
+
end.parse!(ARGV)
|
411
|
+
|
400
412
|
Goat.announce_launch('state-srv')
|
401
413
|
EM.run do
|
402
414
|
Goat::StateSrv::Sweeper.start
|
403
|
-
Goat::StateSrv::RecvServer.start
|
415
|
+
Goat::StateSrv::RecvServer.start($host, $port)
|
404
416
|
end
|
data/goat.gemspec
CHANGED
data/lib/goat/goat.js
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 53
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 19
|
10
|
+
version: 0.3.19
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Patrick Collison
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-12-06 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|