harbr 0.1.74 → 0.1.75
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/harbr/job.rb +18 -11
- data/lib/harbr/version.rb +1 -1
- 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: 435fad22a3618a2b57938a9550bafdc259672ca3379d893317278df466548ec5
|
4
|
+
data.tar.gz: 0e723967c914e25962c32d7741ca1cd01226db9dba05c9d6d769f4d397c1a3a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70946062d22034a0a370ed9364cdde7ff9c13855832e405e7955806f768383be95eac3a101b45f43d4f2360f58235209384d1b87128ca72cce16f0cd77f5ebaf
|
7
|
+
data.tar.gz: ebffe2fda61381e9bcfccf97c5f430808434bd330c4e96342023c90d9eacf806d7f0036f85471a78181b6e4c8b607c4f22de57d160da4bb8e351c3acedee53af
|
data/lib/harbr/job.rb
CHANGED
@@ -42,23 +42,30 @@ module Harbr
|
|
42
42
|
def collate_containers(name, host, port, host_header_aliases = [])
|
43
43
|
containers = Harbr::Container::Repository.new
|
44
44
|
container = containers.find_by_header(host)
|
45
|
-
|
46
|
-
host_header_aliases << host
|
47
|
-
|
45
|
+
|
48
46
|
if container.nil?
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
end
|
47
|
+
container = Harbr::Container.new
|
48
|
+
container.name = name
|
49
|
+
container.host_header = host
|
50
|
+
container.ip = "127.0.0.1"
|
51
|
+
container.port = port
|
52
|
+
containers.create(container)
|
53
|
+
|
57
54
|
else
|
58
55
|
container.port = port
|
59
56
|
containers.update(container)
|
60
57
|
end
|
61
58
|
|
59
|
+
host_header_aliases.each do |host_header_alias|
|
60
|
+
container = Harbr::Container.new
|
61
|
+
container.name = "#{name} -> #{host_header_alias}"
|
62
|
+
container.host_header = host_header_alias
|
63
|
+
container.ip = "127.0.0.1"
|
64
|
+
container.port = port
|
65
|
+
containers.create(container) unless containers.find_by_header(host_header_alias)
|
66
|
+
end
|
67
|
+
|
68
|
+
|
62
69
|
containers.all
|
63
70
|
end
|
64
71
|
|
data/lib/harbr/version.rb
CHANGED