takeltau 0.40.9 → 0.41.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -12
- data/lib/takeltau/default.yml +1 -0
- data/lib/takeltau/info/status/arch.rb +31 -0
- data/lib/takeltau/info/status/bar.rb +16 -1
- data/lib/takeltau/info/status/cli.rb +16 -0
- data/lib/takeltau/info/status/ssh.rb +4 -4
- data/lib/takeltau/mutagen/check/daemon.rb +4 -4
- data/lib/takeltau/version +1 -1
- data/lib/takeltau.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82ad019d443524a013c70c212f0a82326fbf0a7f152ab37d57ba0250211309f5
|
4
|
+
data.tar.gz: 71e84ee82573fd3ff5a380b771a210982bc2a615254da7434086ebe14d0e4c4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9206e3b4df25bfb6aed32c96f2b66b8c105a08a05db311208fa8a01ed9c1cbb554bd01380ab6582e9831b2eb4bd2f6c9492460cd97727d091840b6756c3f5c2c
|
7
|
+
data.tar.gz: 5424ce363fcf56c890a131ea91adf885469959d077ed7d0af5efc83a98ecc9359ca2d3365d522d03e66b95332c8098f6f4c55dd08f27183f62eea477143a66f8
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
[![license](https://img.shields.io/github/license/takelwerk/takelage-cli?color=blueviolet)](https://github.com/takelwerk/takelage-cli/blob/main/LICENSE)
|
2
2
|
[![rubygems.org](https://img.shields.io/gem/v/takeltau?label=rubygems.org&color=blue)](https://rubygems.org/gems/takeltau)
|
3
|
-
[![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-cli/
|
4
|
-
[![test project](https://img.shields.io/github/workflow/status/takelwerk/takelage-cli/
|
3
|
+
[![deploy project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-cli/build_test_deploy_project_on_push.yml?label=deploy%20project)](https://github.com/takelwerk/takelage-cli/actions/workflows/build_test_deploy_project_on_push.yml)
|
4
|
+
[![test project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-cli/test_project_nightly.yml?label=test%20project)](https://github.com/takelwerk/takelage-cli/actions/workflows/test_project_nightly.yml)
|
5
5
|
|
6
6
|
# takelage-cli
|
7
7
|
|
@@ -33,14 +33,14 @@ command line script using the
|
|
33
33
|
|
34
34
|
| App | Deploy project | Test project | Test roles | Deploy vbox |
|
35
35
|
| --- | -------------- | ------------ | ---------- | ----------- |
|
36
|
-
| *[takelage-dev](https://github.com/takelwerk/takelage-dev)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-dev/
|
37
|
-
| *[takelage-pad](https://github.com/takelwerk/takelage-pad)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-pad/
|
38
|
-
| *[takelage-cli](https://github.com/takelwerk/takelage-cli)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-cli/
|
39
|
-
| *[takelage-var](https://github.com/takelwerk/takelage-var)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-var/
|
40
|
-
| *[takelage-img-takelslim](https://github.com/takelwerk/takelage-img-takelslim)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-img-takelslim/
|
41
|
-
| *[takelage-img-takelbase](https://github.com/takelwerk/takelage-img-takelbase)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-img-takelbase/
|
42
|
-
| *[takelage-img-takelruby](https://github.com/takelwerk/takelage-img-takelruby)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-img-takelruby/
|
43
|
-
| *[takelage-vagrant-takelbase](https://github.com/takelwerk/takelage-vagrant-takelbase)* | [![deploy vbox](https://img.shields.io/github/workflow/status/takelwerk/takelage-vagrant-takelbase/
|
36
|
+
| *[takelage-dev](https://github.com/takelwerk/takelage-dev)* | [![deploy project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-dev/build_test_deploy_project_on_push.yml?label=deploy%20project)](https://github.com/takelwerk/takelage-dev/actions/workflows/build_test_deploy_project_on_push.yml) | [![test project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-dev/build_test_project_nightly.yml?label=test%20project)](https://github.com/takelwerk/takelage-dev/actions/workflows/build_test_project_nightly.yml) | [![test roles](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-dev/build_test_roles_nightly.yml?label=test%20roles)](https://github.com/takelwerk/takelage-dev/actions/workflows/build_test_roles_nightly.yml) |
|
37
|
+
| *[takelage-pad](https://github.com/takelwerk/takelage-pad)* | [![deploy project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-pad/build_test_deploy_project_on_push.yml?label=deploy%20project)](https://github.com/takelwerk/takelage-pad/actions/workflows/build_test_deploy_project_on_push.yml) | [![test project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-pad/build_test_project_nightly.yml?label=test%20project)](https://github.com/takelwerk/takelage-pad/actions/workflows/build_test_project_nightly.yml) | [![test roles](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-pad/build_test_roles_nightly.yml?label=test%20roles)](https://github.com/takelwerk/takelage-pad/actions/workflows/build_test_roles_nightly.yml) | [![deploy vbox](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-pad/build_deploy_project_vbox_on_push.yml?label=deploy%20vbox)](https://github.com/takelwerk/takelage-pad/actions/workflows/build_deploy_project_vbox_on_push.yml) |
|
38
|
+
| *[takelage-cli](https://github.com/takelwerk/takelage-cli)* | [![deploy project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-cli/build_test_deploy_project_on_push.yml?label=deploy%20project)](https://github.com/takelwerk/takelage-cli/actions/workflows/build_test_deploy_project_on_push.yml) | [![test project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-cli/test_project_nightly.yml?label=test%20project)](https://github.com/takelwerk/takelage-cli/actions/workflows/test_project_nightly.yml) |
|
39
|
+
| *[takelage-var](https://github.com/takelwerk/takelage-var)* | [![deploy project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-var/build_test_deploy_project_on_push.yml?label=deploy%20project)](https://github.com/takelwerk/takelage-var/actions/workflows/build_test_deploy_project_on_push.yml) | [![test project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-var/build_test_project_nightly.yml?label=test%20project)](https://github.com/takelwerk/takelage-var/actions/workflows/build_test_project_nightly.yml) |
|
40
|
+
| *[takelage-img-takelslim](https://github.com/takelwerk/takelage-img-takelslim)* | [![deploy project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-img-takelslim/build_deploy_takelslim_nightly.yml?label=deploy%20project)](https://github.com/takelwerk/takelage-img-takelslim/actions/workflows/build_deploy_takelslim_nightly.yml) |
|
41
|
+
| *[takelage-img-takelbase](https://github.com/takelwerk/takelage-img-takelbase)* | [![deploy project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-img-takelbase/build_deploy_takelbase_nightly.yml?label=deploy%20project)](https://github.com/takelwerk/takelage-img-takelbase/actions/workflows/build_deploy_takelbase_nightly.yml) |
|
42
|
+
| *[takelage-img-takelruby](https://github.com/takelwerk/takelage-img-takelruby)* | [![deploy project](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-img-takelruby/build_deploy_takelruby_nightly.yml?label=deploy%20project)](https://github.com/takelwerk/takelage-img-takelruby/actions/workflows/build_deploy_takelruby_nightly.yml) |
|
43
|
+
| *[takelage-vagrant-takelbase](https://github.com/takelwerk/takelage-vagrant-takelbase)* | [![deploy vbox](https://img.shields.io/github/actions/workflow/status/takelwerk/takelage-vagrant-takelbase/build_and_deploy_virtualbox_nightly.yml?label=deploy%20vbox)](https://github.com/takelwerk/takelage-vagrant-takelbase/actions/workflows/build_and_deploy_virtualbox_nightly.yml) |
|
44
44
|
|
45
45
|
## Installation
|
46
46
|
|
@@ -62,8 +62,8 @@ You are encouraged to read the cucumber feature files
|
|
62
62
|
for the *tau* commands
|
63
63
|
to get an idea of how the commands work.
|
64
64
|
You can list the *tau* commands by running
|
65
|
-
*tau [self
|
66
|
-
or *tau
|
65
|
+
*tau [self commands](features/cucumber/features/self/self.commands.feature)*
|
66
|
+
or *tau commands*:
|
67
67
|
|
68
68
|
Command | Description
|
69
69
|
------- | -----------
|
@@ -92,6 +92,7 @@ tau [info project dir](features/cucumber/features/info/info.project.dir.feature)
|
|
92
92
|
tau [info project main](features/cucumber/features/info/info.project.main.feature) | Print main project info
|
93
93
|
tau [info project private](features/cucumber/features/info/info.project.private.feature) | Print private project info
|
94
94
|
tau [info status bar](features/cucumber/features/info/info.status.bar.feature) | Print status bar
|
95
|
+
tau [info status arch](features/cucumber/features/info/info.status.arch.feature) | Check arch status
|
95
96
|
tau [info status git](features/cucumber/features/info/info.status.git.feature) | Check git status
|
96
97
|
tau [info status gopass](features/cucumber/features/info/info.status.gopass.feature) | Check gopass status
|
97
98
|
tau [info status gpg](features/cucumber/features/info/info.status.gpg.feature) | Check gpg status
|
data/lib/takeltau/default.yml
CHANGED
@@ -34,6 +34,7 @@ cmd_info_status_lib_git_name: 'git -C %{root} config user.name'
|
|
34
34
|
cmd_info_status_lib_git_email: 'git -C %{root} config user.email'
|
35
35
|
cmd_info_status_lib_git_signingkey: 'git -C %{root} config user.signingKey'
|
36
36
|
cmd_info_status_lib_git_key_available: 'gpg --list-key %{key}'
|
37
|
+
cmd_info_status_arch_get_arch: 'arch'
|
37
38
|
cmd_info_status_gopass_root_store: 'gopass config | grep "path" | cut -d " " -f 2'
|
38
39
|
cmd_info_status_gpg_agent: 'gpg-connect-agent /bye'
|
39
40
|
cmd_info_status_gpg_keys: 'gpg --list-keys'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# tau info status arch
|
4
|
+
module InfoStatusArch
|
5
|
+
# Backend method for info status arch.
|
6
|
+
# @return [String] get cpu architecture
|
7
|
+
def info_status_arch
|
8
|
+
log.debug 'Get cpu architecture'
|
9
|
+
|
10
|
+
architecture = _info_status_arch_get_architecture.to_sym
|
11
|
+
# rubocop:disable Naming/VariableNumber
|
12
|
+
architectures = { arm64: 'arm64', aarch64: 'arm64', x86_64: 'amd64' }
|
13
|
+
# rubocop:enable Naming/VariableNumber
|
14
|
+
unless architectures.key? architecture
|
15
|
+
log.error 'cpu architecture unknown'
|
16
|
+
return false
|
17
|
+
end
|
18
|
+
|
19
|
+
arch = architectures[architecture]
|
20
|
+
log.debug "CPU architecture is #{arch}"
|
21
|
+
arch
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
# Get gopass root store
|
27
|
+
def _info_status_arch_get_architecture
|
28
|
+
cmd_get_arch = config.active['cmd_info_status_arch_get_arch']
|
29
|
+
(run cmd_get_arch).chomp
|
30
|
+
end
|
31
|
+
end
|
@@ -13,12 +13,13 @@ module InfoStatusBar
|
|
13
13
|
|
14
14
|
_info_status_bar_takelage
|
15
15
|
_info_status_bar_tau
|
16
|
+
_info_status_bar_arch
|
16
17
|
_info_status_bar_git
|
17
18
|
_info_status_bar_gopass
|
18
19
|
_info_status_bar_gpg
|
19
20
|
_info_status_bar_hg
|
20
|
-
_info_status_bar_mutagen
|
21
21
|
_info_status_bar_ssh
|
22
|
+
_info_status_bar_mutagen
|
22
23
|
|
23
24
|
say @bar_list.join(' | ')
|
24
25
|
@bar_status
|
@@ -40,6 +41,20 @@ module InfoStatusBar
|
|
40
41
|
@bar_list << "tau: #{Takeltau::VERSION.green}"
|
41
42
|
end
|
42
43
|
|
44
|
+
# Add architecture info to bar.
|
45
|
+
def _info_status_bar_arch
|
46
|
+
arch = info_status_arch
|
47
|
+
if arch == false
|
48
|
+
@status_arch = false
|
49
|
+
architecture = 'unknown'.red
|
50
|
+
else
|
51
|
+
@status_arch = true
|
52
|
+
architecture = arch.green
|
53
|
+
end
|
54
|
+
@bar_status &&= @status_arch
|
55
|
+
@bar_list << "arch: #{architecture}"
|
56
|
+
end
|
57
|
+
|
43
58
|
# Add git status info to bar.
|
44
59
|
def _info_status_bar_git
|
45
60
|
@status_git = info_status_git
|
@@ -13,6 +13,7 @@ module Takeltau
|
|
13
13
|
include DockerContainerLib
|
14
14
|
include GitCheckWorkspace
|
15
15
|
include InfoStatusLib
|
16
|
+
include InfoStatusArch
|
16
17
|
include InfoStatusGit
|
17
18
|
include InfoStatusGopass
|
18
19
|
include InfoStatusGPG
|
@@ -45,6 +46,21 @@ module Takeltau
|
|
45
46
|
exit info_status_bar
|
46
47
|
end
|
47
48
|
|
49
|
+
#
|
50
|
+
# info status arch
|
51
|
+
#
|
52
|
+
desc 'arch', 'Check arch status info'
|
53
|
+
long_desc <<-LONGDESC.gsub("\n", "\x5")
|
54
|
+
Check arch status info
|
55
|
+
LONGDESC
|
56
|
+
# Check arch status info.
|
57
|
+
def arch
|
58
|
+
arch = info_status_arch
|
59
|
+
exit false if arch == false
|
60
|
+
say arch
|
61
|
+
true
|
62
|
+
end
|
63
|
+
|
48
64
|
#
|
49
65
|
# info status git
|
50
66
|
#
|
@@ -16,13 +16,13 @@ module InfoStatusSSH
|
|
16
16
|
return false
|
17
17
|
end
|
18
18
|
|
19
|
-
unless
|
20
|
-
log.error '
|
19
|
+
unless _info_status_ssh_keys
|
20
|
+
log.error 'ssh keys are not available'
|
21
21
|
return false
|
22
22
|
end
|
23
23
|
|
24
|
-
unless
|
25
|
-
log.error 'ssh
|
24
|
+
unless _file_exists? gpg_ssh_socket
|
25
|
+
log.error 'gpg ssh socket is not available'
|
26
26
|
return false
|
27
27
|
end
|
28
28
|
|
@@ -25,13 +25,13 @@ module MutagenCheckDaemon
|
|
25
25
|
return true
|
26
26
|
end
|
27
27
|
|
28
|
-
unless
|
29
|
-
log.error '
|
28
|
+
unless _mutagen_check_daemon_host_connection
|
29
|
+
log.error 'A mutagen host connection is not available'
|
30
30
|
return false
|
31
31
|
end
|
32
32
|
|
33
|
-
unless
|
34
|
-
log.error '
|
33
|
+
unless _file_exists? config.active['mutagen_socket_path_mutagen_container']
|
34
|
+
log.error 'The mutagen socket path in the container is not available'
|
35
35
|
return false
|
36
36
|
end
|
37
37
|
|
data/lib/takeltau/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.41.0
|
data/lib/takeltau.rb
CHANGED
@@ -68,6 +68,7 @@ require_relative 'takeltau/mutagen/socket/list'
|
|
68
68
|
require_relative 'takeltau/mutagen/socket/cli'
|
69
69
|
require_relative 'takeltau/mutagen/cli'
|
70
70
|
require_relative 'takeltau/info/status/lib'
|
71
|
+
require_relative 'takeltau/info/status/arch'
|
71
72
|
require_relative 'takeltau/info/status/git'
|
72
73
|
require_relative 'takeltau/info/status/gopass'
|
73
74
|
require_relative 'takeltau/info/status/gpg'
|
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.
|
4
|
+
version: 0.41.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takelwerk
|
@@ -239,6 +239,7 @@ files:
|
|
239
239
|
- lib/takeltau/hg/push.rb
|
240
240
|
- lib/takeltau/info/cli.rb
|
241
241
|
- lib/takeltau/info/project/cli.rb
|
242
|
+
- lib/takeltau/info/status/arch.rb
|
242
243
|
- lib/takeltau/info/status/bar.rb
|
243
244
|
- lib/takeltau/info/status/cli.rb
|
244
245
|
- lib/takeltau/info/status/git.rb
|