takelage 0.26.4 → 0.26.7
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/lib/takelage/bit/check/workspace.rb +1 -1
- data/lib/takelage/bit/scope/cli.rb +1 -1
- data/lib/takelage/default.yml +1 -1
- data/lib/takelage/docker/container/check/existing.rb +1 -1
- data/lib/takelage/docker/container/check/network.rb +1 -1
- data/lib/takelage/docker/image/tag/check.rb +2 -2
- data/lib/takelage/docker/socket/stop.rb +1 -1
- data/lib/takelage/git/check/main.rb +1 -1
- data/lib/takelage/git/check/workspace.rb +9 -7
- data/lib/takelage/info/status/cli.rb +1 -0
- data/lib/takelage/info/status/git.rb +8 -3
- data/lib/takelage/info/status/gopass.rb +3 -3
- data/lib/takelage/info/status/lib.rb +1 -1
- data/lib/takelage/info/status/ssh.rb +9 -1
- data/lib/takelage/version +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c85358aee84b4ad7e8e67c54f106705fa7a81738b800e060472ec27989ea8a33
|
|
4
|
+
data.tar.gz: 1712ed57e584a5a9c6eb3cb30583f9c908abbd9a42a462aa770720a91b0be819
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1724194bc930b8d23c5e5e6395dbc493dde90440752bb3ea0a39539bd705876943b82d12524d8f23b9f682e56a3c0b7b18948d4d8efb6d827b8ec361148c9572
|
|
7
|
+
data.tar.gz: 617b075ad7581e80d3f3ec30c704d24333658d7daa94b893943f98315aeabfbef207cdbe02abf8ea3b0b281a65b4baa03ad89b29036d59e86873bbbd047a5a3b
|
data/lib/takelage/default.yml
CHANGED
|
@@ -56,7 +56,7 @@ cmd_git_check_clean_git_unstaged: 'git diff --exit-code'
|
|
|
56
56
|
cmd_git_check_clean_git_uncommitted: 'git diff --cached --exit-code'
|
|
57
57
|
cmd_git_check_clean_git_status: 'git status --porcelain'
|
|
58
58
|
cmd_git_check_main_git_branch: 'git symbolic-ref HEAD'
|
|
59
|
-
cmd_git_check_workspace_git_repo: 'git -C
|
|
59
|
+
cmd_git_check_workspace_git_repo: 'git -C %{dir} rev-parse'
|
|
60
60
|
cmd_git_check_workspace_pwd: 'pwd'
|
|
61
61
|
cmd_info_status_lib_git_name: 'git -C %{root} config user.name'
|
|
62
62
|
cmd_info_status_lib_git_email: 'git -C %{root} config user.email'
|
|
@@ -9,7 +9,7 @@ module DockerImageTagCheck
|
|
|
9
9
|
|
|
10
10
|
return false unless docker_check_daemon
|
|
11
11
|
|
|
12
|
-
if tag.to_s.
|
|
12
|
+
if tag.to_s.chomp.empty?
|
|
13
13
|
log.warn 'No docker image tag specified'
|
|
14
14
|
return false
|
|
15
15
|
end
|
|
@@ -32,7 +32,7 @@ module DockerImageTagCheck
|
|
|
32
32
|
image: image
|
|
33
33
|
)
|
|
34
34
|
|
|
35
|
-
if (run cmd_docker_images).to_s.
|
|
35
|
+
if (run cmd_docker_images).to_s.chomp.empty?
|
|
36
36
|
log.debug "No docker image \"#{image}\" found"
|
|
37
37
|
return false
|
|
38
38
|
end
|
|
@@ -31,7 +31,7 @@ module DockerSocketStop
|
|
|
31
31
|
# Stop process.
|
|
32
32
|
def _docker_socket_stop_kill_process(process, cmds_start_socket)
|
|
33
33
|
# split processes in process id and process command
|
|
34
|
-
pid_command = process.
|
|
34
|
+
pid_command = process.chomp.split(/ /, 2)
|
|
35
35
|
pid = pid_command[0]
|
|
36
36
|
command = pid_command[1]
|
|
37
37
|
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
module GitCheckWorkspace
|
|
5
5
|
# Backend method for git check workspace.
|
|
6
6
|
# @return [Boolean] is this a git workspace?
|
|
7
|
-
def git_check_workspace
|
|
8
|
-
log.debug
|
|
9
|
-
status_repo = _git_check_workspace_get_status_repo
|
|
10
|
-
dir = _git_check_workspace_get_dir
|
|
7
|
+
def git_check_workspace(dir = _git_check_workspace_get_dir)
|
|
8
|
+
log.debug "Check if \"#{dir}\" is a git workspace"
|
|
9
|
+
status_repo = _git_check_workspace_get_status_repo(dir)
|
|
11
10
|
unless status_repo.exitstatus.zero?
|
|
12
11
|
log.debug "No git workspace found in \"#{dir}\""
|
|
13
12
|
return false
|
|
@@ -18,8 +17,11 @@ module GitCheckWorkspace
|
|
|
18
17
|
private
|
|
19
18
|
|
|
20
19
|
# Get git repository status.
|
|
21
|
-
def _git_check_workspace_get_status_repo
|
|
22
|
-
cmd_git_repo =
|
|
20
|
+
def _git_check_workspace_get_status_repo(dir)
|
|
21
|
+
cmd_git_repo = format(
|
|
22
|
+
config.active['cmd_git_check_workspace_git_repo'],
|
|
23
|
+
dir: dir
|
|
24
|
+
)
|
|
23
25
|
try cmd_git_repo
|
|
24
26
|
end
|
|
25
27
|
|
|
@@ -27,6 +29,6 @@ module GitCheckWorkspace
|
|
|
27
29
|
def _git_check_workspace_get_dir
|
|
28
30
|
cmd_pwd =
|
|
29
31
|
config.active['cmd_git_check_workspace_pwd']
|
|
30
|
-
(run cmd_pwd).
|
|
32
|
+
(run cmd_pwd).chomp
|
|
31
33
|
end
|
|
32
34
|
end
|
|
@@ -11,18 +11,23 @@ module InfoStatusGit
|
|
|
11
11
|
|
|
12
12
|
root = config.active['project_root_dir']
|
|
13
13
|
|
|
14
|
-
if root.
|
|
14
|
+
if root.chomp.empty?
|
|
15
15
|
log.error 'Cannot determine project root directory'
|
|
16
16
|
log.info 'Is there a Rakefile in the project root directory?'
|
|
17
17
|
return false
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
unless git_check_workspace(root)
|
|
21
|
+
log.error 'Project root directory is not a git workspace'
|
|
22
|
+
return false
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
if _info_status_lib_git_name(root).chomp.empty?
|
|
21
26
|
log.error 'git config user.name is not available'
|
|
22
27
|
return false
|
|
23
28
|
end
|
|
24
29
|
|
|
25
|
-
if _info_status_lib_git_email(root).
|
|
30
|
+
if _info_status_lib_git_email(root).chomp.empty?
|
|
26
31
|
log.error 'git config user.email is not available'
|
|
27
32
|
return false
|
|
28
33
|
end
|
|
@@ -8,9 +8,9 @@ module InfoStatusGopass
|
|
|
8
8
|
def info_status_gopass
|
|
9
9
|
log.debug 'Check gopass status'
|
|
10
10
|
|
|
11
|
-
root = _info_status_gopass_root_store
|
|
11
|
+
root = _info_status_gopass_root_store
|
|
12
12
|
|
|
13
|
-
if root.
|
|
13
|
+
if root.chomp.empty?
|
|
14
14
|
log.error 'gopass root store not found'
|
|
15
15
|
return false
|
|
16
16
|
end
|
|
@@ -32,6 +32,6 @@ module InfoStatusGopass
|
|
|
32
32
|
# Get gopass root store
|
|
33
33
|
def _info_status_gopass_root_store
|
|
34
34
|
cmd_gopass_root_store = config.active['cmd_info_status_gopass_root_store']
|
|
35
|
-
run cmd_gopass_root_store
|
|
35
|
+
(run cmd_gopass_root_store).chomp
|
|
36
36
|
end
|
|
37
37
|
end
|
|
@@ -8,7 +8,15 @@ module InfoStatusSSH
|
|
|
8
8
|
def info_status_ssh
|
|
9
9
|
log.debug 'Check ssh status'
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
ssh_auth_sock = ENV['SSH_AUTH_SOCK']
|
|
12
|
+
gpg_ssh_socket = _socket_get_agent_ssh_socket_path
|
|
13
|
+
|
|
14
|
+
unless ssh_auth_sock == gpg_ssh_socket
|
|
15
|
+
log.error 'ssh does not use gpg ssh socket'
|
|
16
|
+
return false
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
unless _file_exists? gpg_ssh_socket
|
|
12
20
|
log.error 'gpg ssh socket is not available'
|
|
13
21
|
return false
|
|
14
22
|
end
|
data/lib/takelage/version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.26.
|
|
1
|
+
0.26.7
|