mysh 0.2.6 → 0.2.7
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/expression.rb +2 -2
- data/lib/mysh/internal/actions/gls.rb +6 -0
- data/lib/mysh/internal/actions/history.rb +6 -0
- data/lib/mysh/internal/format/bullets.rb +1 -0
- data/lib/mysh/internal/manage.rb +1 -1
- data/lib/mysh/user_input/smart_source.rb +4 -3
- data/lib/mysh/user_input.rb +1 -1
- data/lib/mysh/version.rb +1 -1
- data/mysh.reek +4 -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: bceb539dd8a9fe46587018141691e37cbb6b71fa
|
4
|
+
data.tar.gz: cb7f62b68e30efe7589670f14a3bbeab072aca64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af00b483a5f61b429b70dbd843660e17c6176b10b2172abb749b1ca4432299954e2ac818b6b99c3a0158874e17ee038f9203e0b5db888174c27c1629f3d9c843
|
7
|
+
data.tar.gz: 2707296e56b968dc1495e1ba11e476ed6aa5463561bded59eda61de83dfb022aa006dced3ab7665216cb2ac0ace3fa90ae886c882ba303604b52d6bc07abc1d7
|
data/lib/mysh/expression.rb
CHANGED
@@ -6,6 +6,8 @@ require 'mathn'
|
|
6
6
|
require_relative 'expression/lineage'
|
7
7
|
|
8
8
|
#* mysh/expression.rb -- The mysh ruby expression processor.
|
9
|
+
#<br>Endemic Code Smells
|
10
|
+
#* :reek:ModuleInitialize
|
9
11
|
module Mysh
|
10
12
|
|
11
13
|
#Reset the state of the execution hosting environment.
|
@@ -17,8 +19,6 @@ module Mysh
|
|
17
19
|
include Math
|
18
20
|
|
19
21
|
#Set up a new execution environment
|
20
|
-
#<br>Endemic Code Smells
|
21
|
-
# :reek:ModuleInitialize -- False positive turned off in mysh.reek
|
22
22
|
def initialize
|
23
23
|
$mysh_exec_result = nil
|
24
24
|
$mysh_exec_binding = binding
|
@@ -6,6 +6,12 @@ module Mysh
|
|
6
6
|
#* mysh/internal/actions/gls.rb -- The mysh gls (gem ls) command.
|
7
7
|
class GlsCommand < Action
|
8
8
|
|
9
|
+
#Set up this command.
|
10
|
+
def initialize(*args)
|
11
|
+
super
|
12
|
+
@report = @mask = @specs = nil
|
13
|
+
end
|
14
|
+
|
9
15
|
#Execute the gls command.
|
10
16
|
def call(args)
|
11
17
|
process_args(args)
|
@@ -6,6 +6,12 @@ module Mysh
|
|
6
6
|
#* mysh/internal/actions/history.rb -- The mysh internal history command.
|
7
7
|
class HistoryCommand < Action
|
8
8
|
|
9
|
+
#Set up this command.
|
10
|
+
def initialize(*args)
|
11
|
+
super
|
12
|
+
@args = @history = nil
|
13
|
+
end
|
14
|
+
|
9
15
|
#Execute the history command.
|
10
16
|
def call(args)
|
11
17
|
@args, @history = args, Mysh.input.history
|
data/lib/mysh/internal/manage.rb
CHANGED
@@ -8,9 +8,10 @@ module Mysh
|
|
8
8
|
|
9
9
|
#Create a new file/folder auto-data source. NOP
|
10
10
|
def initialize(options)
|
11
|
-
@prefix
|
12
|
-
@auto_source
|
13
|
-
@quote_source
|
11
|
+
@prefix = options[:prefix]
|
12
|
+
@auto_source = MiniReadline::AutoFileSource.new(options)
|
13
|
+
@quote_source = MiniReadline::QuotedFileFolderSource.new(options)
|
14
|
+
@active_source = nil
|
14
15
|
end
|
15
16
|
|
16
17
|
#Construct a new data list for auto-complete
|
data/lib/mysh/user_input.rb
CHANGED
@@ -31,7 +31,7 @@ module Mysh
|
|
31
31
|
def self.get_command_extra(str, root)
|
32
32
|
if /\\\s*$/ =~ str
|
33
33
|
parms = {prompt: root + '\\', prefix: str[0] }
|
34
|
-
get_command_extra($PREMATCH + "\n" + @input.readline(parms))
|
34
|
+
get_command_extra($PREMATCH + "\n" + @input.readline(parms), root)
|
35
35
|
else
|
36
36
|
str
|
37
37
|
end
|
data/lib/mysh/version.rb
CHANGED
data/mysh.reek
CHANGED
@@ -24,6 +24,9 @@ DuplicateMethodCall:
|
|
24
24
|
FeatureEnvy:
|
25
25
|
enabled: true
|
26
26
|
exclude: []
|
27
|
+
InstanceVariableAssumption:
|
28
|
+
enabled: true
|
29
|
+
exclude: []
|
27
30
|
IrresponsibleModule:
|
28
31
|
enabled: true
|
29
32
|
exclude: []
|
@@ -39,7 +42,7 @@ LongYieldList:
|
|
39
42
|
exclude: []
|
40
43
|
max_params: 3
|
41
44
|
ModuleInitialize:
|
42
|
-
enabled:
|
45
|
+
enabled: true
|
43
46
|
exclude: []
|
44
47
|
NestedIterators:
|
45
48
|
enabled: true
|
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.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Camilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11
|
11
|
+
date: 2016-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|