harbr 0.0.46 → 0.0.47

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: e2164649b0b281b8017df5056a3ef74739d412faf069feed4acfaefeb385e5a9
4
- data.tar.gz: 8c62663cac838d3024e1122d8d46e4e21ed849ced953d277c2c621bec5fb3701
3
+ metadata.gz: 36d0a81d239615b4b500f1a023092a3d3c5a48fe74a374f18aa67bcb973f6350
4
+ data.tar.gz: 910a0749f2d7b6d42a56a5412265331db2d0569d97438ac94007133df7050349
5
5
  SHA512:
6
- metadata.gz: a43f17c1da021032b3ec5bc6e6207cfcd04b4ec6c6f37ff7a3150b2fb44f31563b91b4408823c02b25cbd6cc1e8f46a1776954d3265402e925f1333add330ca9
7
- data.tar.gz: 49e6d74aa0177a6a6592172c2e9e1cdd473afa08cd2f685a2c9037e92e6b044b381d251da138d75b1bd982fade15ad6af6c438a435c95befe32dfbaad8c1e65e
6
+ metadata.gz: 2f66afbedb36d891c8c15eb6a226cfb910c78a1da144024c42e062ed564b68bde97dc0e3b7be9b0f8d5418aa5b385ab7d69991e05c8d866626b1a162c6c61a58
7
+ data.tar.gz: fdda56a308cfb15bf06432d59855204682d77cd208840add292a95385a8969d5a6b110338866b352e791c2ce571cec91249f712362b17973959d8a2e22332e8d
data/exe/harbr CHANGED
@@ -4,13 +4,7 @@ require_relative "../lib/harbr"
4
4
  class HarbrCLI < Thor
5
5
 
6
6
  no_commands do
7
- def load_manifest(container,version)
8
- manifest_path = "/var/harbr/#{container}/versions/#{version}/config/manifest.yml"
9
- raise "Manifest not found at #{manifest_path}" unless File.exist?(manifest_path)
10
- manifest_data = YAML.load_file(manifest_path)
11
- OpenStruct.new(manifest_data)
12
- end
13
-
7
+
14
8
  def display_containers_table(containers)
15
9
  return puts "No containers available." if containers.empty?
16
10
 
@@ -74,10 +68,11 @@ class HarbrCLI < Thor
74
68
  end
75
69
 
76
70
  def run_tasks(container, version)
77
- puts "Running tasks for container: '#{container}', Version: '#{version}'"
78
- manifest = load_manifest(container, version)
79
- puts "Manifest: #{manifest}"
80
- Harbr::Job.perform_async(manifest)
71
+ puts "Running tasks for container: #{container}, version: #{version}"
72
+ puts "waiting for 10 seconds"
73
+ sleep 10
74
+ puts "done waiting"
75
+ Harbr::Job.perform_async(container, version)
81
76
  end
82
77
  end
83
78
 
data/lib/harbr/job.rb CHANGED
@@ -1,6 +1,14 @@
1
1
  module Harbr
2
2
  class Job
3
3
  include SuckerPunch::Job
4
+
5
+ def load_manifest(container,version)
6
+ manifest_path = "/var/harbr/#{container}/versions/#{version}/config/manifest.yml"
7
+ raise "Manifest not found at #{manifest_path}" unless File.exist?(manifest_path)
8
+ manifest_data = YAML.load_file(manifest_path)
9
+ OpenStruct.new(manifest_data)
10
+ end
11
+
4
12
  def create_traefik_config(containers)
5
13
  config = {
6
14
  "http" => {
@@ -102,7 +110,10 @@ module Harbr
102
110
  create_traefik_config(containers.all)
103
111
  end
104
112
 
105
- def perform(manifest)
113
+ def perform(container, version)
114
+ puts "Running tasks for container: '#{container}', Version: '#{version}'"
115
+ manifest = load_manifest(container, version)
116
+ puts "Manifest: #{manifest}"
106
117
  run_container(manifest)
107
118
  end
108
119
  end
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.46"
4
+ VERSION = "0.0.47"
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.0.46
4
+ version: 0.0.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke