mysh 0.5.2 → 0.5.3
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/README.md +9 -9
- data/lib/mysh/version.rb +1 -1
- data/mysh.gemspec +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e8ee70dca370dcb5eb112bdaf4afe67482e45e5
|
4
|
+
data.tar.gz: 8c609dda1190820ca8cbaa3d0cd9935e2f6af1a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6925d5b72e66e62d026f4fec0398057ec529936b07e5958c743599c02aeac324b9249f85186a0ae4b7f73d22f731f75ba1b929a68729df85327a5ef1e24631b0
|
7
|
+
data.tar.gz: d123d191bda7443ebb77879850f3cdf40dced5e944062575f3cbbd27eec8f0672dbee170f9028bef24ca0a936f04285551961149b27cce72f92f1e3937fa2de4
|
data/README.md
CHANGED
@@ -87,7 +87,7 @@ hop to it! :-)
|
|
87
87
|
Now that we've launched mysh, what exactly does it do? This can be summarized
|
88
88
|
with just two words: Boot and REPL.
|
89
89
|
|
90
|
-
###Boot
|
90
|
+
### Boot
|
91
91
|
|
92
92
|
When mysh starts up, it, like most programs must first get itself initialized
|
93
93
|
and acclimated to its environment. The boot/initialization process of mysh is
|
@@ -115,7 +115,7 @@ $debug = on
|
|
115
115
|
and the command line has the -nd option, then debug mode will be disabled
|
116
116
|
because the -nd command line option is processed after the mysh_init file.
|
117
117
|
|
118
|
-
###REPL
|
118
|
+
### REPL
|
119
119
|
|
120
120
|
Now for a little more detail about what happens after booting up. The mysh
|
121
121
|
program is built around a design pattern called REPL. This stands for Read Eval
|
@@ -127,7 +127,7 @@ For more information on REPLs please see:
|
|
127
127
|
(https://en.wikipedia.org/wiki/Read-eval-print_loop) and
|
128
128
|
(https://repl.it/languages/ruby)
|
129
129
|
|
130
|
-
####READ
|
130
|
+
#### READ
|
131
131
|
|
132
132
|
The first step is just to get input from the user. For interactive sessions
|
133
133
|
this is done using the mini_readline gem. The user is prompted and input is
|
@@ -155,12 +155,12 @@ For more information about the mini_readline gem please see
|
|
155
155
|
https://github.com/PeterCamilleri/mini_readline or
|
156
156
|
https://rubygems.org/gems/mini_readline
|
157
157
|
|
158
|
-
####EVAL
|
158
|
+
#### EVAL
|
159
159
|
|
160
160
|
Once input has been obtained from the user, that input is then evaluated. This
|
161
161
|
evaluation has two phases: pre-processing and processing.
|
162
162
|
|
163
|
-
#####Input Preprocessing
|
163
|
+
##### Input Preprocessing
|
164
164
|
|
165
165
|
During pre-processing, the input is scanned for macro-like substitutions that
|
166
166
|
have been placed into the input. There are three steps to this phase:
|
@@ -171,7 +171,7 @@ being inserted into the user command.
|
|
171
171
|
2. Replacing embedded ruby "handlebars" with the results of their execution.
|
172
172
|
3. Replacing '\\{' and '\\}' with '{' and '}' respectively.
|
173
173
|
|
174
|
-
#####Command Processing
|
174
|
+
##### Command Processing
|
175
175
|
|
176
176
|
Once input has been obtained and massaged adequately, it's time to actually
|
177
177
|
do some work. In mysh there is a hierarchy of four types of commands. These
|
@@ -209,7 +209,7 @@ other forms of bad behavior before they do nasty things like blow up the stack.
|
|
209
209
|
covered in their own section below.
|
210
210
|
* The embedded ruby "handlebars" also get their own section below.
|
211
211
|
|
212
|
-
####PRINT
|
212
|
+
#### PRINT
|
213
213
|
|
214
214
|
Once the command is run, some results are expected most of the time. For Ruby
|
215
215
|
expressions, this is handled by the pretty print gem. The 'pp' function is
|
@@ -276,7 +276,7 @@ baz yes
|
|
276
276
|
```
|
277
277
|
|
278
278
|
|
279
|
-
####LOOP
|
279
|
+
#### LOOP
|
280
280
|
|
281
281
|
The processing of input continues (looping) until it doesn't. This occurs when
|
282
282
|
a command to stop looping is entered or the mini_readline gem signals
|
@@ -473,7 +473,7 @@ topics. These are:
|
|
473
473
|
|
474
474
|
Topic | Description
|
475
475
|
-----------|----------------------------------------------------
|
476
|
-
|
476
|
+
none | General help on mysh.
|
477
477
|
! | Help on the history command.
|
478
478
|
$ | Help on mysh variables.
|
479
479
|
= | Help on ruby expressions.
|
data/lib/mysh/version.rb
CHANGED
data/mysh.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'rdoc', "~> 5.0"
|
31
31
|
spec.add_development_dependency 'reek', "~> 4.5"
|
32
32
|
|
33
|
-
spec.add_runtime_dependency 'mini_readline', "~> 0.
|
33
|
+
spec.add_runtime_dependency 'mini_readline', "~> 0.8"
|
34
34
|
spec.add_runtime_dependency 'vls', "~> 0.4.1"
|
35
35
|
spec.add_runtime_dependency 'in_array', "~> 0.1.8"
|
36
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Camilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: '0.8'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: '0.8'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: vls
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -260,9 +260,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
260
|
version: '0'
|
261
261
|
requirements: []
|
262
262
|
rubyforge_project:
|
263
|
-
rubygems_version: 2.2
|
263
|
+
rubygems_version: 2.5.2
|
264
264
|
signing_key:
|
265
265
|
specification_version: 4
|
266
266
|
summary: mysh -- a Ruby inspired command line shell.
|
267
267
|
test_files: []
|
268
|
-
has_rdoc:
|