takelage 0.27.0 → 0.27.1
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 +4 -4
- data/README.md +30 -28
- data/lib/takelage.rb +4 -4
- data/lib/takelage/info/status/bar.rb +106 -0
- data/lib/takelage/info/status/cli.rb +13 -13
- data/lib/takelage/version +1 -1
- metadata +2 -2
- data/lib/takelage/info/status/header.rb +0 -106
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 689104aead67286437fded2a138c0a043f9eb9604a7a44375df45a5f9d66de68
|
4
|
+
data.tar.gz: 91fe52a44bfc3025b284ae155879a1c5d948a34baba5fc2a903c376c8996062e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 948586185c0cf2b448d3ad14d49c80742e73e5517d545cbd951908d062ceb2a1aec0e2404c86deec18e8b916c597dc246e2129b21e165986ed5cb55b367f1c89
|
7
|
+
data.tar.gz: 82c8e74a3e9673707f0ca2ce1cb865e73bff2282208ac0d76b8ba21eed04e6cefc07b84080faeaafa10bd34e324beafb2e5537ebd7a6a6e809e40dd0342bad43
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
[](https://github.com/geospin-takelage/takelage-cli/blob/main/LICENSE)
|
2
|
+
[](https://rubygems.org/gems/takelage)
|
3
|
+
[](https://github.com/geospin-takelage/takelage-cli/actions/workflows/build_test_deploy_project_on_push.yml)
|
4
|
+
[](https://github.com/geospin-takelage/takelage-cli/actions/workflows/test_project_nightly.yml)
|
4
5
|
|
5
6
|
# takelage-cli
|
6
7
|
|
@@ -14,20 +15,30 @@ The *takelage-cli* executable *tau* is a
|
|
14
15
|
command line script using the
|
15
16
|
[thor](http://whatisthor.com/) toolkit.
|
16
17
|
|
17
|
-
## Framework
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| *[takelage-
|
24
|
-
| *[takelage-
|
25
|
-
| *[takelage-
|
26
|
-
| *[takelage-
|
27
|
-
| *[takelage-
|
28
|
-
| *[takelage-img-
|
29
|
-
|
30
|
-
|
18
|
+
## Framework Versions
|
19
|
+
|
20
|
+
| App | Artifact |
|
21
|
+
| --- | -------- |
|
22
|
+
| *[takelage-doc](https://github.com/geospin-takelage/takelage-doc)* | [](https://github.com/geospin-takelage/takelage-doc/blob/main/LICENSE) |
|
23
|
+
| *[takelage-dev](https://github.com/geospin-takelage/takelage-dev)* | [](https://hub.docker.com/r/takelage/takelage) |
|
24
|
+
| *[takelage-cli](https://github.com/geospin-takelage/takelage-cli)* | [](https://rubygems.org/gems/takelage) |
|
25
|
+
| *[takelage-var](https://github.com/geospin-takelage/takelage-var)* | [](https://pypi.org/project/takeltest/) |
|
26
|
+
| *[takelage-bit](https://github.com/geospin-takelage/takelage-bit)* | [](https://hub.docker.com/r/takelage/bitboard) |
|
27
|
+
| *[takelage-img-takelslim](https://github.com/geospin-takelage/takelage-img-takelslim)* | [](https://hub.docker.com/r/takelage/takelslim) |
|
28
|
+
| *[takelage-img-takelbase](https://github.com/geospin-takelage/takelage-img-takelbase)* | [](https://hub.docker.com/r/takelage/takelbase) |
|
29
|
+
| *[takelage-img-multipostgres](https://github.com/geospin-takelage/takelage-img-multipostgres)* | [](https://hub.docker.com/r/takelage/multipostgres) |
|
30
|
+
|
31
|
+
## Framework Status
|
32
|
+
|
33
|
+
| App | Deploy project | Test project | Test roles |
|
34
|
+
| --- | -------------- | ------------ | ---------- |
|
35
|
+
| *[takelage-dev](https://github.com/geospin-takelage/takelage-dev)* | [](https://github.com/geospin-takelage/takelage-dev/actions/workflows/build_test_deploy_project_on_push.yml) | [](https://github.com/geospin-takelage/takelage-dev/actions/workflows/build_test_project_nightly.yml) | [](https://github.com/geospin-takelage/takelage-dev/actions/workflows/build_test_roles_nightly.yml) |
|
36
|
+
| *[takelage-cli](https://github.com/geospin-takelage/takelage-cli)* | [](https://github.com/geospin-takelage/takelage-cli/actions/workflows/build_test_deploy_project_on_push.yml) | [](https://github.com/geospin-takelage/takelage-cli/actions/workflows/test_project_nightly.yml) |
|
37
|
+
| *[takelage-var](https://github.com/geospin-takelage/takelage-var)* | [](https://github.com/geospin-takelage/takelage-var/actions/workflows/build_test_deploy_project_on_push.yml) | [](https://github.com/geospin-takelage/takelage-var/actions/workflows/build_test_project_nightly.yml) |
|
38
|
+
| *[takelage-bit](https://github.com/geospin-takelage/takelage-bit)* | [](https://github.com/geospin-takelage/takelage-bit/actions/workflows/build_test_deploy_project_on_push.yml) | [](https://github.com/geospin-takelage/takelage-bit/actions/workflows/build_test_project_nightly.yml) | [](https://github.com/geospin-takelage/takelage-bit/actions/workflows/build_test_roles_nightly.yml) |
|
39
|
+
| *[takelage-img-takelslim](https://github.com/geospin-takelage/takelage-img-takelslim)* | [](https://github.com/geospin-takelage/takelage-img-takelslim/actions/workflows/build_deploy_takelslim_nightly.yml) |
|
40
|
+
| *[takelage-img-takelbase](https://github.com/geospin-takelage/takelage-img-takelbase)* | [](https://github.com/geospin-takelage/takelage-img-takelbase/actions/workflows/build_deploy_takelbase_nightly.yml) |
|
41
|
+
| *[takelage-img-multipostgres](https://github.com/geospin-takelage/takelage-img-multipostgres)* | [](https://github.com/geospin-takelage/takelage-img-multipostgres/actions/workflows/build_deploy_multipostgres_nightly.yml) |
|
31
42
|
|
32
43
|
## Installation
|
33
44
|
|
@@ -94,7 +105,7 @@ tau [info project private](features/cucumber/features/info/info.project.private.
|
|
94
105
|
tau [info status git](features/cucumber/features/info/info.status.git.feature) | Check git status info
|
95
106
|
tau [info status gopass](features/cucumber/features/info/info.status.gopass.feature) | Check gopass status info
|
96
107
|
tau [info status gpg](features/cucumber/features/info/info.status.gpg.feature) | Check gpg status info
|
97
|
-
tau [info status
|
108
|
+
tau [info status bar](features/cucumber/features/info/info.status.bar.feature) | Print status info bar
|
98
109
|
tau [info status ssh](features/cucumber/features/info/info.status.ssh.feature) | Check ssh status info
|
99
110
|
tau [self config active](features/cucumber/features/self/self.config.active.feature) | Print active takelage configuration
|
100
111
|
tau [self config default](features/cucumber/features/self/self.config.default.feature) | Print takelage default configuration
|
@@ -112,7 +123,7 @@ tau project | Alias for tau [info project active](features/cucumber/features/inf
|
|
112
123
|
tau prune | Alias for tau [docker container prune](features/cucumber/features/docker/docker.container.prune.feature)
|
113
124
|
tau pull | Alias for tau [bit clipboard pull](features/cucumber/features/bit/bit.clipboard.pull.feature)
|
114
125
|
tau push | Alias for tau [bit clipboard push](features/cucumber/features/bit/bit.clipboard.push.feature)
|
115
|
-
tau status | Alias for tau [docker info status
|
126
|
+
tau status | Alias for tau [docker info status bar](features/cucumber/features/info/info.status.bar.feature)
|
116
127
|
tau update | Alias for tau [docker image update](features/cucumber/features/docker/docker.image.update.feature)
|
117
128
|
tau version | Alias for tau [self version](features/cucumber/features/self/self.version.feature)
|
118
129
|
|
@@ -149,15 +160,6 @@ bit_remote: 'ssh://bit@bit.example.com:222:/bit'
|
|
149
160
|
bit_ssh: 'ssh -p 222 bit@bit.example.com'
|
150
161
|
```
|
151
162
|
|
152
|
-
- By default, takelage uses bright prompt colors which are best viewed on a
|
153
|
-
dark background. If you prefer a light background (or want less bright colors)
|
154
|
-
you can add an option to your *~/.takelage.yml*:
|
155
|
-
|
156
|
-
```yaml
|
157
|
-
---
|
158
|
-
docker_daynight: 'day'
|
159
|
-
```
|
160
|
-
|
161
163
|
- If you want to pin a specific docker tag for one of your projects
|
162
164
|
then create an *takelage.yml* file with:
|
163
165
|
|
data/lib/takelage.rb
CHANGED
@@ -76,7 +76,7 @@ require_relative 'takelage/info/status/git'
|
|
76
76
|
require_relative 'takelage/info/status/gopass'
|
77
77
|
require_relative 'takelage/info/status/gpg'
|
78
78
|
require_relative 'takelage/info/status/ssh'
|
79
|
-
require_relative 'takelage/info/status/
|
79
|
+
require_relative 'takelage/info/status/bar'
|
80
80
|
require_relative 'takelage/info/status/cli'
|
81
81
|
require_relative 'takelage/info/project/cli'
|
82
82
|
require_relative 'takelage/info/cli'
|
@@ -210,10 +210,10 @@ module Takelage
|
|
210
210
|
Takelage::BitClipboard.new.push
|
211
211
|
end
|
212
212
|
|
213
|
-
desc 'status', 'Alias for tau info status
|
214
|
-
# takelage status: {takelage::InfoStatus#
|
213
|
+
desc 'status', 'Alias for tau info status bar'
|
214
|
+
# takelage status: {takelage::InfoStatus#bar}
|
215
215
|
def status
|
216
|
-
Takelage::InfoStatus.new.
|
216
|
+
Takelage::InfoStatus.new.bar
|
217
217
|
end
|
218
218
|
|
219
219
|
desc 'update', 'Alias for tau docker image update'
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# takelage info status bar
|
4
|
+
module InfoStatusBar
|
5
|
+
# Backend method for info status bar.
|
6
|
+
# @return [String] status info bar
|
7
|
+
# rubocop:disable Metrics/MethodLength
|
8
|
+
def info_status_bar
|
9
|
+
log.debug 'Get status info bar'
|
10
|
+
|
11
|
+
@bar_list = []
|
12
|
+
|
13
|
+
_info_status_bar_takelage
|
14
|
+
_info_status_bar_tau
|
15
|
+
_info_status_bar_git
|
16
|
+
_info_status_bar_gopass
|
17
|
+
_info_status_bar_gpg
|
18
|
+
_info_status_bar_ssh
|
19
|
+
|
20
|
+
bar = @bar_list.join(' | ')
|
21
|
+
log.debug "status info bar: #{bar}"
|
22
|
+
bar
|
23
|
+
end
|
24
|
+
# rubocop:enable Metrics/MethodLength
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
# Add takelage version info to bar
|
29
|
+
def _info_status_bar_takelage
|
30
|
+
takelage_version_file = '/etc/takelage_version'
|
31
|
+
return unless _file_exists? takelage_version_file
|
32
|
+
|
33
|
+
_file_read takelage_version_file
|
34
|
+
@bar_list << "takelage: #{@content_file.chomp.green}"
|
35
|
+
end
|
36
|
+
|
37
|
+
# Add tau version info to bar
|
38
|
+
def _info_status_bar_tau
|
39
|
+
@bar_list << "tau: #{Takelage::VERSION.green}"
|
40
|
+
end
|
41
|
+
|
42
|
+
# Add git status info to bar
|
43
|
+
def _info_status_bar_git
|
44
|
+
@status_git = info_status_git
|
45
|
+
@bar_list << ("git: #{@status_git ? 'ok'.green : 'no'.red}")
|
46
|
+
end
|
47
|
+
|
48
|
+
# Add gopass status info to bar
|
49
|
+
def _info_status_bar_gopass
|
50
|
+
@status_gopass = info_status_gopass
|
51
|
+
@bar_list << ("gopass: #{@status_gopass ? 'ok'.green : 'no'.red}")
|
52
|
+
end
|
53
|
+
|
54
|
+
# Add gpg status info to bar
|
55
|
+
def _info_status_bar_gpg
|
56
|
+
if @status_git || @status_gopass
|
57
|
+
@bar_list << "gpg: #{'ok'.green}"
|
58
|
+
return
|
59
|
+
end
|
60
|
+
|
61
|
+
@bar_list << ("gpg: #{info_status_gpg ? 'ok'.green : 'no'.red}")
|
62
|
+
end
|
63
|
+
|
64
|
+
# Add ssh status info to bar
|
65
|
+
def _info_status_bar_ssh
|
66
|
+
@bar_list << ("ssh: #{info_status_ssh ? 'ok'.green : 'no'.red}")
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Amend String class with colorization
|
71
|
+
class String
|
72
|
+
# Colorize strings
|
73
|
+
def colorize(color_code)
|
74
|
+
"\e[#{color_code}m#{self}\e[0m"
|
75
|
+
end
|
76
|
+
|
77
|
+
# String color red
|
78
|
+
def red
|
79
|
+
colorize(31)
|
80
|
+
end
|
81
|
+
|
82
|
+
# String color green
|
83
|
+
def green
|
84
|
+
colorize(32)
|
85
|
+
end
|
86
|
+
|
87
|
+
# String color yellow
|
88
|
+
def yellow
|
89
|
+
colorize(33)
|
90
|
+
end
|
91
|
+
|
92
|
+
# String color blue
|
93
|
+
def blue
|
94
|
+
colorize(34)
|
95
|
+
end
|
96
|
+
|
97
|
+
# String color pink
|
98
|
+
def pink
|
99
|
+
colorize(35)
|
100
|
+
end
|
101
|
+
|
102
|
+
# String color light_blue
|
103
|
+
def light_blue
|
104
|
+
colorize(36)
|
105
|
+
end
|
106
|
+
end
|
@@ -13,7 +13,19 @@ module Takelage
|
|
13
13
|
include InfoStatusGopass
|
14
14
|
include InfoStatusGPG
|
15
15
|
include InfoStatusSSH
|
16
|
-
include
|
16
|
+
include InfoStatusBar
|
17
|
+
|
18
|
+
#
|
19
|
+
# info status bar
|
20
|
+
#
|
21
|
+
desc 'bar', 'Print status info bar'
|
22
|
+
long_desc <<-LONGDESC.gsub("\n", "\x5")
|
23
|
+
Print status info bar
|
24
|
+
LONGDESC
|
25
|
+
# Print status info bar.
|
26
|
+
def bar
|
27
|
+
say info_status_bar
|
28
|
+
end
|
17
29
|
|
18
30
|
#
|
19
31
|
# info status git
|
@@ -51,18 +63,6 @@ module Takelage
|
|
51
63
|
exit info_status_gpg
|
52
64
|
end
|
53
65
|
|
54
|
-
#
|
55
|
-
# info status header
|
56
|
-
#
|
57
|
-
desc 'header', 'Print status info header'
|
58
|
-
long_desc <<-LONGDESC.gsub("\n", "\x5")
|
59
|
-
Print status info header
|
60
|
-
LONGDESC
|
61
|
-
# Print status info header.
|
62
|
-
def header
|
63
|
-
say info_status_header
|
64
|
-
end
|
65
|
-
|
66
66
|
#
|
67
67
|
# info status ssh
|
68
68
|
#
|
data/lib/takelage/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.27.
|
1
|
+
0.27.1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: takelage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.27.
|
4
|
+
version: 0.27.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geospin
|
@@ -259,11 +259,11 @@ files:
|
|
259
259
|
- lib/takelage/git/cli.rb
|
260
260
|
- lib/takelage/info/cli.rb
|
261
261
|
- lib/takelage/info/project/cli.rb
|
262
|
+
- lib/takelage/info/status/bar.rb
|
262
263
|
- lib/takelage/info/status/cli.rb
|
263
264
|
- lib/takelage/info/status/git.rb
|
264
265
|
- lib/takelage/info/status/gopass.rb
|
265
266
|
- lib/takelage/info/status/gpg.rb
|
266
|
-
- lib/takelage/info/status/header.rb
|
267
267
|
- lib/takelage/info/status/lib.rb
|
268
268
|
- lib/takelage/info/status/ssh.rb
|
269
269
|
- lib/takelage/lib/config.rb
|
@@ -1,106 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# takelage info status header
|
4
|
-
module InfoStatusHeader
|
5
|
-
# Backend method for info status header.
|
6
|
-
# @return [String] status info header
|
7
|
-
# rubocop:disable Metrics/MethodLength
|
8
|
-
def info_status_header
|
9
|
-
log.debug 'Get status info header'
|
10
|
-
|
11
|
-
@header_list = []
|
12
|
-
|
13
|
-
_info_status_header_takelage
|
14
|
-
_info_status_header_tau
|
15
|
-
_info_status_header_git
|
16
|
-
_info_status_header_gopass
|
17
|
-
_info_status_header_gpg
|
18
|
-
_info_status_header_ssh
|
19
|
-
|
20
|
-
header = @header_list.join(' | ')
|
21
|
-
log.debug "status info header: #{header}"
|
22
|
-
header
|
23
|
-
end
|
24
|
-
# rubocop:enable Metrics/MethodLength
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
# Add takelage version info to header
|
29
|
-
def _info_status_header_takelage
|
30
|
-
takelage_version_file = '/etc/takelage_version'
|
31
|
-
return unless _file_exists? takelage_version_file
|
32
|
-
|
33
|
-
_file_read takelage_version_file
|
34
|
-
@header_list << "takelage: #{@content_file.chomp.green}"
|
35
|
-
end
|
36
|
-
|
37
|
-
# Add tau version info to header
|
38
|
-
def _info_status_header_tau
|
39
|
-
@header_list << "tau: #{Takelage::VERSION.green}"
|
40
|
-
end
|
41
|
-
|
42
|
-
# Add git status info to header
|
43
|
-
def _info_status_header_git
|
44
|
-
@status_git = info_status_git
|
45
|
-
@header_list << ("git: #{@status_git ? 'ok'.green : 'no'.red}")
|
46
|
-
end
|
47
|
-
|
48
|
-
# Add gopass status info to header
|
49
|
-
def _info_status_header_gopass
|
50
|
-
@status_gopass = info_status_gopass
|
51
|
-
@header_list << ("gopass: #{@status_gopass ? 'ok'.green : 'no'.red}")
|
52
|
-
end
|
53
|
-
|
54
|
-
# Add gpg status info to header
|
55
|
-
def _info_status_header_gpg
|
56
|
-
if @status_git || @status_gopass
|
57
|
-
@header_list << "gpg: #{'ok'.green}"
|
58
|
-
return
|
59
|
-
end
|
60
|
-
|
61
|
-
@header_list << ("gpg: #{info_status_gpg ? 'ok'.green : 'no'.red}")
|
62
|
-
end
|
63
|
-
|
64
|
-
# Add ssh status info to header
|
65
|
-
def _info_status_header_ssh
|
66
|
-
@header_list << ("ssh: #{info_status_ssh ? 'ok'.green : 'no'.red}")
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
# Amend String class with colorization
|
71
|
-
class String
|
72
|
-
# Colorize strings
|
73
|
-
def colorize(color_code)
|
74
|
-
"\e[#{color_code}m#{self}\e[0m"
|
75
|
-
end
|
76
|
-
|
77
|
-
# String color red
|
78
|
-
def red
|
79
|
-
colorize(31)
|
80
|
-
end
|
81
|
-
|
82
|
-
# String color green
|
83
|
-
def green
|
84
|
-
colorize(32)
|
85
|
-
end
|
86
|
-
|
87
|
-
# String color yellow
|
88
|
-
def yellow
|
89
|
-
colorize(33)
|
90
|
-
end
|
91
|
-
|
92
|
-
# String color blue
|
93
|
-
def blue
|
94
|
-
colorize(34)
|
95
|
-
end
|
96
|
-
|
97
|
-
# String color pink
|
98
|
-
def pink
|
99
|
-
colorize(35)
|
100
|
-
end
|
101
|
-
|
102
|
-
# String color light_blue
|
103
|
-
def light_blue
|
104
|
-
colorize(36)
|
105
|
-
end
|
106
|
-
end
|