takeltau 0.38.0 → 0.38.1

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: 5a5ea68fdc1d3340cb871a3abdd21675c99508c0b5ac0095e3c2cfe675bf983e
4
- data.tar.gz: 561785ba66192b34f594165be501296afc90825a889559fb2ff5f02e2637db89
3
+ metadata.gz: 0e8150c32b54f9b2c4e94e2814dbe6b74327f24720ed6f2b8554dfbb39d80f49
4
+ data.tar.gz: 861e643d2b18ff92415383306a1118b68bdd4a9ab59011c5579261c58a9221b1
5
5
  SHA512:
6
- metadata.gz: 0bcdb05348ba4b8e416a9326578301f8518ef8b51dc74ec822b7547a27dde30f5a712f14bf5cd05495fd44fbf9d94a30abb55659ff143768612e03717d495425
7
- data.tar.gz: 576340ebafa4c5bb4f170aee9d9bffb2e30aec58ab4d669bfcd66b2ef18f76d885bd41e7d825561a9921fe4eee262fe9833bbe8e76bf040ed13ee3801e1bb373
6
+ metadata.gz: 3c10d3e74ef0ed8bf7052884dee6326f0b5ae007708dc5cfc9a2213295ece10f67347154126ecdc5794d01da384e5171f3edffa35d496225ef7dbbd0cf1f093d
7
+ data.tar.gz: 9ebcb11b7bc216d638d9a14cb7b75c49379289e0653a27eda4fae5a1ae5abe8ec8212eb6bd9158a0d82111e7ccbf70d6048bc738eda5466acc27d1693b246ff9
@@ -9,6 +9,7 @@ module InfoStatusBar
9
9
  log.debug 'Get status info bar'
10
10
 
11
11
  @bar_list = []
12
+ @bar_status = true
12
13
 
13
14
  _info_status_bar_takelage
14
15
  _info_status_bar_tau
@@ -19,9 +20,8 @@ module InfoStatusBar
19
20
  _info_status_bar_mutagen
20
21
  _info_status_bar_ssh
21
22
 
22
- bar = @bar_list.join(' | ')
23
- log.debug "status info bar: #{bar}"
24
- bar
23
+ say @bar_list.join(' | ')
24
+ @bar_status
25
25
  end
26
26
  # rubocop:enable Metrics/MethodLength
27
27
 
@@ -30,7 +30,10 @@ module InfoStatusBar
30
30
  # Add takelage version info to bar.
31
31
  def _info_status_bar_takelage
32
32
  takelage_version_file = '/etc/takelage_version'
33
- return unless _file_exists? takelage_version_file
33
+ unless _file_exists? takelage_version_file
34
+ @bar_status = false
35
+ return false
36
+ end
34
37
 
35
38
  _file_read takelage_version_file
36
39
  @bar_list << "#{config.active['docker_repo']}: #{@content_file.chomp.green}"
@@ -44,12 +47,14 @@ module InfoStatusBar
44
47
  # Add git status info to bar.
45
48
  def _info_status_bar_git
46
49
  @status_git = info_status_git
50
+ @bar_status &&= @status_git
47
51
  @bar_list << ("git: #{@status_git ? 'ok'.green : 'no'.red}")
48
52
  end
49
53
 
50
54
  # Add gopass status info to bar.
51
55
  def _info_status_bar_gopass
52
56
  @status_gopass = info_status_gopass
57
+ @bar_status &&= @status_gopass
53
58
  @bar_list << ("gopass: #{@status_gopass ? 'ok'.green : 'no'.red}")
54
59
  end
55
60
 
@@ -60,23 +65,30 @@ module InfoStatusBar
60
65
  return
61
66
  end
62
67
 
63
- @bar_list << ("gpg: #{info_status_gpg ? 'ok'.green : 'no'.red}")
68
+ status_gpg = info_status_gpg
69
+ @bar_status &&= status_gpg
70
+ @bar_list << ("gpg: #{status_gpg ? 'ok'.green : 'no'.red}")
64
71
  end
65
72
 
66
73
  # Add git status info to bar.
67
74
  def _info_status_bar_hg
68
75
  @status_hg = info_status_hg
76
+ @bar_status &&= @status_hg
69
77
  @bar_list << ("hg: #{@status_hg ? 'ok'.green : 'no'.red}")
70
78
  end
71
79
 
72
80
  # Add mutagen status info to bar.
73
81
  def _info_status_bar_mutagen
74
- @bar_list << ("mutagen: #{mutagen_check_daemon ? 'ok'.green : 'no'.red}")
82
+ status_mutagen = mutagen_check_daemon
83
+ @bar_status &&= status_mutagen
84
+ @bar_list << ("mutagen: #{status_mutagen ? 'ok'.green : 'no'.red}")
75
85
  end
76
86
 
77
87
  # Add ssh status info to bar.
78
88
  def _info_status_bar_ssh
79
- @bar_list << ("ssh: #{info_status_ssh ? 'ok'.green : 'no'.red}")
89
+ status_ssh = info_status_ssh
90
+ @bar_status &&= status_ssh
91
+ @bar_list << ("ssh: #{status_ssh ? 'ok'.green : 'no'.red}")
80
92
  end
81
93
  end
82
94
 
@@ -42,7 +42,7 @@ module Takeltau
42
42
  LONGDESC
43
43
  # Print status info bar.
44
44
  def bar
45
- say info_status_bar
45
+ exit info_status_bar
46
46
  end
47
47
 
48
48
  #
data/lib/takeltau/version CHANGED
@@ -1 +1 @@
1
- 0.38.0
1
+ 0.38.1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: takeltau
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.38.0
4
+ version: 0.38.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takelwerk