takeltau 0.37.3 → 0.38.0

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: 6e297c80af53f6afcb49ac3728e6c5833a53fdbaf745d1df9f2cc024da99a87e
4
- data.tar.gz: 29593c7d300c8f960292a9527a778421a41a3b7bea203da4ec6acc25eac7113a
3
+ metadata.gz: 5a5ea68fdc1d3340cb871a3abdd21675c99508c0b5ac0095e3c2cfe675bf983e
4
+ data.tar.gz: 561785ba66192b34f594165be501296afc90825a889559fb2ff5f02e2637db89
5
5
  SHA512:
6
- metadata.gz: 54d2ce13da764a2d7fa40c344ef139605eafc5e1d6559fdaeb7dea38ff9702b7f57fa99a7c520469dac89f55800aaf2c284fc014f0735ff920dde3397a639867
7
- data.tar.gz: 0f4d384cfaba7ccb214cfb6a0e780f662703706e706898858a6663257f9d1af3d26cab3daf24b172d583b89936d32b8f44b0d33ff3aed86b81705e6663673d9b
6
+ metadata.gz: 0bcdb05348ba4b8e416a9326578301f8518ef8b51dc74ec822b7547a27dde30f5a712f14bf5cd05495fd44fbf9d94a30abb55659ff143768612e03717d495425
7
+ data.tar.gz: 576340ebafa4c5bb4f170aee9d9bffb2e30aec58ab4d669bfcd66b2ef18f76d885bd41e7d825561a9921fe4eee262fe9833bbe8e76bf040ed13ee3801e1bb373
@@ -37,6 +37,7 @@ cmd_info_status_lib_git_key_available: 'gpg --list-key %{key}'
37
37
  cmd_info_status_gopass_root_store: 'gopass config | grep "path" | cut -d " " -f 2'
38
38
  cmd_info_status_gpg_agent: 'gpg-connect-agent /bye'
39
39
  cmd_info_status_gpg_keys: 'gpg --list-keys'
40
+ cmd_info_status_hg_username: 'hg config ui.username'
40
41
  cmd_info_status_ssh_keys: 'ssh-add -l'
41
42
  cmd_info_status_ssh_socket: 'gpgconf --list-dirs agent-ssh-socket'
42
43
  cmd_init_lib_git_init: 'git init && git checkout -b main'
@@ -15,6 +15,7 @@ module InfoStatusBar
15
15
  _info_status_bar_git
16
16
  _info_status_bar_gopass
17
17
  _info_status_bar_gpg
18
+ _info_status_bar_hg
18
19
  _info_status_bar_mutagen
19
20
  _info_status_bar_ssh
20
21
 
@@ -62,6 +63,12 @@ module InfoStatusBar
62
63
  @bar_list << ("gpg: #{info_status_gpg ? 'ok'.green : 'no'.red}")
63
64
  end
64
65
 
66
+ # Add git status info to bar.
67
+ def _info_status_bar_hg
68
+ @status_hg = info_status_hg
69
+ @bar_list << ("hg: #{@status_hg ? 'ok'.green : 'no'.red}")
70
+ end
71
+
65
72
  # Add mutagen status info to bar.
66
73
  def _info_status_bar_mutagen
67
74
  @bar_list << ("mutagen: #{mutagen_check_daemon ? 'ok'.green : 'no'.red}")
@@ -16,6 +16,7 @@ module Takeltau
16
16
  include InfoStatusGit
17
17
  include InfoStatusGopass
18
18
  include InfoStatusGPG
19
+ include InfoStatusHg
19
20
  include InfoStatusSSH
20
21
  include InfoStatusBar
21
22
  include MutagenCheckDaemon
@@ -80,6 +81,18 @@ module Takeltau
80
81
  exit info_status_gpg
81
82
  end
82
83
 
84
+ #
85
+ # info status hg
86
+ #
87
+ desc 'hg', 'Check hg status info'
88
+ long_desc <<-LONGDESC.gsub("\n", "\x5")
89
+ Check hg status info
90
+ LONGDESC
91
+ # Check hg status info.
92
+ def hg
93
+ exit info_status_hg
94
+ end
95
+
83
96
  #
84
97
  # info status mutagen
85
98
  #
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # tau info status hg
4
+ module InfoStatusHg
5
+ # Backend method for info status hg.
6
+ # @return [Boolean] has mercurial been configured?
7
+ def info_status_hg
8
+ log.debug 'Check hg status'
9
+
10
+ unless _info_status_hg_username
11
+ log.error 'hg ui.username is not configured'
12
+ return false
13
+ end
14
+
15
+ log.debug 'hg config is available'
16
+ true
17
+ end
18
+
19
+ private
20
+
21
+ # Check hg username
22
+ def _info_status_hg_username
23
+ status_username = try config.active['cmd_info_status_hg_username']
24
+ status_username.exitstatus.zero?
25
+ end
26
+ end
data/lib/takeltau/version CHANGED
@@ -1 +1 @@
1
- 0.37.3
1
+ 0.38.0
data/lib/takeltau.rb CHANGED
@@ -70,6 +70,7 @@ require_relative 'takeltau/info/status/lib'
70
70
  require_relative 'takeltau/info/status/git'
71
71
  require_relative 'takeltau/info/status/gopass'
72
72
  require_relative 'takeltau/info/status/gpg'
73
+ require_relative 'takeltau/info/status/hg'
73
74
  require_relative 'takeltau/info/status/ssh'
74
75
  require_relative 'takeltau/info/status/bar'
75
76
  require_relative 'takeltau/info/status/cli'
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.37.3
4
+ version: 0.38.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takelwerk
@@ -244,6 +244,7 @@ files:
244
244
  - lib/takeltau/info/status/git.rb
245
245
  - lib/takeltau/info/status/gopass.rb
246
246
  - lib/takeltau/info/status/gpg.rb
247
+ - lib/takeltau/info/status/hg.rb
247
248
  - lib/takeltau/info/status/lib.rb
248
249
  - lib/takeltau/info/status/ssh.rb
249
250
  - lib/takeltau/init/cli.rb