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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bf43c388ba400dbb6f749a1e5849b4b19caaf54c172a598bbe3abb6b009d0f9
4
- data.tar.gz: 77853307c0b34b99e4d610cf8d55a9f3cc944d819022ddbf1183ae326895fcc1
3
+ metadata.gz: 5eb9a36d658e6c4715dc48f90ffa37d0071fa6d7ab428bc75d65265682967781
4
+ data.tar.gz: 0aee4e5465e2b316d1b7f59a208fca76cd7371f4bdad5c556af1cc3e8fc05b70
5
5
  SHA512:
6
- metadata.gz: d97ad5384477376bd00dedff98e59a2e0bb8ea2cfe2529609b65e576a533a1ff2ec0a3f530209637245218a0e26233fac47b1214124ae766eb5812265300a908
7
- data.tar.gz: 5c3c1e3cf128de073a8278c09a7ee376f5181ccb3c00c88ce07240d49fd87a6b8706a02b40e3296684451bbf70a8b39f97f1a7dac734faa8f257ffcb8c122578
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Harbr
4
- VERSION = "0.0.24"
4
+ VERSION = "0.0.26"
5
5
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harbr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke