console_cmdr 0.4.6 → 0.5.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +1 -1
- data/lib/console_cmdr.rb +18 -4
- metadata +27 -28
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b000da5660c64a2acab670fb357f28392942f92
|
4
|
+
data.tar.gz: 0f1b0cadec761840e6af4000589ed4fd2711adc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dda2eaa6535b5151ff3042fdc0bd304ca365c122ba1979067118380579c2eb8a8fb2daeeed4595bd6acfaec9e7788609a5ada7ef324b26e3ab60c7fb7d1c8162
|
7
|
+
data.tar.gz: b2ecb25ac9eabc379a93d168fda6ef90917b9b0403d996d1571a6819261f4ba1a12dd24b0dfe0b13f82d07c854129fea108eba427782c0f22d8f41c31073f558
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Cks��
|
data/lib/console_cmdr.rb
CHANGED
@@ -11,7 +11,8 @@ require 'io/console'
|
|
11
11
|
|
12
12
|
class ConsoleCmdr < Cmdr
|
13
13
|
|
14
|
-
def initialize(pxindex: nil)
|
14
|
+
def initialize(pxindex: nil, debug: false)
|
15
|
+
|
15
16
|
super()
|
16
17
|
@pxindex_filepath = pxindex
|
17
18
|
@pxi = pxindex ? PxIndex.new(pxindex) : nil
|
@@ -20,6 +21,8 @@ class ConsoleCmdr < Cmdr
|
|
20
21
|
@item_selected = ''
|
21
22
|
@input_selection = []
|
22
23
|
@running = true
|
24
|
+
@debug = debug
|
25
|
+
|
23
26
|
end
|
24
27
|
|
25
28
|
def clear()
|
@@ -41,6 +44,7 @@ class ConsoleCmdr < Cmdr
|
|
41
44
|
|
42
45
|
def start(&blk)
|
43
46
|
|
47
|
+
@running = true
|
44
48
|
cli_banner()
|
45
49
|
|
46
50
|
seq = []
|
@@ -111,6 +115,8 @@ class ConsoleCmdr < Cmdr
|
|
111
115
|
seq = []
|
112
116
|
on_keypress(c)
|
113
117
|
elsif c == "\u0003" # CTRL+C
|
118
|
+
c = :ctrl_c
|
119
|
+
on_keypress(c)
|
114
120
|
puts
|
115
121
|
@linebuffer = ''
|
116
122
|
display_output()
|
@@ -129,10 +135,14 @@ class ConsoleCmdr < Cmdr
|
|
129
135
|
|
130
136
|
else
|
131
137
|
input(c) do |command|
|
132
|
-
|
138
|
+
|
139
|
+
puts 'command: ' + command.inspect if @debug
|
140
|
+
|
133
141
|
case command
|
134
142
|
when 'time'
|
135
143
|
Time.now.to_s
|
144
|
+
else
|
145
|
+
on_enter(command)
|
136
146
|
end
|
137
147
|
end
|
138
148
|
end
|
@@ -182,7 +192,11 @@ class ConsoleCmdr < Cmdr
|
|
182
192
|
def cli_update(s='')
|
183
193
|
|
184
194
|
print s
|
185
|
-
end
|
195
|
+
end
|
196
|
+
|
197
|
+
def on_enter(command)
|
198
|
+
puts 'entered: ' + command.inspect
|
199
|
+
end
|
186
200
|
|
187
201
|
def on_keypress(key)
|
188
202
|
|
@@ -388,4 +402,4 @@ class ConsoleCmdr < Cmdr
|
|
388
402
|
end
|
389
403
|
end
|
390
404
|
|
391
|
-
end
|
405
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: console_cmdr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,28 +10,27 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
-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dgRtnZW1tYXN0ZXJAamFt
|
25
|
+
ZXNyb2JlcnRzb24uZXUwDQYJKoZIhvcNAQEFBQADggEBALWXiyv68z5+u3KeZTm4
|
26
|
+
25g2cz1L5+qC1Irl+9F1zl7WZGfaURaozzz09b6d+aK41XXCjH6Pe39EaL5MYonS
|
27
|
+
23UMI0UdMdTrfTpqZlXNBBzu82GgHjPZM9KhSUqyvboJoe31s+T/92QfMrD8/v1T
|
28
|
+
XwNi/Pgq6bkxN1X2/+FXq5P7le7R7jt0pi2SKoRoFSUkVMaflUK5FP925e5JEW53
|
29
|
+
ymWtJqoS1JjqmPm6XsPnw6UvOBzgCGAMOnmfhFuW7LwnNUy6Hc1jNvlLRQExKfMM
|
30
|
+
+3gOPBFWBhDywPVfMj9oqMHb+UNidPOu4dUyiSkYxQV5fpvj9Q0gH1F0vsQcbr32
|
31
|
+
0VQ=
|
33
32
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
33
|
+
date: 2018-07-02 00:00:00.000000000 Z
|
35
34
|
dependencies:
|
36
35
|
- !ruby/object:Gem::Dependency
|
37
36
|
name: cmdr
|
@@ -42,7 +41,7 @@ dependencies:
|
|
42
41
|
version: '0.4'
|
43
42
|
- - ">="
|
44
43
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.4.
|
44
|
+
version: 0.4.3
|
46
45
|
type: :runtime
|
47
46
|
prerelease: false
|
48
47
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,7 +51,7 @@ dependencies:
|
|
52
51
|
version: '0.4'
|
53
52
|
- - ">="
|
54
53
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.4.
|
54
|
+
version: 0.4.3
|
56
55
|
- !ruby/object:Gem::Dependency
|
57
56
|
name: pxindex
|
58
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,7 +61,7 @@ dependencies:
|
|
62
61
|
version: '0.1'
|
63
62
|
- - ">="
|
64
63
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.
|
64
|
+
version: 0.2.0
|
66
65
|
type: :runtime
|
67
66
|
prerelease: false
|
68
67
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -72,7 +71,7 @@ dependencies:
|
|
72
71
|
version: '0.1'
|
73
72
|
- - ">="
|
74
73
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
74
|
+
version: 0.2.0
|
76
75
|
- !ruby/object:Gem::Dependency
|
77
76
|
name: colored
|
78
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +113,7 @@ dependencies:
|
|
114
113
|
- !ruby/object:Gem::Version
|
115
114
|
version: 0.1.1
|
116
115
|
description:
|
117
|
-
email: james@
|
116
|
+
email: james@jamesrobertson.eu
|
118
117
|
executables: []
|
119
118
|
extensions: []
|
120
119
|
extra_rdoc_files: []
|
@@ -140,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
139
|
version: '0'
|
141
140
|
requirements: []
|
142
141
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.
|
142
|
+
rubygems_version: 2.6.13
|
144
143
|
signing_key:
|
145
144
|
specification_version: 4
|
146
145
|
summary: A customisable command-line shell which uses the cmdr gem.
|
metadata.gz.sig
CHANGED
Binary file
|