morpheus-cli 8.0.11 → 8.0.11.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/Dockerfile +1 -1
- data/lib/morpheus/cli/commands/shell.rb +10 -7
- data/lib/morpheus/cli/credentials.rb +2 -0
- data/lib/morpheus/cli/option_types.rb +6 -0
- data/lib/morpheus/cli/version.rb +1 -1
- data/lib/morpheus/terminal.rb +0 -24
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0e612ece8267586e1ede25aaa18364ba1a6debc9d98a92201dff496038363a27
|
|
4
|
+
data.tar.gz: e4f789f8b3b17a37d460de0833f65a3fa2f7599879a6162c617683eee9894163
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 75e8de5e4f8d83b2a37aed735e036b156d36eddf7eeba60b3bea20bc4b2e3e371222854dba2b0fd27a2aacef625ddddf7d6dfb8e486a700fc8e67cc1434c95fd
|
|
7
|
+
data.tar.gz: 35c2a244ae0acb3d6187277b9650277dfe5c85349f7788ff8dc37c7bf341dfd4773e540c1ca68fabc5e726fa8aefec9eac42c7df6b7e11222561e84444784c84
|
data/Dockerfile
CHANGED
|
@@ -99,13 +99,15 @@ class Morpheus::Cli::Shell
|
|
|
99
99
|
end
|
|
100
100
|
@auto_complete_commands = (@exploded_commands + @shell_commands + @alias_commands).collect {|it| it.to_s }
|
|
101
101
|
@auto_complete = proc do |s|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
results = @auto_complete_commands.grep(/^#{Regexp.escape(s)}/)
|
|
103
|
+
# do not append space unless there is only one match
|
|
104
|
+
# note: this does not work in newer rubies for some reason (>= 3.3.7)
|
|
105
|
+
if results.size == 1
|
|
106
|
+
Readline.completion_append_character = " "
|
|
106
107
|
else
|
|
107
|
-
|
|
108
|
+
Readline.completion_append_character = ""
|
|
108
109
|
end
|
|
110
|
+
results
|
|
109
111
|
end
|
|
110
112
|
end
|
|
111
113
|
|
|
@@ -284,9 +286,10 @@ class Morpheus::Cli::Shell
|
|
|
284
286
|
while !@exit_now_please do
|
|
285
287
|
#Readline.input = my_terminal.stdin
|
|
286
288
|
#Readline.input = $stdin
|
|
287
|
-
Readline.completion_append_character = "
|
|
289
|
+
Readline.completion_append_character = ""
|
|
288
290
|
Readline.completion_proc = @auto_complete
|
|
289
|
-
Readline.basic_word_break_characters = ""
|
|
291
|
+
Readline.basic_word_break_characters = "" rescue nil
|
|
292
|
+
Readline.completer_word_break_characters = "" rescue nil
|
|
290
293
|
#Readline.basic_word_break_characters = "\t\n\"\‘`@$><=;|&{( "
|
|
291
294
|
input = Readline.readline(@calculated_prompt, true).to_s
|
|
292
295
|
input = input.strip
|
|
@@ -116,6 +116,7 @@ module Morpheus
|
|
|
116
116
|
# username = $stdin.gets.chomp!
|
|
117
117
|
Readline.completion_append_character = ""
|
|
118
118
|
Readline.basic_word_break_characters = ''
|
|
119
|
+
Readline.completer_word_break_characters = '' rescue nil
|
|
119
120
|
Readline.completion_proc = nil
|
|
120
121
|
username = Readline.readline("Username: #{required_blue_prompt} ", false).to_s.chomp
|
|
121
122
|
else
|
|
@@ -133,6 +134,7 @@ module Morpheus
|
|
|
133
134
|
|
|
134
135
|
Readline.completion_append_character = ""
|
|
135
136
|
Readline.basic_word_break_characters = ''
|
|
137
|
+
Readline.completer_word_break_characters = '' rescue nil
|
|
136
138
|
Readline.completion_proc = nil
|
|
137
139
|
# needs to work like $stdin.noecho
|
|
138
140
|
Readline.pre_input_hook = lambda {
|
|
@@ -24,6 +24,7 @@ module Morpheus
|
|
|
24
24
|
# should use Readline.readline to probably
|
|
25
25
|
Readline.completion_append_character = ""
|
|
26
26
|
Readline.basic_word_break_characters = ''
|
|
27
|
+
Readline.completer_word_break_characters = '' rescue nil
|
|
27
28
|
Readline.completion_proc = nil
|
|
28
29
|
if default_value.nil?
|
|
29
30
|
confirm_prompt = "#{message} (yes/no): "
|
|
@@ -804,6 +805,7 @@ module Morpheus
|
|
|
804
805
|
#Readline.input = $stdin
|
|
805
806
|
Readline.completion_append_character = ""
|
|
806
807
|
Readline.basic_word_break_characters = ''
|
|
808
|
+
Readline.completer_word_break_characters = '' rescue nil
|
|
807
809
|
Readline.completion_proc = proc {|s|
|
|
808
810
|
matches = []
|
|
809
811
|
available_options = (select_options || [])
|
|
@@ -901,6 +903,7 @@ module Morpheus
|
|
|
901
903
|
#Readline.input = $stdin
|
|
902
904
|
Readline.completion_append_character = ""
|
|
903
905
|
Readline.basic_word_break_characters = ''
|
|
906
|
+
Readline.completer_word_break_characters = '' rescue nil
|
|
904
907
|
Readline.completion_proc = proc {|s|
|
|
905
908
|
matches = []
|
|
906
909
|
available_options = (select_options || [])
|
|
@@ -1120,6 +1123,7 @@ module Morpheus
|
|
|
1120
1123
|
# input = $stdin.gets.chomp!
|
|
1121
1124
|
Readline.completion_append_character = ""
|
|
1122
1125
|
Readline.basic_word_break_characters = ''
|
|
1126
|
+
Readline.completer_word_break_characters = '' rescue nil
|
|
1123
1127
|
Readline.completion_proc = nil
|
|
1124
1128
|
prompt_label = "#{option_type['fieldLabel']}#{option_type['fieldAddOn'] ? (' (' + option_type['fieldAddOn'] + ') ') : '' }#{!option_type['required'] ? ' (optional)' : ''}#{!option_type['defaultValue'].to_s.empty? ? ' ['+option_type['defaultValue'].to_s+']' : ''}: "
|
|
1125
1129
|
input = Readline.readline(prompt_label, false).to_s
|
|
@@ -1186,6 +1190,7 @@ module Morpheus
|
|
|
1186
1190
|
else
|
|
1187
1191
|
Readline.completion_append_character = ""
|
|
1188
1192
|
Readline.basic_word_break_characters = ''
|
|
1193
|
+
Readline.completer_word_break_characters = '' rescue nil
|
|
1189
1194
|
Readline.completion_proc = nil
|
|
1190
1195
|
# needs to work like $stdin.noecho
|
|
1191
1196
|
Readline.pre_input_hook = lambda {
|
|
@@ -1221,6 +1226,7 @@ module Morpheus
|
|
|
1221
1226
|
#Readline.input = $stdin
|
|
1222
1227
|
Readline.completion_append_character = ""
|
|
1223
1228
|
Readline.basic_word_break_characters = ''
|
|
1229
|
+
Readline.completer_word_break_characters = '' rescue nil
|
|
1224
1230
|
Readline.completion_proc = proc {|s|
|
|
1225
1231
|
# FILENAME_COMPLETION_PROC is nil in newer rubies
|
|
1226
1232
|
Readline::FILENAME_COMPLETION_PROC.call(s) rescue []
|
data/lib/morpheus/cli/version.rb
CHANGED
data/lib/morpheus/terminal.rb
CHANGED
|
@@ -356,30 +356,6 @@ module Morpheus
|
|
|
356
356
|
@angry_prompt ||= Morpheus::Terminal.angry_prompt
|
|
357
357
|
end
|
|
358
358
|
|
|
359
|
-
# def gets
|
|
360
|
-
# Readline.completion_append_character = " "
|
|
361
|
-
# Readline.completion_proc = @auto_complete
|
|
362
|
-
# Readline.basic_word_break_characters = ""
|
|
363
|
-
# #Readline.basic_word_break_characters = "\t\n\"\‘`@$><=;|&{( "
|
|
364
|
-
# input = Readline.readline("#{@prompt}", true).to_s
|
|
365
|
-
# input = input.strip
|
|
366
|
-
# execute(input)
|
|
367
|
-
# end
|
|
368
|
-
|
|
369
|
-
# def puts(*cmds)
|
|
370
|
-
# cmds.each do |cmd|
|
|
371
|
-
# self.execute(cmd) # exec
|
|
372
|
-
# end
|
|
373
|
-
# end
|
|
374
|
-
|
|
375
|
-
# def gets(*args)
|
|
376
|
-
# $stdin.gets(*args)
|
|
377
|
-
# end
|
|
378
|
-
|
|
379
|
-
def readline(*args)
|
|
380
|
-
# todo: one prompt to rule them all
|
|
381
|
-
end
|
|
382
|
-
|
|
383
359
|
# protected
|
|
384
360
|
|
|
385
361
|
def execute(input)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: morpheus-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.0.11
|
|
4
|
+
version: 8.0.11.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Estes
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2025-11-
|
|
14
|
+
date: 2025-11-20 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: tins
|