envoy-proxy 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 653ed7ebaa842b40f329a34754539a9c326f8f8f
4
- data.tar.gz: 3ee7586014a9316cc56b631759182f37f1773639
3
+ metadata.gz: f046303684c4123875d44395258679379b41ae60
4
+ data.tar.gz: e318d631b838ba50ea2cb626c991a962bd39c089
5
5
  SHA512:
6
- metadata.gz: 825edec8c8e964babb787e658f98f287fdb692c3f3c176ba0a77d7dde3f55c1637e35c8d808c229c944a70e5c7c7ed0d4149a69345bd48db8b30919c88d66afb
7
- data.tar.gz: b34400b75094589a1665117bc49d74c9d082c4f8a95dd90bbc32b7528e58a1dc4c1376969027d5534a0dfac8da9b9a115444b235acdff811261c97b0cc4ef90d
6
+ metadata.gz: c7cea9a76c8294b8464a423440cb7063a86f1ba01dcb32776ea0398db334508d72b46efc3e7021051936d0c9b6e3b16dfd346a9fa0ca5ba49102bd5fe4bbf525
7
+ data.tar.gz: 74a4c7259958459bc27bfdcc2f913455821109468c7c360b7e26021b546d9f3a2740157cc9698145e061377bfa0a2bfd59add3de1451e2bf27f02acb86075e75
@@ -1,9 +1,17 @@
1
1
  require 'envoy/server/trunk'
2
2
  require 'envoy/server/web'
3
+ require 'optparse'
3
4
 
4
- unless ARGV[0]
5
- puts "Usage: #{$0} [ZONE]"
6
- abort
5
+ listen = []
6
+
7
+ OptionParser.new do |op|
8
+ op.banner = "Usage: #{$0} [options] ZONE"
9
+ op.on "-l", "--listen ADDRESS", "Listen on this [host:]port for HTTP" do |v|
10
+ port, host = v.split(":").reverse
11
+ listen = [host || "0.0.0", port]
12
+ end
13
+ op.parse!
14
+ op.abort "zone required" unless ARGV[0]
7
15
  end
8
16
 
9
17
  $zone = ARGV[0]
@@ -11,7 +19,7 @@ $zone = ARGV[0]
11
19
  unless EM.reactor_running?
12
20
  EM.run do
13
21
  EM.start_server "0.0.0.0", 8282, Envoy::Server::Trunk
14
- EM.start_server "0.0.0.0", 8181, Envoy::Server::Web
22
+ EM.start_server *listen, Envoy::Server::Web
15
23
  end
16
24
  end
17
25
 
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Envoy
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: envoy-proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Baum