harbr 0.1.90 → 0.1.93

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: 8725acf75c96beb16ee94a28406b4e4040ba23ac237f8557201d6e5b9b6b4a0d
4
- data.tar.gz: 1d51afda07c47c961c9a80c2f0fe86764f986435e929b73a2e01a0c64f8249d0
3
+ metadata.gz: 1f5082149e0be0577bcf732277c35f36094149b9d6ef964f9973fb57a510716b
4
+ data.tar.gz: 5bf6d0eadcb16de62fc84e2891a29ef7cff23824c2715db922f8570acec99b62
5
5
  SHA512:
6
- metadata.gz: 179b61c61e156ca1ac250e8c89a65e53ad0c9f3542829b4e8553cc2f82706183ad8f41acdabcec5b2a5a86a928202a85a3e7fbc301ce5b328e431f0dd97b952e
7
- data.tar.gz: dda122a929cb874348df5403faac53aa1b4b999403d6ce7639e86ae6b46bdd8f4829fb8836e7b7b09c8a46a938400d4465498a2a10eefd7fbd5c84c20c888cda
6
+ metadata.gz: '08bfab977f8e4085d7b39d0f312c5f48a11b3574c2154ff4baf24bcb0108f6d008d72ffb92b22f33581a2ff1591f016cdfd537f8b79a9143a591772b413b7970'
7
+ data.tar.gz: 7af2a943cc1a4835a720104c99bcb299ccaca9755d6efeea4b95ce67c46bc28d467fd4e9c6e5a06f0ef02ca4b3989d485fc828eae57663835b253151deaee7b4
data/lib/harbr/job.rb CHANGED
@@ -68,12 +68,19 @@ module Harbr
68
68
  containers.create(container) unless containers.find_by_header(host_header_alias)
69
69
 
70
70
  if(container.name.start_with?("live"))
71
+
72
+ plain_name = host_header_alias.gsub("live.","")
71
73
  container = Harbr::Container.new
72
- container.name = "#{name} -> #{host_header_alias.gsub("live","")}"
73
- container.host_header = host_header_alias.gsub("live","")
74
+ container.name = "#{name} -> #{plain_name}"
75
+ container.host_header = remove_dot_from_string(plain_name)
74
76
  container.ip = "127.0.0.1"
75
77
  container.port = port
76
- containers.create(container) unless containers.find_by_header(host_header_alias)
78
+
79
+
80
+ unless containers.find_by_header(container.host_header)
81
+ containers.create(container)
82
+ end
83
+
77
84
  end
78
85
 
79
86
  end
@@ -82,6 +89,8 @@ module Harbr
82
89
  containers.all
83
90
  end
84
91
 
92
+
93
+
85
94
  def write_to_file(path, contents)
86
95
  dirname = File.dirname(path)
87
96
  FileUtils.mkdir_p(dirname) unless File.directory?(dirname)
@@ -107,6 +116,10 @@ module Harbr
107
116
 
108
117
  private
109
118
 
119
+ def remove_dot_from_string(str)
120
+ str.gsub('.', '')
121
+ end
122
+
110
123
  def check_file_exists(path)
111
124
  sleep_times = [1, 3, 5, 8, 23]
112
125
  begin
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.90"
4
+ VERSION = "0.1.93"
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.90
4
+ version: 0.1.93
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke