pstream 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/pstream +1 -1
  3. data/lib/string.rb +2 -38
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b73357ec04f38efadee697d2e1d50fd9e893624
4
- data.tar.gz: e9312b8c5790d0e9aaadfb95d87709fac6b89e84
3
+ metadata.gz: 1afe70b3724cd8353c6bd17031e138c7dd42b50b
4
+ data.tar.gz: 4d3bf554e42032d0cbc2c881cc9fa21aab4bd251
5
5
  SHA512:
6
- metadata.gz: d6ebe3439c8ab3f174d1304b7b21040111cb6c66b5f3ac735f3e9d07d76d28fcad77909ad7c8460302c9ce213032520dea0bd06fd04b77985e734290a52eea2b
7
- data.tar.gz: 27e9a34dd5a0b36e5b886a8c422ca71bdd4081b517ea1d52750dc11318ed77421203c485c4d2f854527f1958d53e344da4fab46b2589b0af9409f7ee1f7f55b3
6
+ metadata.gz: 08103ae437935a21d93334da06aabc13687c5dfcf3d9d1ff6b426e60311605cdf9a6788063fcee666cf4c7ae5ec8e1b3fd79f1752d00f0987cd7027b2599745c
7
+ data.tar.gz: 71803c79752fdb01a8b268eb589017ddc191bf30d88a29ed90ed4a9ac02654f3e4fe47fd8985ae58d3396f1fe0c8e9e2d31f395ce1cbb725a2c18d5da4855817
data/bin/pstream CHANGED
@@ -46,7 +46,7 @@ def parse(args)
46
46
  options["prot"] = "udp"
47
47
  end
48
48
 
49
- opts.on("", info.word_wrap(80))
49
+ opts.on("", info.word_wrap)
50
50
  end
51
51
 
52
52
  begin
data/lib/string.rb CHANGED
@@ -1,48 +1,12 @@
1
- # Redefine String class to allow for colorizing, rsplit, and word wrap
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 white
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
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-05 00:00:00.000000000 Z
11
+ date: 2016-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: scoobydoo