unix-ps 0.0.6 → 0.0.7

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: f16e04a071fb0ccb9b9f4958f9e0b209b0a5ac93
4
- data.tar.gz: d6cad38e3b12f2fbdfc750c03b4880824ef3a531
3
+ metadata.gz: bd82f166833e94a423d3978a303ced680cbee260
4
+ data.tar.gz: a04e9408d1cd52f7eef4be1f8ecded02150d8472
5
5
  SHA512:
6
- metadata.gz: 41ea42ca75d70c1b8e351cad0bfe9755e4184cffe61d51e31c5563f087d676da8672cce750c4aa99a2dea79d3c47a8d2fe8ec9f3bd4e1229862497c8422ba69e
7
- data.tar.gz: b01c42d6491aec3f0de06d49a62c8463d5ac7e67ecdea375ec6a3904c71f99437f77b2f92238eb85821384912d591030f60e422b6466ae0217a324dd1b604fb9
6
+ metadata.gz: c960baa6743e108bd2a5c0cc9f30e442485f20ab140b6a50810a41ea9bb22b373cc9185dc7914eb4788e9d54badf5578f6055367d4219ad640ab84f6735943dc
7
+ data.tar.gz: 08d5f87b565140d1fa14556b36f98b198cdcd7035190c6c67a059c9b887ed3ad39996b300729c5b6a6966b42f220219847aedb5ca0e1403da3668c6793782340
@@ -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 = `#{file.path} | awk '{print #{@columns}}'`.lines
37
- command_columns = `#{file.path}| awk '{#{@command_column}}'`.lines
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
 
@@ -1,3 +1,3 @@
1
1
  module UnixPs
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
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.6
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-13 00:00:00.000000000 Z
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: