muxr 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e431ecab7ea6e49cf31e2865c3c870603847e422c9c1e5dfc8b86ff413b95f5
4
- data.tar.gz: e6db50aba85439befa78b6c89ec5dcd09f6d3cfa66195e0d552f403c229b7932
3
+ metadata.gz: 61893be4e6b1d4a0ce7d3c785ffc60e45d5b272ede1ce267a751760cf81ee442
4
+ data.tar.gz: d426522851cd327c560e7f384799749f6b575785a8e9b75ab15349494fa1edaa
5
5
  SHA512:
6
- metadata.gz: 2f0513da3cfba34c6efbc73c398934ada15ccb00b29958d4b5bf70b397cb7110819da8915acbbd13db4a8dd9d922551e3bf70d09c2dbf6247e2ebea598d2f9b5
7
- data.tar.gz: 9f0dcefe6bd25d5173044d88b81fc4efac0872b5961f010ed33e370335f341f2ee2ec98b5d0ed1ee50036a3675ba96ad3b33b50d95397ef32c6726eaabe0a29a
6
+ metadata.gz: f511b20a929bb4eb65d8a804bcf51b113357ad921eed44b1c4305aade2d78de07f158b4a84c5916a83405709417df569cd213aca9c5422610d51fa7b2a4aeed0
7
+ data.tar.gz: 357d7142c4087eae0833889893a9ed6080401ef7ba580f0d1fa7e8d0c94b8d69bb73a8f2f5ef76ee7397cfee1653c2eb11e8a38e00dff6f016ad9c0b8534a5c0
data/CHANGELOG.md CHANGED
@@ -6,6 +6,15 @@ follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.1] - 2026-05-11
10
+
11
+ ### Fixed
12
+ - `muxr --list` now reports sessions whose server is actually running
13
+ (live sockets in `~/.muxr/sockets/`) instead of `~/.muxr/sessions/*.json`,
14
+ which only exist after an explicit `:save` and so missed every live
15
+ session. The saved-snapshot enumeration is still available internally
16
+ via `Muxr::Session.list`.
17
+
9
18
  ## [0.1.0] - 2026-05-11
10
19
 
11
20
  Initial release.
@@ -42,5 +51,6 @@ Initial release.
42
51
  boundaries.
43
52
  - Renderer that composes one frame and diff-emits ANSI to STDOUT.
44
53
 
45
- [Unreleased]: https://github.com/roelbondoc/muxr/compare/v0.1.0...HEAD
54
+ [Unreleased]: https://github.com/roelbondoc/muxr/compare/v0.1.1...HEAD
55
+ [0.1.1]: https://github.com/roelbondoc/muxr/releases/tag/v0.1.1
46
56
  [0.1.0]: https://github.com/roelbondoc/muxr/releases/tag/v0.1.0
data/bin/muxr CHANGED
@@ -13,7 +13,7 @@ if ARGV.include?("-v") || ARGV.include?("--version")
13
13
  end
14
14
 
15
15
  if ARGV.include?("-l") || ARGV.include?("--list")
16
- names = Muxr::Session.list
16
+ names = Muxr::Application.list_active
17
17
  puts names.join("\n") unless names.empty?
18
18
  exit 0
19
19
  end
@@ -26,7 +26,7 @@ if ARGV.include?("-h") || ARGV.include?("--help")
26
26
  muxr attach the default session (auto-spawn if needed)
27
27
  muxr <name> attach (or start) the named session
28
28
  muxr -s <name> same as above
29
- muxr --list list saved session files and exit
29
+ muxr --list list running sessions and exit
30
30
  muxr --version print version and exit
31
31
  muxr --help this help
32
32
 
@@ -26,6 +26,27 @@ module Muxr
26
26
  File.join(SOCKETS_DIR, "#{name}.sock")
27
27
  end
28
28
 
29
+ # Names of sessions whose server socket is currently accepting connections.
30
+ # Stale sockets (file exists, no listener) are skipped but left in place;
31
+ # cleanup happens on the next attach attempt.
32
+ def self.list_active
33
+ return [] unless File.directory?(SOCKETS_DIR)
34
+ Dir.children(SOCKETS_DIR).filter_map do |entry|
35
+ next unless entry.end_with?(".sock")
36
+ path = File.join(SOCKETS_DIR, entry)
37
+ next unless alive_socket?(path)
38
+ File.basename(entry, ".sock")
39
+ end.sort
40
+ end
41
+
42
+ def self.alive_socket?(path)
43
+ return false unless File.exist?(path)
44
+ UNIXSocket.new(path).close
45
+ true
46
+ rescue SystemCallError
47
+ false
48
+ end
49
+
29
50
  def initialize(argv = [])
30
51
  @argv = argv
31
52
  @session_name = parse_session_name(argv)
data/lib/muxr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Muxr
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muxr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roel Bondoc