mysh 0.2.2 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e474248b127024d5dc807794564924ba04f5f21c
4
- data.tar.gz: 712489e71e81a7202a2a54c7d1b18fc67fc58628
3
+ metadata.gz: 8a2f391f973abe84f8adec12bfd66acaf7860fcb
4
+ data.tar.gz: 94ef4e4c08bbe29cb870b3003ebcdf253c61ab8d
5
5
  SHA512:
6
- metadata.gz: 2d9b6f82a8a2bc3430f209753b7a07753aa74dfcda8a6233bc010ef7eb15a45490b214ffe63ff1edae3e1c18ebc24a1c6a11909711664f14be6c913139c9e8c0
7
- data.tar.gz: 24073b1333985dae86d44167841b7ca41d91401606cf1a4ca702a1b205702f9da474d9b98e531ac213a8ddda79dddc0b3283417a46a1b9ff3f913d0b52f39bd3
6
+ metadata.gz: 6b98fa2677aae7e6d4b8606c11799c754b21bce4c2f34a6984db67fce2da34f43b49432d3bb95b9c14fc155f86478d501f329a8bd7f4b7f7798a847fe6ac2dbb
7
+ data.tar.gz: 945346347932b2a097fd5a09d8c203b1c080f376bb1e1ed705f536a40d24f83ca0976e23cfd8435172911a8d2139058344d1e658c044af9d5f28c15656458b12
@@ -10,7 +10,14 @@ module Mysh
10
10
 
11
11
  #Execute the vls command.
12
12
  def call(args)
13
- puts VersionLS.vls(args[0] || /./).mysh_bulletize, ""
13
+ filter = args[0] || /./
14
+ results = VersionLS.vls(filter)
15
+
16
+ if results.empty?
17
+ puts "No modules found for filter #{filter.inspect}.", ""
18
+ else
19
+ puts results.mysh_bulletize, ""
20
+ end
14
21
  end
15
22
 
16
23
  end
@@ -55,6 +55,8 @@ class Array
55
55
  #<br>Endemic Code Smells
56
56
  #* :reek:FeatureEnvy -- false positive.
57
57
  def mysh_bulletize(page_width = Mysh::PAGE_WIDTH)
58
+ return "" if empty?
59
+
58
60
  builder = Mysh::BulletPoints.new(page_width)
59
61
 
60
62
  each {|pair| builder.add(*pair)}
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.2"
5
+ VERSION = "0.2.3"
6
6
 
7
7
  #A brief summary of this gem.
8
8
  SUMMARY = "mysh -- a Ruby inspired command line shell."
@@ -115,6 +115,9 @@ class MyShellTester < Minitest::Test
115
115
  "pie 3.141592653589793"
116
116
 
117
117
  assert_equal(result, data.mysh_bulletize)
118
+
119
+ assert_equal("", [].mysh_bulletize)
120
+
118
121
  end
119
122
 
120
123
  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.2.2
4
+ version: 0.2.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: 2016-10-23 00:00:00.000000000 Z
11
+ date: 2016-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler