cliutils 2.2.4 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22d89bf09880e4097926da86a0f1bbc82a936a2e
4
- data.tar.gz: 73eb357b08b13f71c0dddbabbf8b35a2fc2232d1
3
+ metadata.gz: 381dc60476fc447deccdb6d6ad014317ae2784ec
4
+ data.tar.gz: 24fc1307bbb0bf38aa08a4c5b5fe15c278108a3c
5
5
  SHA512:
6
- metadata.gz: 7a8d23a944fafa0d411d2fb67242a28ce8f0fe9a277a92897dee4e4d1bbfab745c9c52c1fc31c2e46d6fdad4bd63f03571ff3f1228c0a55c9b79dcf5e5bb6f7c
7
- data.tar.gz: 276cb215166ff16801ef437d1e7d68bf4258da690146316c0387ef4372d71b4a5d843c0fd8d35eec2499164d743f631e03f9e0630a4ad2365dd2cd1ed4d7bdfc
6
+ metadata.gz: ffd39e65b7fa7b305a0251c91a118948f4078b89c4063c5469da316667d6c674e1666797ca570ffcae5f0172f5b508c46366909ad6b8d233ae5ad112eea40cf5
7
+ data.tar.gz: 97a14e4864053fc4a61a4595a90b16283ea864e52846a9626f06dccdee6c2a6ab36949a65e966289e026d2516e91179ad133a1af01903830d6f3267ece189c45
data/.travis.yml CHANGED
@@ -3,4 +3,3 @@ rvm:
3
3
  - 2.1
4
4
  - 2.0.0
5
5
  - 1.9.3
6
- - rbx
data/HISTORY.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # 2.2.4 (2014-05-05)
2
2
 
3
+ * Added truncate String method
4
+
5
+ # 2.2.4 (2014-05-05)
6
+
3
7
  * Fixed a bug with dot-notation access in Configurator
4
8
 
5
9
  # 2.2.3 (2014-05-04)
data/README.md CHANGED
@@ -42,7 +42,6 @@ CLIUtils is certified against the following:
42
42
  * Ruby 2.1.0
43
43
  * Ruby 2.0.0
44
44
  * Ruby 1.9.3
45
- * rbx
46
45
 
47
46
  # Installation
48
47
 
@@ -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.4'
11
+ VERSION = '2.2.5'
12
12
  end
@@ -55,6 +55,14 @@ class String
55
55
  downcase
56
56
  end
57
57
 
58
+ # Truncates a string to a certain length
59
+ # and adds an ellipsis after.
60
+ # @param [Fixnum] length The length to truncate at
61
+ # @return [String]
62
+ def truncate(length = 30)
63
+ self[0..length].gsub(/\s\w+\s*$/, '...')
64
+ end
65
+
58
66
  # Makes the associated string white.
59
67
  # @return [void]
60
68
  def white
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.4
4
+ version: 2.2.5
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-06 00:00:00.000000000 Z
11
+ date: 2014-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler