unix-ps 0.0.6 → 0.0.7
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 +4 -4
- data/lib/unix-ps.rb +5 -2
- data/lib/unix-ps/version.rb +1 -1
- 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: bd82f166833e94a423d3978a303ced680cbee260
|
|
4
|
+
data.tar.gz: a04e9408d1cd52f7eef4be1f8ecded02150d8472
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c960baa6743e108bd2a5c0cc9f30e442485f20ab140b6a50810a41ea9bb22b373cc9185dc7914eb4788e9d54badf5578f6055367d4219ad640ab84f6735943dc
|
|
7
|
+
data.tar.gz: 08d5f87b565140d1fa14556b36f98b198cdcd7035190c6c67a059c9b887ed3ad39996b300729c5b6a6966b42f220219847aedb5ca0e1403da3668c6793782340
|
data/lib/unix-ps.rb
CHANGED
|
@@ -18,6 +18,7 @@ module UnixPs
|
|
|
18
18
|
# losing consistency.
|
|
19
19
|
file = Tempfile.new('unix-ps')
|
|
20
20
|
file.write(ps_output)
|
|
21
|
+
file.close
|
|
21
22
|
|
|
22
23
|
# Lines to create process objects from
|
|
23
24
|
lines = nil
|
|
@@ -33,8 +34,8 @@ module UnixPs
|
|
|
33
34
|
line.push(command)
|
|
34
35
|
}
|
|
35
36
|
else
|
|
36
|
-
lines =
|
|
37
|
-
command_columns =
|
|
37
|
+
lines = `cat #{file.path} | awk '{print #{@columns}}'`.lines
|
|
38
|
+
command_columns = `cat #{file.path}| awk '{#{@command_column}}'`.lines
|
|
38
39
|
|
|
39
40
|
# Merge columns + command column
|
|
40
41
|
lines = lines.each_with_index.map {|line, index|
|
|
@@ -44,6 +45,8 @@ module UnixPs
|
|
|
44
45
|
}
|
|
45
46
|
end
|
|
46
47
|
|
|
48
|
+
file.unlink
|
|
49
|
+
|
|
47
50
|
# Pop off header columns
|
|
48
51
|
lines.shift
|
|
49
52
|
|
data/lib/unix-ps/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: unix-ps
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Parraga
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-06-
|
|
11
|
+
date: 2014-06-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: A Ruby wrapper around the unix tool ps.
|
|
14
14
|
email:
|