hiiro 0.1.335 → 0.1.337
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/CHANGELOG.md +11 -1
- data/lib/hiiro/ps_process.rb +6 -4
- data/lib/hiiro/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cdc7066a25c11d282e6e13914e89d1f17b93b1e6eebaadb3b78c445e9ad54730
|
|
4
|
+
data.tar.gz: ccfe1dacaa0fadff21f621d56743d99066fec4f911de70a58741504b8a9330a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c52eefc3e02bb0eadee1019f091facbfcd01509d6e57c32214032f901aebf3b0204afa1aacff3dfb3c4f9d793b298d11cf888fb02c6ddc24a0948c7737526c7
|
|
7
|
+
data.tar.gz: f2cc1b1cfbfae9fc3c6229e140779deeee162458d2b04e1ac04a61ea515e13161f5d6a70c93316c5f1c7bfc895baa8552c809d199434e4b42dd2f90d45be91e2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.337] - 2026-04-06
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Refactor `PsProcess#files` and `PsProcess#ports` to use `filter_map` instead of `map + compact` for cleaner code
|
|
7
|
+
|
|
8
|
+
## [0.1.336] - 2026-04-06
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- `PsProcess#ports` now uses `lsof -a` to AND conditions (was showing all system ports)
|
|
12
|
+
|
|
3
13
|
## [0.1.335] - 2026-04-07
|
|
4
14
|
|
|
5
15
|
### Added
|
|
@@ -370,4 +380,4 @@
|
|
|
370
380
|
## [0.1.295]
|
|
371
381
|
|
|
372
382
|
### Changed
|
|
373
|
-
- Filter logic changes for PR management
|
|
383
|
+
- Filter logic changes for PR management
|
data/lib/hiiro/ps_process.rb
CHANGED
|
@@ -73,18 +73,20 @@ class Hiiro::PsProcess
|
|
|
73
73
|
|
|
74
74
|
# Open files for this process
|
|
75
75
|
def files
|
|
76
|
-
`lsof -p #{pid} 2>/dev/null`.lines[1..]
|
|
76
|
+
lines = `lsof -p #{pid} 2>/dev/null`.lines[1..] || []
|
|
77
|
+
lines.filter_map do |line|
|
|
77
78
|
parts = line.split
|
|
78
79
|
{ fd: parts[3], type: parts[4], name: parts[8] } if parts.size >= 9
|
|
79
|
-
end
|
|
80
|
+
end
|
|
80
81
|
end
|
|
81
82
|
|
|
82
83
|
# Open network ports for this process
|
|
83
84
|
def ports
|
|
84
|
-
`lsof -p #{pid} -i 2>/dev/null`.lines[1..]
|
|
85
|
+
lines = `lsof -a -p #{pid} -i 2>/dev/null`.lines[1..] || []
|
|
86
|
+
lines.filter_map do |line|
|
|
85
87
|
parts = line.split
|
|
86
88
|
{ protocol: parts[7], name: parts[8] } if parts.size >= 9
|
|
87
|
-
end
|
|
89
|
+
end
|
|
88
90
|
end
|
|
89
91
|
|
|
90
92
|
# Current working directory
|
data/lib/hiiro/version.rb
CHANGED