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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67f1d8ae912d503b3f05aa72b9740ab8610899bf110ff6c9def7a491e2ab1467
4
- data.tar.gz: b508046883150482276d3647766aa3beedd7d63e658662eb8643a8667262a355
3
+ metadata.gz: 81a6e6bcb2e2b40052ea69a7ac812919bc40c061eff86d8f1ed24d74db1bdd89
4
+ data.tar.gz: bed554f76a48119e57294fa4199479ce7d9ce1e9864d9a3189224daa11979be7
5
5
  SHA512:
6
- metadata.gz: d2a319893795e19c71a96ef8060f5468fbbd9218bd566ded215872e057064da62c53cd6c0883f98191ead6f7b7d7ff8cf2c3682eca7d6c8d2a5af56d46fdede5
7
- data.tar.gz: e725e40e92e6515ea0cb8d49c5b7051e0e7a89499a97c7cd9c4254d19d0a865a9b8621a0381cca32d008e164f062974437ab78dc1abea8849800fd317cc652bd
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
- LibTmux::Server.start do |server|
196
- workspace = LibTmux::Workspace.load(File.expand_path("../workspace.yaml", __dir__))
197
- plan = workspace.plan(snapshot: server.snapshot)
198
- puts "planned steps: #{plan.steps.length}"
199
- result = plan.apply(server: server)
200
- puts "applied: #{result.success?}"
201
- puts "sessions: #{server.list_sessions.map { |session| session.snapshot.name }.join(', ')}"
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 next to the `workspace.yaml` above, on a private server, and
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
- changelog marks each break. Pin an exact version to avoid one.
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.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module LibTmux
4
4
  class Workspace
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
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.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.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.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
- documentation_uri: https://libtmux.org/en/ruby/v0.1.1/workspace/
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