pstree 0.5.0 → 0.6.0
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/CHANGES.md +13 -0
- data/Rakefile +5 -0
- data/VERSION +1 -1
- data/lib/pstree/version.rb +1 -1
- data/lib/pstree.rb +10 -1
- data/pstree.gemspec +4 -4
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 62bc08271e7bb6e098322248dfbe0e7ac1c7a044bf7802c4863a29c72fb6a8dd
|
|
4
|
+
data.tar.gz: e3fef7f619bafe0175245538f1851b2019c079d80f4e21720f769ed34e366ad6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e493bb3a0ec7332a293db54c89b109766e5741c9292cda2c11952b8f474976e8bfe9e2907aff8000e269af5e39c7346f38f397d4d549e39d80b0b6a8444391e
|
|
7
|
+
data.tar.gz: 891a5c43c58b2e67818e286af85c6d19c9e9c5d1f2367883d6719166ea123c7bfcf64e9866356c6a1f48f0acf51cbd676a684c57121860b1d83cbad439be67e9
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-01-02 v0.6.0
|
|
4
|
+
|
|
5
|
+
- Added caching mechanism for `/bin/ps` command output using the `psoutput`
|
|
6
|
+
method with `@psoutput ||= ...` memoization pattern
|
|
7
|
+
- Maintained backward compatibility while improving performance by avoiding
|
|
8
|
+
repeated system calls
|
|
9
|
+
- Introduced automated changelog generation configuration in the Rakefile with
|
|
10
|
+
`changelog` block setting `filename` to `'CHANGES.md'`
|
|
11
|
+
- Updated gem dependencies including `rubygems_version` from **3.6.9** to
|
|
12
|
+
**4.0.2** and `gem_hadar` development dependency from **~> 2.1** to **>=
|
|
13
|
+
2.16.3**
|
|
14
|
+
- Enabled proper changelog handling during gem packaging and release workflows
|
|
15
|
+
|
|
3
16
|
## 2025-08-19 v0.5.0
|
|
4
17
|
|
|
5
18
|
- **Documentation**: Comprehensive YARD documentation added to all classes and
|
data/Rakefile
CHANGED
|
@@ -12,6 +12,11 @@ GemHadar do
|
|
|
12
12
|
summary 'Ruby library that builds a process tree of this host'
|
|
13
13
|
description 'This library uses the output of the ps command to creaste process tree data structure for the current host.'
|
|
14
14
|
licenses << 'GPL-2'
|
|
15
|
+
|
|
16
|
+
changelog do
|
|
17
|
+
filename 'CHANGES.md'
|
|
18
|
+
end
|
|
19
|
+
|
|
15
20
|
test_dir 'tests'
|
|
16
21
|
ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.rvmrc', 'coverage',
|
|
17
22
|
'.yardoc', 'doc'
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.6.0
|
data/lib/pstree/version.rb
CHANGED
data/lib/pstree.rb
CHANGED
|
@@ -165,7 +165,6 @@ class PSTree
|
|
|
165
165
|
@child_count = [ 0 ]
|
|
166
166
|
@process = {}
|
|
167
167
|
@pstree = Hash.new { |h,k| h[k] = [] }
|
|
168
|
-
psoutput = `/bin/ps axww -o ppid,pid,user,command`
|
|
169
168
|
psoutput.each_line do |line|
|
|
170
169
|
next if line !~ /^\s*\d+/
|
|
171
170
|
line.strip!
|
|
@@ -175,6 +174,16 @@ class PSTree
|
|
|
175
174
|
end
|
|
176
175
|
end
|
|
177
176
|
|
|
177
|
+
# The psoutput method executes the ps command to retrieve process information
|
|
178
|
+
# and caches the result for subsequent calls
|
|
179
|
+
#
|
|
180
|
+
# @return [ String ] the raw output from the ps command containing process
|
|
181
|
+
# information including parent process ID, process ID, user,
|
|
182
|
+
# and command line for all running processes
|
|
183
|
+
def psoutput
|
|
184
|
+
@psoutput ||= `/bin/ps axww -o ppid,pid,user,command`
|
|
185
|
+
end
|
|
186
|
+
|
|
178
187
|
# The recurse method performs a recursive traversal of the process tree
|
|
179
188
|
# starting from a given process ID.
|
|
180
189
|
#
|
data/pstree.gemspec
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: pstree 0.
|
|
2
|
+
# stub: pstree 0.6.0 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "pstree".freeze
|
|
6
|
-
s.version = "0.
|
|
6
|
+
s.version = "0.6.0".freeze
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
9
9
|
s.require_paths = ["lib".freeze]
|
|
@@ -17,10 +17,10 @@ Gem::Specification.new do |s|
|
|
|
17
17
|
s.homepage = "https://github.com/flori/pstree".freeze
|
|
18
18
|
s.licenses = ["GPL-2".freeze]
|
|
19
19
|
s.rdoc_options = ["--title".freeze, "Pstree - Ruby library that builds a process tree of this host".freeze, "--main".freeze, "README.md".freeze]
|
|
20
|
-
s.rubygems_version = "
|
|
20
|
+
s.rubygems_version = "4.0.2".freeze
|
|
21
21
|
s.summary = "Ruby library that builds a process tree of this host".freeze
|
|
22
22
|
|
|
23
23
|
s.specification_version = 4
|
|
24
24
|
|
|
25
|
-
s.add_development_dependency(%q<gem_hadar>.freeze, ["
|
|
25
|
+
s.add_development_dependency(%q<gem_hadar>.freeze, [">= 2.16.3".freeze])
|
|
26
26
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pstree
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Frank
|
|
@@ -13,16 +13,16 @@ dependencies:
|
|
|
13
13
|
name: gem_hadar
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
|
-
- - "
|
|
16
|
+
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 2.16.3
|
|
19
19
|
type: :development
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
|
-
- - "
|
|
23
|
+
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version:
|
|
25
|
+
version: 2.16.3
|
|
26
26
|
description: This library uses the output of the ps command to creaste process tree
|
|
27
27
|
data structure for the current host.
|
|
28
28
|
email: flori@ping.de
|
|
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
requirements: []
|
|
70
|
-
rubygems_version:
|
|
70
|
+
rubygems_version: 4.0.2
|
|
71
71
|
specification_version: 4
|
|
72
72
|
summary: Ruby library that builds a process tree of this host
|
|
73
73
|
test_files: []
|