harbr 0.1.75 → 0.1.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 435fad22a3618a2b57938a9550bafdc259672ca3379d893317278df466548ec5
4
- data.tar.gz: 0e723967c914e25962c32d7741ca1cd01226db9dba05c9d6d769f4d397c1a3a8
3
+ metadata.gz: 5a4a2abcb20f4f5f4cda10bb5119ba0ea4ede93c124bb3ce019ab96a6bc82724
4
+ data.tar.gz: a03482d061a02ce738c000835c36aa9c1e26445b5fdb7122fe0c76ea0d5f8363
5
5
  SHA512:
6
- metadata.gz: 70946062d22034a0a370ed9364cdde7ff9c13855832e405e7955806f768383be95eac3a101b45f43d4f2360f58235209384d1b87128ca72cce16f0cd77f5ebaf
7
- data.tar.gz: ebffe2fda61381e9bcfccf97c5f430808434bd330c4e96342023c90d9eacf806d7f0036f85471a78181b6e4c8b607c4f22de57d160da4bb8e351c3acedee53af
6
+ metadata.gz: 1fb0a4411bb91dec67b9ba5e327d12eb8c2b5a477c06b6817134b10eeb75243e2629e80875966a6b12e4c932543c5ae0dc6d63eed856d736deebaa8ab136f428
7
+ data.tar.gz: f2d9e8d7401b33e42576a4daeb47bd828de5336bf86a99dc3f1f940813cd1394a88e051811ee5843b93907e0c667de247260c7b1a4528410aa60b1fc58e84275
data/exe/harbr CHANGED
@@ -134,12 +134,12 @@ class HarbrCLI < Thor
134
134
  container_repo = Harbr::Container::Repository.new
135
135
 
136
136
  [name, "next.#{name}"].each do |container_name|
137
- container = container_repo.find_by_name(container_name)
138
- if container
137
+ container_repo.get_by_name(container_name).each do |container|
139
138
  `port release #{container.port}`
140
139
  puts "released port #{container.port} successfully."
141
140
  container_repo.delete(container)
142
141
  end
142
+ end
143
143
 
144
144
  `rm -rf /etc/service/#{container_name}`
145
145
  `rm -rf /etc/sv/harbr/#{container_name}`
@@ -1,7 +1,7 @@
1
1
  module Harbr
2
2
  class Container
3
3
  include Dddr::Entity
4
- attr_accessor :name, :host_header, :ip, :port, :host_header_aliases
4
+ attr_accessor :name, :host_header, :ip, :port
5
5
 
6
6
  queries do
7
7
  def find_by_header(host_header)
@@ -11,6 +11,9 @@ module Harbr
11
11
  def find_by_name(name)
12
12
  all.find { |container| container.name.downcase == name.downcase }
13
13
  end
14
+ def get_by_name(name)
15
+ all.select { |container| container.name.downcase.include? name.downcase }
16
+ end
14
17
  end
15
18
  end
16
19
  end
data/lib/harbr/job.rb CHANGED
@@ -139,8 +139,8 @@ module Harbr
139
139
  link_directories(name, version, env)
140
140
  sync_live_data_if_next(name) if env == "next"
141
141
 
142
- containers = collate_containers("#{name}", "#{manifest.host}", port,manifest.host_header_alias) if env == "current"
143
- containers = collate_containers("#{env}.#{name}", "#{env}.#{manifest.host}", port,manifest.host_header_alias.map{|host| "#{env}.#{host}" }) if env == "next"
142
+ containers = collate_containers("#{name}", "#{manifest.host}", port,manifest.host_aliases) if env == "current"
143
+ containers = collate_containers("#{env}.#{name}", "#{env}.#{manifest.host}", port,manifest.host_aliases&.map{|host| "#{env}.#{host}" }) if env == "next"
144
144
 
145
145
  create_traefik_config(containers)
146
146
 
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.1.75"
4
+ VERSION = "0.1.77"
5
5
  end
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.1.75
4
+ version: 0.1.77
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke