envoy-proxy 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/envoy/client/command.rb +7 -3
- data/lib/envoy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e84778b171d38b9693f61cd2490bec3650f4026
|
4
|
+
data.tar.gz: a1a0b52a364eec28d5350d419e40b6019b948d16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e14e3f5d3e6c1757d292cd0af67b385265b2c07446a385a203b13b1e148658a54be532d90f4e57023ad620fa97111cc6da874a9c0befd4209730afa76db880fc
|
7
|
+
data.tar.gz: c8cf6bb97571ac0bdf8fc3a11e9767eff3a0c10672b802bfa05ca0f5e73cc614beca990520c5579408c304458e83edfaee3ed41d8f390438cc77a9850676cf9a
|
data/lib/envoy/client/command.rb
CHANGED
@@ -16,8 +16,12 @@ def find_config
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def load_config
|
19
|
-
|
20
|
-
|
19
|
+
if path = find_config
|
20
|
+
conf = YAML.load(File.read(path))
|
21
|
+
conf.is_a?(Array) ? conf : [conf]
|
22
|
+
else
|
23
|
+
[{}]
|
24
|
+
end
|
21
25
|
end
|
22
26
|
|
23
27
|
options = parse_options
|
@@ -27,7 +31,7 @@ unless EM.reactor_running?
|
|
27
31
|
load_config.each do |config|
|
28
32
|
config["local_port"] ||= rand(16383) + 49152
|
29
33
|
config = options.merge(config)
|
30
|
-
config["hosts"] ||= [config.delete("host")]
|
34
|
+
config["hosts"] ||= [config.delete("host")] if config["host"]
|
31
35
|
config = config.each_with_object({}) do |(k, v), h|
|
32
36
|
h[k.to_sym] = v
|
33
37
|
end
|
data/lib/envoy/version.rb
CHANGED