hammer_cli_foreman_tasks 0.0.3 → 0.0.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d182a6a9c8a0d4e1e1b7cf35c2c337c74837cc5e
|
4
|
+
data.tar.gz: be2862123efeece0f4d76b273380ae87d4e7d361
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f7d47d2c5eaec1c18daab8208de068c4e9f9ae957e635b8b0841dcd7a1c3596c471787859236880ac72024a6b107327d54faff7077faa0d49e698ea366b818b
|
7
|
+
data.tar.gz: 1360456aba178ab4ba9d36f48f886f3760d46bf52c63d918faa06eef275bd3bc6529be55209158fe563c0bb588cc6abd93da563f6cb78121004a54b2fe6e6f6f
|
@@ -11,11 +11,7 @@ module HammerCLIForemanTasks
|
|
11
11
|
|
12
12
|
def render
|
13
13
|
update_task
|
14
|
-
|
15
|
-
render_progress
|
16
|
-
else
|
17
|
-
render_result
|
18
|
-
end
|
14
|
+
render_progress
|
19
15
|
end
|
20
16
|
|
21
17
|
private
|
@@ -24,7 +20,7 @@ module HammerCLIForemanTasks
|
|
24
20
|
progress_bar do |bar|
|
25
21
|
begin
|
26
22
|
while true
|
27
|
-
bar.show(:msg =>
|
23
|
+
bar.show(:msg => progress_message, :done => @task['progress'].to_f, :total => 1)
|
28
24
|
if task_pending?
|
29
25
|
sleep interval
|
30
26
|
update_task
|
@@ -38,8 +34,11 @@ module HammerCLIForemanTasks
|
|
38
34
|
end
|
39
35
|
end
|
40
36
|
|
37
|
+
def progress_message
|
38
|
+
"Task #{@task_id} #{task_pending? ? @task['state'] : @task['result']}"
|
39
|
+
end
|
40
|
+
|
41
41
|
def render_result
|
42
|
-
puts "Task %{uuid}: %{result}" % { :uuid => @task_id, :result => @task['result'] }
|
43
42
|
unless @task['humanized']['output'].to_s.empty?
|
44
43
|
puts @task['humanized']['output']
|
45
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_foreman_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: powerbar
|
@@ -54,7 +54,7 @@ files:
|
|
54
54
|
- lib/hammer_cli_foreman_tasks/task.rb
|
55
55
|
- lib/hammer_cli_foreman_tasks/task_progress.rb
|
56
56
|
- lib/hammer_cli_foreman_tasks/version.rb
|
57
|
-
homepage: https://github.com/
|
57
|
+
homepage: https://github.com/theforeman/hammer-cli-foreman-tasks
|
58
58
|
licenses:
|
59
59
|
- GPL-3
|
60
60
|
metadata: {}
|