harbr 0.1.91 → 0.1.94

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: ee36241a4b9543f75996f57c71459b26d3625e79271d1ab43f2a1a4f55b01991
4
- data.tar.gz: 0ba48da8b26a9965efdfa1d13ed535020255b216ef6878a7353885ea0ae840b4
3
+ metadata.gz: 2c12d70a94d93a674f98400063ed06d8ca6ed5825dd76a11c2d757332489cbb0
4
+ data.tar.gz: 10439e2d4bbd58192cf7ea3d6b68d9f17384e04987b2a972cb649c5cab513ec1
5
5
  SHA512:
6
- metadata.gz: 2e64833ff22558914bd23985a7c1d911337817644aab104b4a38b063b9fb23f1a643c4c506fd3eec1fd15ae8ef671488dc83047f5143540da814f34f61522040
7
- data.tar.gz: 8b7139197c94e90974a69af198a63c8ec16f21827ba20fff38d4fd55b4d2083eb1c1e17b95da1ef024c45a2f51d7a8afcc8c912adabc83e7c8df6ba02ce5ec56
6
+ metadata.gz: 36ef93e13793e7379af5641567dc4c53985ecf3726ff909c7c25dd721c5147adfaeb6c185056eea0cd723be1c03e1b9f418cb843c3dc128c928008c4e759912b
7
+ data.tar.gz: 3cdfa64de1505181668a6f99b7eaf0eb608658b93d4a63142ed64506f739bd844f1170eff3ac7d91cae7b21465d54a505126a81c92ed700622a28a4d63755ed9
data/lib/harbr/job.rb CHANGED
@@ -68,16 +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
78
 
77
- unless containers.find_by_header(host_header_alias.gsub("live",""))
79
+
80
+ unless containers.find_by_header(container.host_header)
78
81
  containers.create(container)
79
82
  end
80
-
83
+
81
84
  end
82
85
 
83
86
  end
@@ -86,6 +89,8 @@ module Harbr
86
89
  containers.all
87
90
  end
88
91
 
92
+
93
+
89
94
  def write_to_file(path, contents)
90
95
  dirname = File.dirname(path)
91
96
  FileUtils.mkdir_p(dirname) unless File.directory?(dirname)
@@ -111,6 +116,10 @@ module Harbr
111
116
 
112
117
  private
113
118
 
119
+ def remove_dot_from_string(str)
120
+ str.sub('.', '')
121
+ end
122
+
114
123
  def check_file_exists(path)
115
124
  sleep_times = [1, 3, 5, 8, 23]
116
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.91"
4
+ VERSION = "0.1.94"
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.91
4
+ version: 0.1.94
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke