cliutils 2.2.5 → 2.2.6

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: 381dc60476fc447deccdb6d6ad014317ae2784ec
4
- data.tar.gz: 24fc1307bbb0bf38aa08a4c5b5fe15c278108a3c
3
+ metadata.gz: 0d94d276e387109f79253828607ffc6b8786f509
4
+ data.tar.gz: a186536d201e819204998c2ad3b2f8db664348c0
5
5
  SHA512:
6
- metadata.gz: ffd39e65b7fa7b305a0251c91a118948f4078b89c4063c5469da316667d6c674e1666797ca570ffcae5f0172f5b508c46366909ad6b8d233ae5ad112eea40cf5
7
- data.tar.gz: 97a14e4864053fc4a61a4595a90b16283ea864e52846a9626f06dccdee6c2a6ab36949a65e966289e026d2516e91179ad133a1af01903830d6f3267ece189c45
6
+ metadata.gz: ab54b9ca16add7ba0b2b4721385c6c05ac5dfd852398c094b67f3ee26034fd4c9977be8679dea9056913154b06dfe374915785d9ea21c21042cee7973a3cc6cd
7
+ data.tar.gz: 1ca53561aaa653460360fe337105ac9f5f0dceb74b336db45ecefbd5c9aff4bfe733908362f848a7141b12b3f1d5a0542d77391f5d2a7f578244746cfc68e206
data/HISTORY.md CHANGED
@@ -1,4 +1,8 @@
1
- # 2.2.4 (2014-05-05)
1
+ # 2.2.6 (2014-05-13)
2
+
3
+ * Added small logic to string truncate to deal with strings under length
4
+
5
+ # 2.2.5 (2014-05-08)
2
6
 
3
7
  * Added truncate String method
4
8
 
@@ -8,5 +8,5 @@ module CLIUtils
8
8
  SUMMARY = 'Sugary goodness for Ruby CLI apps.'
9
9
 
10
10
  # The current version of the gem
11
- VERSION = '2.2.5'
11
+ VERSION = '2.2.6'
12
12
  end
@@ -60,6 +60,7 @@ class String
60
60
  # @param [Fixnum] length The length to truncate at
61
61
  # @return [String]
62
62
  def truncate(length = 30)
63
+ return self if self.length < length
63
64
  self[0..length].gsub(/\s\w+\s*$/, '...')
64
65
  end
65
66
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cliutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.5
4
+ version: 2.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Bach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-09 00:00:00.000000000 Z
11
+ date: 2014-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler