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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d14bb08c98c661d3a7845b7d717b0afbd5e7e16
4
- data.tar.gz: 5927f10314b976343eeb2e2464f89cddc1c5255b
3
+ metadata.gz: bceb539dd8a9fe46587018141691e37cbb6b71fa
4
+ data.tar.gz: cb7f62b68e30efe7589670f14a3bbeab072aca64
5
5
  SHA512:
6
- metadata.gz: c238988c73db100b3fe65c9071b944a1e5f227429c33655a1f012431799878c5848630725c70cf81ee84f66b2bf583f494c0f4acaf6c5a681cdd014468d6a7f9
7
- data.tar.gz: 95d6b03f15eb614fe34115c9007fc15fc1604ecb476ee1c510f5109d1593f055b34943d4e1ad10ccc4fa82fe9118c5ee81f857bb471bf0817970fd3a0cbea670
6
+ metadata.gz: af00b483a5f61b429b70dbd843660e17c6176b10b2172abb749b1ca4432299954e2ac818b6b99c3a0158874e17ee038f9203e0b5db888174c27c1629f3d9c843
7
+ data.tar.gz: 2707296e56b968dc1495e1ba11e476ed6aa5463561bded59eda61de83dfb022aa006dced3ab7665216cb2ac0ace3fa90ae886c882ba303604b52d6bc07abc1d7
@@ -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
@@ -10,6 +10,7 @@ module Mysh
10
10
  def initialize(page_width)
11
11
  @page_width = page_width
12
12
  @bullet_data = []
13
+ @key_length = nil
13
14
  end
14
15
 
15
16
  #Add items to these bullet points.
@@ -18,7 +18,7 @@ module Mysh
18
18
  unless str[0] == ' '
19
19
  action, args = parse_command(str.chomp)
20
20
 
21
- if (action)
21
+ if action
22
22
  action.call(args)
23
23
  :internal
24
24
  end
@@ -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 = options[:prefix]
12
- @auto_source = MiniReadline::AutoFileSource.new(options)
13
- @quote_source = MiniReadline::QuotedFileFolderSource.new(options)
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
@@ -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
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Mysh
4
4
  #The version string of MY SHell.
5
- VERSION = "0.2.6"
5
+ VERSION = "0.2.7"
6
6
 
7
7
  #A brief summary of this gem.
8
8
  SUMMARY = "mysh -- a Ruby inspired command line shell."
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: false
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.6
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-12 00:00:00.000000000 Z
11
+ date: 2016-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler