mysh 0.5.3 → 0.5.4
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/lib/mysh/internal/actions/vars.rb +5 -5
- data/lib/mysh/version.rb +1 -1
- data/tests/my_shell_tests.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5478d3cef2ba8f978c1820f27a6216f333c8a059
|
4
|
+
data.tar.gz: f3e32f21470957690111afa9d643dcc8a5d12017
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a48b751d65e6651dd798c09b50ba1db4a024b7637f9031de6e30b5984cfb6f8a62a3986a40b33a68e610bb3ed1d98b9285169c2a79b937a2b2fb4b0399af211
|
7
|
+
data.tar.gz: 7fa25e64465fa35dc01bb5763e16ba1134c844fc37cfd0485f34a212cbaa0ca60b7d97fc949c5ac553f7ba1fdc07046cc31031c786d07348ff01d490b2b366fb
|
@@ -14,28 +14,28 @@ module Mysh
|
|
14
14
|
|
15
15
|
#Setup an internal action.
|
16
16
|
def initialize(name, description)
|
17
|
-
@
|
17
|
+
@var_name = @equals = @value = nil
|
18
18
|
super(name, description)
|
19
19
|
end
|
20
20
|
|
21
21
|
#Execute a command against the internal mysh variables.
|
22
22
|
def process_command(input)
|
23
23
|
match = VAR_EXP.match(input.raw)
|
24
|
-
@
|
24
|
+
@var_name, @equals, @value = match[:name], match[:equals], match[:value]
|
25
25
|
do_command
|
26
26
|
:internal
|
27
27
|
end
|
28
28
|
|
29
29
|
#Do the actual work here.
|
30
30
|
def do_command
|
31
|
-
sym = @
|
31
|
+
sym = @var_name.to_sym if @var_name
|
32
32
|
|
33
33
|
if @value
|
34
34
|
MNV[sym] = @value
|
35
35
|
elsif @equals
|
36
36
|
MNV[sym] = ""
|
37
|
-
elsif @
|
38
|
-
puts "#{@
|
37
|
+
elsif @var_name
|
38
|
+
puts "#{@var_name} = #{MNV.get_source(sym)}"
|
39
39
|
else
|
40
40
|
show_all_values
|
41
41
|
end
|
data/lib/mysh/version.rb
CHANGED
data/tests/my_shell_tests.rb
CHANGED
@@ -31,7 +31,7 @@ class MyShellTester < Minitest::Test
|
|
31
31
|
assert(Mysh::COMMANDS['quit'], "The quit command is missing.")
|
32
32
|
|
33
33
|
assert(Mysh::COMMANDS['history'], "The history command is missing.")
|
34
|
-
assert(Mysh::COMMANDS['!<
|
34
|
+
assert(Mysh::COMMANDS['!<arg>'], "The ! command is missing.")
|
35
35
|
|
36
36
|
assert(Mysh::COMMANDS['help'], "The help command is missing.")
|
37
37
|
assert(Mysh::COMMANDS['?<topic>'], "The ? command is missing.")
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Camilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|