harbr 0.0.24 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/harbr +1 -1
- data/lib/harbr/version.rb +1 -1
- data/lib/harbr.rb +8 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5eb9a36d658e6c4715dc48f90ffa37d0071fa6d7ab428bc75d65265682967781
|
4
|
+
data.tar.gz: 0aee4e5465e2b316d1b7f59a208fca76cd7371f4bdad5c556af1cc3e8fc05b70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fd1075768db252ca5bc6709bf3a381cff6318f0ddc2154d2bfae56215932f0c13addfd264897571d0d066658c67b2761cf2054402b0a883171835a1f6c4e54c
|
7
|
+
data.tar.gz: f984d372db4321ed1ccdf1f96579eecda24e47a4df24470ae7bc3005ca656055bea943ee1a234263553ea7a932d63e738ff1ba26dc4de5772120b6af27258e6f
|
data/exe/harbr
CHANGED
@@ -34,7 +34,7 @@ class HarbrCLI < Thor
|
|
34
34
|
headers = ["Name", "Host Header", "IP", "Port"]
|
35
35
|
|
36
36
|
rows = containers.map do |container|
|
37
|
-
[container.name, container.host_header, container.ip, container.port]
|
37
|
+
[container.name, container.host_header, container.ip.nil? ? "127.0.0.1" : container.ip , container.port]
|
38
38
|
end
|
39
39
|
|
40
40
|
table = ::Terminal::Table.new(headings: headers, rows: rows)
|
data/lib/harbr/version.rb
CHANGED
data/lib/harbr.rb
CHANGED
@@ -19,12 +19,6 @@ module Harbr
|
|
19
19
|
class Error < StandardError; end
|
20
20
|
|
21
21
|
class Container
|
22
|
-
|
23
|
-
queries do
|
24
|
-
def find_by_header(host_header)
|
25
|
-
all.find { |container| container.host_header.downcase == host_header.downcase }
|
26
|
-
end
|
27
|
-
end
|
28
22
|
class Job
|
29
23
|
include SuckerPunch::Job
|
30
24
|
|
@@ -111,7 +105,7 @@ module Harbr
|
|
111
105
|
|
112
106
|
container.name = manifest.name
|
113
107
|
container.host_header = manifest.host
|
114
|
-
container.ip = manifest.ip
|
108
|
+
container.ip = manifest.ip.nil?
|
115
109
|
container.port = port.number
|
116
110
|
containers.add(container) unless containers.find_by_header(manifest.host)
|
117
111
|
|
@@ -125,6 +119,13 @@ module Harbr
|
|
125
119
|
|
126
120
|
include Dddr::Entity
|
127
121
|
attr_accessor :name, :host_header, :ip, :port
|
122
|
+
|
123
|
+
queries do
|
124
|
+
def find_by_header(host_header)
|
125
|
+
all.find { |container| container.host_header.downcase == host_header.downcase }
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
128
129
|
end
|
129
130
|
|
130
131
|
class Port
|