rest-terminal 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rest/terminal.rb +3 -3
- data/lib/rest/terminal/commands_info.rb +9 -0
- data/lib/rest/version.rb +1 -1
- metadata +1 -1
data/lib/rest/terminal.rb
CHANGED
@@ -39,11 +39,11 @@ module Rest
|
|
39
39
|
require 'rest/terminal/commands_info'
|
40
40
|
puts ("="*65).yellow
|
41
41
|
commands.sort.each do |x|
|
42
|
-
help_line = "#{x}_line"
|
43
|
-
puts " #{x.ljust(10)}#{
|
42
|
+
help_line = send("#{x}_line")
|
43
|
+
puts " #{x.ljust(10)}#{help_line}"
|
44
44
|
end
|
45
45
|
puts ("-"*65).yellow
|
46
|
-
puts "for detail explanation on each
|
46
|
+
puts "for detail explanation on each commands"
|
47
47
|
puts "type: #{'rest help xxx'.green} #xxx: command to know"
|
48
48
|
else
|
49
49
|
invalid_command
|
@@ -15,6 +15,10 @@ module Rest
|
|
15
15
|
"change current service"
|
16
16
|
end
|
17
17
|
|
18
|
+
def help_line
|
19
|
+
"detail help information"
|
20
|
+
end
|
21
|
+
|
18
22
|
def headers_line
|
19
23
|
"view or set var: headers"
|
20
24
|
end
|
@@ -81,6 +85,11 @@ module Rest
|
|
81
85
|
"use rest info to know all"
|
82
86
|
end
|
83
87
|
|
88
|
+
def help_help
|
89
|
+
"view command information\n"
|
90
|
+
"Ex: rest help add cd info".intense_green
|
91
|
+
end
|
92
|
+
|
84
93
|
def history_help
|
85
94
|
"view history last command call\n"
|
86
95
|
"Ex: rest history".intense_green
|
data/lib/rest/version.rb
CHANGED