pstream 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/pstream +1 -1
- data/lib/string.rb +2 -38
- 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: 1afe70b3724cd8353c6bd17031e138c7dd42b50b
|
4
|
+
data.tar.gz: 4d3bf554e42032d0cbc2c881cc9fa21aab4bd251
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08103ae437935a21d93334da06aabc13687c5dfcf3d9d1ff6b426e60311605cdf9a6788063fcee666cf4c7ae5ec8e1b3fd79f1752d00f0987cd7027b2599745c
|
7
|
+
data.tar.gz: 71803c79752fdb01a8b268eb589017ddc191bf30d88a29ed90ed4a9ac02654f3e4fe47fd8985ae58d3396f1fe0c8e9e2d31f395ce1cbb725a2c18d5da4855817
|
data/bin/pstream
CHANGED
data/lib/string.rb
CHANGED
@@ -1,48 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# Modify String class to allow for rsplit and word wrap
|
2
2
|
class String
|
3
|
-
def black
|
4
|
-
return colorize(30)
|
5
|
-
end
|
6
|
-
|
7
|
-
def blue
|
8
|
-
return colorize(34)
|
9
|
-
end
|
10
|
-
|
11
|
-
def colorize(color)
|
12
|
-
return "\e[#{color}m#{self}\e[0m"
|
13
|
-
end
|
14
|
-
|
15
|
-
def cyan
|
16
|
-
return colorize(36)
|
17
|
-
end
|
18
|
-
|
19
|
-
def green
|
20
|
-
return colorize(32)
|
21
|
-
end
|
22
|
-
|
23
|
-
def purple
|
24
|
-
return colorize(35)
|
25
|
-
end
|
26
|
-
|
27
|
-
def red
|
28
|
-
return colorize(31)
|
29
|
-
end
|
30
|
-
|
31
3
|
def rsplit(pattern)
|
32
4
|
ret = rpartition(pattern)
|
33
5
|
ret.delete_at(1)
|
34
6
|
return ret
|
35
7
|
end
|
36
8
|
|
37
|
-
def
|
38
|
-
return colorize(37)
|
39
|
-
end
|
40
|
-
|
41
|
-
def word_wrap(width = 70)
|
9
|
+
def word_wrap(width = 80)
|
42
10
|
return scan(/\S.{0,#{width}}\S(?=\s|$)|\S+/).join("\n")
|
43
11
|
end
|
44
|
-
|
45
|
-
def yellow
|
46
|
-
return colorize(33)
|
47
|
-
end
|
48
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pstream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: scoobydoo
|