kdeploy 0.7.0 → 0.8.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7a96ba00ba11a1c5b93a1c898875ce52ef0b58ef0b99060189b6fd0d0b0c466
4
- data.tar.gz: 38a3e63b5251ee9e8fbacb0d439e7013e12783fe4b3983ca17cd56e3d84f0139
3
+ metadata.gz: d5e47ea7a547681734c52efc1ab39eb1dea4a936653577db030db86bad052bd4
4
+ data.tar.gz: 8c404c8331553539ab29e5dc5e7c54bb0c83fd9ca9ea98d96b98e7da144ced09
5
5
  SHA512:
6
- metadata.gz: 4e0fc24390689d67a3c2447d15e500594738e88049a2bcc18f87e299d9325271e8d8bfa7edcd81819bd73640ce175ef1a2c70de2b263d39e3fdfd2fe4058a1ce
7
- data.tar.gz: d71ded705c6a6c7c0a832b0b24b15cad527952946b2c3d3e10f5de5707b8ee59743fd0b739c49e93ccd960c3349683f94673b611ca564a7e1238b96e96d9817a
6
+ metadata.gz: 208cfb462d50209c4b3a07fe97e87f12173bd610990fb67cbc0248e68a391492bc13fcfd560dc579752a1538421c2411be14be6d6ae5105cd689828cf4646f79
7
+ data.tar.gz: d4f52d5428dd67ccb467e1851577a682f162549e2f354826def815c9d70cc03663e0d6b23f0a2152a9def7fd08c5d057e7621550eb626bee8dc14829e78eec10
data/README.md CHANGED
@@ -47,6 +47,30 @@ Or install it yourself as:
47
47
  $ gem install kdeploy
48
48
  ```
49
49
 
50
+ ### Shell Completion
51
+
52
+ To enable command completion, add the following to your shell config:
53
+
54
+ For Bash (`~/.bashrc`):
55
+ ```bash
56
+ source "$(gem contents kdeploy | grep kdeploy.bash)"
57
+ ```
58
+
59
+ For Zsh (`~/.zshrc`):
60
+ ```bash
61
+ source "$(gem contents kdeploy | grep kdeploy.zsh)"
62
+ autoload -Uz compinit && compinit
63
+ ```
64
+
65
+ After adding the configuration:
66
+ 1. For Bash: `source ~/.bashrc`
67
+ 2. For Zsh: `source ~/.zshrc`
68
+
69
+ Now you can use Tab completion for:
70
+ - Commands: `kdeploy [TAB]`
71
+ - File paths: `kdeploy execute [TAB]`
72
+ - Options: `kdeploy execute deploy.rb [TAB]`
73
+
50
74
  ## 🚀 Quick Start
51
75
 
52
76
  1. Initialize a new project:
@@ -0,0 +1,41 @@
1
+ # kdeploy bash completion
2
+ _kdeploy_completion() {
3
+ local cur prev opts
4
+ COMPREPLY=()
5
+ cur="${COMP_WORDS[COMP_CWORD]}"
6
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
7
+
8
+ # Main commands
9
+ opts="init execute help version"
10
+
11
+ # Handle different cases
12
+ case "${prev}" in
13
+ kdeploy)
14
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
15
+ return 0
16
+ ;;
17
+ execute)
18
+ # Complete with .rb files
19
+ COMPREPLY=( $(compgen -f -X '!*.rb' -- ${cur}) )
20
+ return 0
21
+ ;;
22
+ init)
23
+ # Complete with directories
24
+ COMPREPLY=( $(compgen -d -- ${cur}) )
25
+ return 0
26
+ ;;
27
+ help)
28
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
29
+ return 0
30
+ ;;
31
+ *)
32
+ # If we have a .rb file, suggest options
33
+ if [[ "${COMP_WORDS[@]}" =~ "execute" ]] && [[ "${COMP_WORDS[@]}" =~ ".rb" ]]; then
34
+ COMPREPLY=( $(compgen -W "--dry-run --limit --parallel" -- ${cur}) )
35
+ return 0
36
+ fi
37
+ ;;
38
+ esac
39
+ }
40
+
41
+ complete -F _kdeploy_completion kdeploy
@@ -0,0 +1,47 @@
1
+ #compdef kdeploy
2
+
3
+ _kdeploy() {
4
+ local -a commands options
5
+
6
+ commands=(
7
+ 'init:Initialize a new deployment project'
8
+ 'execute:Execute deployment tasks from file'
9
+ 'help:Show help information'
10
+ 'version:Show version information'
11
+ )
12
+
13
+ options=(
14
+ '--dry-run[Show what would be done without executing]'
15
+ '--limit[Limit to specific hosts (comma-separated)]'
16
+ '--parallel[Number of parallel executions (default: 5)]'
17
+ )
18
+
19
+ _arguments -C \
20
+ '1: :->cmds' \
21
+ '*:: :->args'
22
+
23
+ case "$state" in
24
+ cmds)
25
+ _describe -t commands 'kdeploy commands' commands
26
+ ;;
27
+ args)
28
+ case $words[1] in
29
+ execute)
30
+ if (( CURRENT == 2 )); then
31
+ _files -g "*.rb"
32
+ else
33
+ _values 'options' $options
34
+ fi
35
+ ;;
36
+ init)
37
+ _files -/
38
+ ;;
39
+ help)
40
+ _describe -t commands 'kdeploy commands' commands
41
+ ;;
42
+ esac
43
+ ;;
44
+ esac
45
+ }
46
+
47
+ _kdeploy "$@"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kdeploy
4
- VERSION = '0.7.0'
4
+ VERSION = '0.8.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kdeploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norton
@@ -165,6 +165,8 @@ files:
165
165
  - lib/kdeploy.rb
166
166
  - lib/kdeploy/banner.rb
167
167
  - lib/kdeploy/cli.rb
168
+ - lib/kdeploy/completions/kdeploy.bash
169
+ - lib/kdeploy/completions/kdeploy.zsh
168
170
  - lib/kdeploy/dsl.rb
169
171
  - lib/kdeploy/executor.rb
170
172
  - lib/kdeploy/initializer.rb
@@ -179,7 +181,11 @@ metadata:
179
181
  source_code_uri: https://github.com/kevin197011/kdeploy.git
180
182
  changelog_uri: https://github.com/kevin197011/kdeploy/blob/main/CHANGELOG.md
181
183
  rubygems_mfa_required: 'true'
182
- post_install_message:
184
+ post_install_message: "\U0001F389 Thanks for installing kdeploy!\n\nTo enable command
185
+ completion, add the following to your shell config:\n\nFor Bash (~/.bashrc):\n source
186
+ \"$(gem contents kdeploy | grep kdeploy.bash)\"\n\nFor Zsh (~/.zshrc):\n source
187
+ \"$(gem contents kdeploy | grep kdeploy.zsh)\"\n autoload -Uz compinit && compinit\n\nHappy
188
+ deploying! \U0001F680\n"
183
189
  rdoc_options: []
184
190
  require_paths:
185
191
  - lib
@@ -187,7 +193,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
187
193
  requirements:
188
194
  - - ">="
189
195
  - !ruby/object:Gem::Version
190
- version: 3.2.0
196
+ version: 3.1.0
191
197
  required_rubygems_version: !ruby/object:Gem::Requirement
192
198
  requirements:
193
199
  - - ">="