libtmux-workspace 0.1.1 → 0.1.2
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 +51 -0
- data/README.md +36 -12
- data/lib/libtmux/workspace/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81a6e6bcb2e2b40052ea69a7ac812919bc40c061eff86d8f1ed24d74db1bdd89
|
|
4
|
+
data.tar.gz: bed554f76a48119e57294fa4199479ce7d9ce1e9864d9a3189224daa11979be7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 42b471a92bea5e05bfea43e6005c0373df57aa5606e00c1e72af64960e33b0de755edfb48d6b4f6b07b665b8d59c9ef45b71a0e62cca087bbe82b50d12117b02
|
|
7
|
+
data.tar.gz: 37069ac56ea23c718a2e1cf7029297151ca5672a96ca1d4420aeef4b3fbba99e6ead871aebe999e1dc0a828d3d75a9361549f52f20ca6b451c9d4f9300fbbe1e
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Notable changes to `libtmux-workspace`.
|
|
4
|
+
|
|
5
|
+
Releases are numbered `0.1.N`, and each release increments `N`. The API is not
|
|
6
|
+
settled: pin an exact version to avoid a break.
|
|
7
|
+
|
|
8
|
+
The gems are released together at one version, so every release has a section
|
|
9
|
+
here. Changes that span gems, such as documentation, CI and release tooling, are
|
|
10
|
+
in the [main changelog](../../CHANGELOG.md).
|
|
11
|
+
|
|
12
|
+
## 0.1.3 (unreleased)
|
|
13
|
+
|
|
14
|
+
## 0.1.2 (2026-11-04)
|
|
15
|
+
|
|
16
|
+
No entries for `libtmux-workspace`.
|
|
17
|
+
|
|
18
|
+
## 0.1.1 (2026-10-31)
|
|
19
|
+
|
|
20
|
+
- **Behavior change:** `libtmux-workspace load` and `plan --live` no longer
|
|
21
|
+
need `--socket`. Without it they use the same choice as `Server.new`, so a
|
|
22
|
+
command that failed with status 2 for a missing socket now acts on the
|
|
23
|
+
server tmux would pick. (#71)
|
|
24
|
+
|
|
25
|
+
## 0.1.0 (2026-10-25)
|
|
26
|
+
|
|
27
|
+
No entries for `libtmux-workspace`.
|
|
28
|
+
|
|
29
|
+
## 0.1.0.alpha.3 (2026-10-24)
|
|
30
|
+
|
|
31
|
+
No entries for `libtmux-workspace`.
|
|
32
|
+
|
|
33
|
+
## 0.1.0.alpha.2 (2026-10-18)
|
|
34
|
+
|
|
35
|
+
No entries for `libtmux-workspace`.
|
|
36
|
+
|
|
37
|
+
## 0.1.0.alpha.1 (2026-09-20)
|
|
38
|
+
|
|
39
|
+
### libtmux-workspace
|
|
40
|
+
|
|
41
|
+
- Load YAML or JSON with `LibTmux::Workspace.load` or `.parse`, inspect a
|
|
42
|
+
creation plan, then apply it explicitly. Supports the documented subset of
|
|
43
|
+
tmuxp-style configuration. [Workspace example](../../examples/workspace_apply.rb).
|
|
44
|
+
- Validate, plan and load from the `libtmux-workspace` CLI; optionally attach
|
|
45
|
+
or switch an explicit client after creation. `--version` reports the
|
|
46
|
+
installed gem version without reading a configuration or contacting tmux.
|
|
47
|
+
[CLI guide](../../gems/libtmux-workspace/README.md#script-it).
|
|
48
|
+
- Inspect partial application through `ApplyError#result`. Optional
|
|
49
|
+
compensation removes only a positively identified new session after
|
|
50
|
+
checking that its windows and panes belong to the apply operation.
|
|
51
|
+
[Failure results](../../gems/libtmux-workspace/README.md#recover-from-a-failed-apply).
|
data/README.md
CHANGED
|
@@ -185,26 +185,47 @@ and never reconciles an existing one.
|
|
|
185
185
|
[`Workspace.load`][workspace-load] reads the file,
|
|
186
186
|
[`workspace.plan`][workspace-plan-method] plans it against a snapshot, and
|
|
187
187
|
`apply` creates the session. Calling `apply` authorizes the configuration's
|
|
188
|
-
shell commands
|
|
188
|
+
shell commands.
|
|
189
|
+
|
|
190
|
+
[The example file](../../examples/api/workspace_apply.rb) writes the same
|
|
191
|
+
document to a temporary `workspace.yaml` before loading it, so it runs saved on
|
|
192
|
+
its own:
|
|
189
193
|
|
|
190
194
|
<!-- example: api_workspace_apply/main -->
|
|
191
195
|
```ruby
|
|
192
196
|
require "libtmux"
|
|
193
197
|
require "libtmux/workspace"
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
198
|
+
require "tmpdir"
|
|
199
|
+
|
|
200
|
+
document = <<~'YAML'
|
|
201
|
+
session_name: work
|
|
202
|
+
environment:
|
|
203
|
+
PROJECT_MODE: development
|
|
204
|
+
windows:
|
|
205
|
+
- window_name: editor
|
|
206
|
+
window_index: 1
|
|
207
|
+
layout: tiled
|
|
208
|
+
panes:
|
|
209
|
+
- shell_command: printf 'editor ready\n'
|
|
210
|
+
- {}
|
|
211
|
+
YAML
|
|
212
|
+
|
|
213
|
+
Dir.mktmpdir("workspace-") do |directory|
|
|
214
|
+
path = File.join(directory, "workspace.yaml")
|
|
215
|
+
File.write(path, document)
|
|
216
|
+
LibTmux::Server.start do |server|
|
|
217
|
+
workspace = LibTmux::Workspace.load(path)
|
|
218
|
+
plan = workspace.plan(snapshot: server.snapshot)
|
|
219
|
+
puts "planned steps: #{plan.steps.length}"
|
|
220
|
+
result = plan.apply(server: server)
|
|
221
|
+
puts "applied: #{result.success?}"
|
|
222
|
+
puts "sessions: #{server.list_sessions.map { |session| session.snapshot.name }.join(', ')}"
|
|
223
|
+
end
|
|
202
224
|
end
|
|
203
225
|
```
|
|
204
226
|
<!-- /example -->
|
|
205
227
|
|
|
206
|
-
The program runs
|
|
207
|
-
prints:
|
|
228
|
+
The program runs on a private server and prints:
|
|
208
229
|
|
|
209
230
|
```text
|
|
210
231
|
planned steps: 11
|
|
@@ -379,7 +400,10 @@ values by design.
|
|
|
379
400
|
|
|
380
401
|
Releases are numbered `0.1.N`, and each release increments `N`. The API is not
|
|
381
402
|
settled: any release may change or remove exported identifiers, and the
|
|
382
|
-
|
|
403
|
+
changelogs mark each break. Pin an exact version to avoid one.
|
|
404
|
+
See the [changelog](CHANGELOG.md), and the [main
|
|
405
|
+
changelog](https://github.com/libtmux/libtmux-ruby/blob/master/CHANGELOG.md)
|
|
406
|
+
for changes that span gems.
|
|
383
407
|
|
|
384
408
|
- **Ruby 3.3 or newer.** The gem depends on the same version of `libtmux`,
|
|
385
409
|
JSON 3.0 and Psych 5.5.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: libtmux-workspace
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- libtmux contributors
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.1.
|
|
18
|
+
version: 0.1.2
|
|
19
19
|
type: :runtime
|
|
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: 0.1.
|
|
25
|
+
version: 0.1.2
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: json
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -58,6 +58,7 @@ executables:
|
|
|
58
58
|
extensions: []
|
|
59
59
|
extra_rdoc_files: []
|
|
60
60
|
files:
|
|
61
|
+
- CHANGELOG.md
|
|
61
62
|
- LICENSE
|
|
62
63
|
- README.md
|
|
63
64
|
- assets/logo.png
|
|
@@ -76,7 +77,8 @@ licenses:
|
|
|
76
77
|
- MIT
|
|
77
78
|
metadata:
|
|
78
79
|
source_code_uri: https://github.com/libtmux/libtmux-ruby
|
|
79
|
-
|
|
80
|
+
changelog_uri: https://github.com/libtmux/libtmux-ruby/blob/master/gems/libtmux-workspace/CHANGELOG.md
|
|
81
|
+
documentation_uri: https://libtmux.org/en/ruby/v0.1.2/workspace/
|
|
80
82
|
rdoc_options: []
|
|
81
83
|
require_paths:
|
|
82
84
|
- lib
|