rest-terminal 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -55,6 +55,16 @@ module Rest
55
55
  @_status = fp
56
56
  end
57
57
 
58
+ def _help
59
+ require 'rest/terminal/commands_info'
60
+ params = @prm - (@prm - commands)
61
+ params.sort.each do |x|
62
+ puts ("-"*65)
63
+ puts x.green
64
+ puts send("#{x}_help")
65
+ end
66
+ end
67
+
58
68
  def _history
59
69
  @hist.each_with_index do |itm,idx|
60
70
  puts "#{idx.to_s.rjust(2,'0')} > `#{itm}`"
@@ -56,55 +56,78 @@ module Rest
56
56
  end
57
57
  #--------------------------------------------------------
58
58
  def add_help
59
- "add service folder"
59
+ "add service folder\n" +
60
+ "Ex: rest add google\n".intense_green +
61
+ "add can be perform in direct child path".intense_red
60
62
  end
61
63
 
62
64
  def body_help
63
- "view or set var: body"
65
+ "view or set var: body\n" +
66
+ "Ex: rest body # show it\n".intense_green +
67
+ " rest body id=123\n".intense_green +
68
+ "use rest info to know all"
64
69
  end
65
70
 
66
71
  def cd_help
67
- "change current service"
72
+ "change current service\n" +
73
+ "Ex: rest cd /\n".intense_green +
74
+ "relative / full path"
68
75
  end
69
76
 
70
77
  def headers_help
71
- "view or set var: headers"
78
+ "view or set var: headers\n"
79
+ "Ex: rest headers # show it\n".intense_green +
80
+ " rest headers timeout=15\n".intense_green +
81
+ "use rest info to know all"
72
82
  end
73
83
 
74
84
  def history_help
75
- "view history last command call"
85
+ "view history last command call\n"
86
+ "Ex: rest history".intense_green
76
87
  end
77
88
 
78
89
  def info_help
79
- "show variables :headers, :body, :vars"
90
+ "show variables :headers, :body, :vars\n" +
91
+ "Ex: rest info".intense_green
80
92
  end
81
93
 
82
94
  def init_help
83
- "prepare folder to become rest-terminal services"
95
+ "prepare folder to become rest-terminal services\n" +
96
+ "Ex: rest init".intense_green
84
97
  end
85
98
 
86
99
  def ls_help
87
- "list services"
100
+ "list services\n" +
101
+ "Ex: rest ls\n".intense_green +
102
+ "add can be perform in direct child path".intense_red
88
103
  end
89
104
 
90
105
  def pwd_help
91
- "print current service"
106
+ "show current service\n" +
107
+ "Ex: rest pwd".intense_green
92
108
  end
93
109
 
94
110
  def reset_help
95
- "empty variables :headers, :body, :vars"
111
+ "empty variables :headers, :body, :vars\n" +
112
+ "Ex: rest reset vars # show it\n".intense_green +
113
+ " rest reset headers vars\n".intense_green
96
114
  end
97
115
 
98
116
  def response_help
99
- "show last response call from 'send'"
117
+ "show last response call from 'send'\n" +
118
+ "Ex: rest response".intense_green
100
119
  end
101
120
 
102
121
  def send_help
103
- "send Rest Call"
122
+ "send Rest Call\n" +
123
+ "Ex: rest send".intense_green
104
124
  end
105
125
 
106
126
  def vars_help
107
- "view or set var: vars"
127
+ "view or set var: vars\n" +
128
+ "Ex: rest vars # show it\n".intense_green +
129
+ " rest vars url=http://localhost\n".intense_green +
130
+ "use rest info to know all"
108
131
  end
109
132
 
110
133
  end
data/lib/rest/version.rb CHANGED
@@ -23,7 +23,7 @@ module Rest
23
23
 
24
24
  # :nodoc:
25
25
  def patch
26
- 2
26
+ 3
27
27
  end
28
28
 
29
29
  # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest-terminal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-29 00:00:00.000000000 Z
12
+ date: 2012-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json