cl-magic 0.3.5 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59e560fb715bdcd247aea92b23e9c580eae68acfefb3e7e30460eefe66f2c6e0
4
- data.tar.gz: 971cfba6bc9c1f23ab642361c8dd1fe5bb1f1dba51d685d80d4807083e8bb8fb
3
+ metadata.gz: d42b8df99d335eb43c9bc34a7e6f07e729c6ea3548205a61e11b053ce8040ac5
4
+ data.tar.gz: 15a11064360d4a7c75cd3d8ab08a5122bcea8e0bdcb1dbf834461e2c11c7351d
5
5
  SHA512:
6
- metadata.gz: 6f309a92da4cf9daa7ee3463dbeb558ef5b1c41c9227b5b71c098d98b0df5753714f24d28e329eaa568a06ae98a358256114416914b284340b5bfee5b31e2fd6
7
- data.tar.gz: 90291922b6d70dc189f6a8c72da32c45242ed3c84d3305698e3cb8f7f829680ed71f02121fd0ae10d677d5855db524683eb4b7d94382d5e1b2969a710bc60f89
6
+ metadata.gz: 5e3735480f243e62ca776b43bfcba638399afddd32c413d48e7856a59a9a2097759a455de6abef95ede13242dc8e9065df7e14d62026f05fb3dec928588caf1b
7
+ data.tar.gz: 35f39e5900c0644d8c4c002390732f2f4e8692e577c6bb6ba91d2a2688dc45fef817157bd30c6b6e60293383ee367694702c1a22b843479a1d9efa681d5985e8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cl-magic (0.3.5)
4
+ cl-magic (0.3.7)
5
5
  optparse-subcommand
6
6
  pastel
7
7
  tty-command
data/lib/cl/magic/cl CHANGED
@@ -63,7 +63,16 @@ end
63
63
  def print_commands(commands, prefix=' ')
64
64
  just_len = 20 - prefix.length
65
65
  commands.sort_by{|h| h[:cmd]}.each do |cmd_hash|
66
- puts "#{prefix}#{cmd_hash[:cmd].ljust(just_len)} #{cmd_hash[:description]}"
66
+ desc_parts = cmd_hash[:description].split(';')
67
+ puts "#{prefix}#{cmd_hash[:cmd].ljust(just_len)} #{desc_parts.first}"
68
+ remaining_desc_parts = desc_parts[1..]
69
+ if remaining_desc_parts.any?
70
+ remaining_desc_parts.each do |desc_part|
71
+ puts "#{"".rjust(20)} #{desc_part}"
72
+ end
73
+ puts ""
74
+ end
75
+ puts "" if cmd_hash[:description].end_with? ';'
67
76
  end
68
77
  end
69
78
 
@@ -82,6 +91,8 @@ def execute_subcommand(subcommand, command_tree)
82
91
  print_commands(commands)
83
92
  puts ""
84
93
  exit(0)
94
+ else
95
+ subcommand = sub_subcommand
85
96
  end
86
97
  end
87
98
  cmd = commands.select {|c| c[:cmd]==subcommand}.first
data/lib/cl/magic/cl-auth CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Need to login to something? Check here first.
2
+ # Need to authenticate? Check here first
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Work with google cloud docker image tags
2
+ # Work with gcloud docker image tags
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Find a gitlab commit and open it up in a browser
2
+ # Find a commit and open in a browser
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # History of any 'cl' command you have run
2
+ # History of 'cl' commands you run
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Copy a file from your computer to a container in a K8 cluster
2
+ # Copy a file to a container in K8
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Find a deployment in a K8 cluster and describe the containers
2
+ # Find deployment in K8 and describe it
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Find & select k8 cluster and namespace; then --ktx to use them with other kube commands
2
+ # Find/save K8 cluster & namespace;then '--ktx' other kube commands
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Find pods in a k8 cluster and use stern to follow the logs
2
+ # Find pods in k8 and follow the logs
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Find and restart k8 deploy to reboot pods
2
+ # Find K8 deployment and reboot pods
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Search a clusters for any k8 service, lists them and select one to describe it
2
+ # Search resources in k8 and list them;then select one to describe it
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Find a container in a k8 cluster and ssh into it
2
+ # Find container in k8 and ssh into it
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Explore your HashiCorp vault from the commandline
2
+ # Explore HashiCorp vault
3
3
  require 'optparse'
4
4
  require 'optparse/subcommand'
5
5
  require 'tty-command'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cl
4
4
  module Magic
5
- VERSION = "0.3.5"
5
+ VERSION = "0.3.7"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cl-magic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Don Najd