brunch 0.9.2 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f7a05f3aae716ba9e82f616156c85380fad4437a5d0d440056a834999830fc6
4
- data.tar.gz: dccd1027c1fb0a185807427cfe0ffbe06bc94362f656de08a064f52786c39ee2
3
+ metadata.gz: c9e410a84d1fd30ba484345f2027d5253ed9596f0b5f26efa1add8d2b863a750
4
+ data.tar.gz: 75cf5154603bf83bf8a439f16a2489ff4bf5dda9ce9bb7dc6340e2591559458c
5
5
  SHA512:
6
- metadata.gz: 550ae4c541eabe5196634628561c094e28039a578ccbb795c97ee41bb67b20fd48a58d4742bd685b877da57654784daa6a57004697422ad5b15f633199e9dc33
7
- data.tar.gz: b6e4d92569d518d6ba19a8eb2b326996d0351a00cae53a03e4eecd23f0653a3cf5a6247a0db199b34050a47c49d8434e3ff6148860136dc99856fe8616f97ddc
6
+ metadata.gz: 7cfe235dfe3e43525d0a5fcaf6c8e9fa0e26d31816eec9dde3b57a2474b5b92624f069465a6b8f5b0be580ac97aeadccf44eb9441afeb54e99ea73f77d225316
7
+ data.tar.gz: 909b5e6ebb1f6cb14395dc68636db0e24cb26fe24acfedc45def14dd37ea0989b0500e07d8362fb04b92361d3b6d90f954df3edfa783b72fe1f7edcc23f3c49e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0 - 2026-10-16
4
+
5
+ - Recover automatically when a stopped Compose environment cannot resume: Brunch
6
+ recreates the failed environment instead of leaving its worktree unavailable.
7
+ - Correctly reconcile forced branch renames such as `git branch -M source target`
8
+ when the destination already has an environment.
9
+ - Keep the 100% line and branch coverage gate for the regular test suite while
10
+ allowing manager integration jobs to report functional failures directly.
11
+ - Clarify the lifecycle of stopped Compose containers, Rails PID files, forced
12
+ branch renames, and `brunch cleanup`.
13
+
3
14
  ## 0.9.2 - 2026-10-05
4
15
 
5
16
  - Settle branch deletions automatically after the Git process exits, preserving
data/README.md CHANGED
@@ -140,6 +140,15 @@ With Compose, each branch keeps its own Compose project and named volumes, so pe
140
140
  Returning to a previously activated branch starts its stopped containers again,
141
141
  preserving files written inside them. The branch keeps the same host port.
142
142
 
143
+ If a resumed Compose application exits immediately, Brunch recreates that
144
+ environment automatically. This recovers the worktree but discards files kept
145
+ only in the container's writable layer; named volumes remain intact.
146
+
147
+ Applications that write a PID file inside the container should remove it before
148
+ starting. For example, a Rails Compose command can begin with
149
+ `rm -f /tmp/rails-server.pid &&`. A stopped container keeps its writable layer,
150
+ including a stale PID file, until it is recreated.
151
+
143
152
  To manually start the environment after `brunch stop`:
144
153
 
145
154
  ```bash
@@ -194,6 +203,10 @@ brunch watch
194
203
 
195
204
  Switching branches inside one worktree does not affect environments running in other worktrees.
196
205
 
206
+ For reliable automatic handling of forced branch renames such as
207
+ `git branch -M source target`, use a Git version supported by `ghe doctor` and
208
+ run `brunch install` after upgrading git-hooks-ext.
209
+
197
210
  If you create a worktree with plain Git:
198
211
 
199
212
  ```bash
@@ -214,6 +227,9 @@ brunch cleanup
214
227
  ```
215
228
 
216
229
  Brunch never deletes the worktree source directory.
230
+ It removes environments for worktrees that Git no longer reports; it does not
231
+ act as a general-purpose command for deleting the current worktree's stopped
232
+ containers or volumes.
217
233
 
218
234
  ## Managers
219
235
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Brunch
4
- VERSION = "0.9.2"
4
+ VERSION = "1.0.0"
5
5
  end
@@ -130,16 +130,16 @@ module Brunch
130
130
  end
131
131
  if existing && !force && existing["snapshot"] == path && existing["status"] != "starting"
132
132
  with_state_lock { |data| data.fetch("worktrees").fetch(id)["current"] = ref }
133
- unless worktree_manager(existing).resume(existing)
134
- abort "Could not resume environment for #{path}; the container may have exited. Check brunch logs. " \
135
- "If dependencies changed, rebuild with brunch restart (this replaces the container)."
133
+ if worktree_manager(existing).resume(existing)
134
+ with_state_lock do |data|
135
+ data.fetch("worktrees").fetch(id).fetch("environments").fetch(ref)["status"] = "running"
136
+ end
137
+ puts "Resumed #{ref} in #{path} at http://127.0.0.1:#{existing.fetch('port')}"
138
+ return
136
139
  end
137
140
 
138
- with_state_lock do |data|
139
- data.fetch("worktrees").fetch(id).fetch("environments").fetch(ref)["status"] = "running"
140
- end
141
- puts "Resumed #{ref} in #{path} at http://127.0.0.1:#{existing.fetch('port')}"
142
- return
141
+ warn "Could not resume #{ref}; recreating its environment."
142
+ force = true
143
143
  end
144
144
  abort "Could not reset environment for #{path}." if existing && !worktree_manager(existing).reset(existing)
145
145
 
@@ -331,7 +331,7 @@ module Brunch
331
331
  renamed = renamed_branch(ref, nil, refs)
332
332
  next if renamed == :unknown
333
333
 
334
- renamed ? rename_branch_environments(ref, renamed) : remove_branch_environments(ref)
334
+ renamed ? rename_branch_environments(ref, renamed, replace_existing: true) : remove_branch_environments(ref)
335
335
  end
336
336
  end
337
337
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brunch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Ciemborowicz