carson 2.9.0 → 2.10.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 +4 -4
- data/API.md +1 -0
- data/MANUAL.md +1 -0
- data/RELEASE.md +17 -3
- data/VERSION +1 -1
- data/carson.gemspec +1 -1
- data/hooks/pre-merge-commit +1 -1
- data/hooks/pre-push +1 -1
- data/hooks/prepare-commit-msg +1 -1
- data/lib/carson/config.rb +1 -1
- data/lib/carson/policy/ruby/lint.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9b99975ce01b36b30e333553f7c491ebbf92591a3bc7dbc492633984b80a807a
|
|
4
|
+
data.tar.gz: 55c64697792a9400be1fef45a68731ac7eab6be3be517c79ae2caebd5f5edc9c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c716497d2db2c235dc5d8fa90c65fda8002722cabd7e8425305ce9c26917ebd48e905aed20564393d01178bd8d12257606097fdbf3ab1a77be71d1e48dc08681
|
|
7
|
+
data.tar.gz: 7f5358b84901463fbd1b211c3094df9c7c46566f9decc3a99d4d643264fc76e79de8b3c298d642c6efac41ecc16aa07647b52e66b6a822f7fff842345dfd9ab6
|
data/API.md
CHANGED
data/MANUAL.md
CHANGED
|
@@ -212,6 +212,7 @@ Common environment overrides:
|
|
|
212
212
|
| `CARSON_REVIEW_DISPOSITION_PREFIX` | Required prefix for disposition comments. |
|
|
213
213
|
| `CARSON_REVIEW_SWEEP_WINDOW_DAYS` | Lookback window for review sweep. |
|
|
214
214
|
| `CARSON_REVIEW_SWEEP_STATES` | PR states to include in sweep. |
|
|
215
|
+
| `CARSON_WORKFLOW_STYLE` | Workflow style override (`branch` or `trunk`). |
|
|
215
216
|
| `CARSON_RUBY_INDENTATION` | Ruby indentation policy (`tabs`, `spaces`, or `either`). |
|
|
216
217
|
|
|
217
218
|
For the full configuration schema and `lint.languages` definition, see `API.md`.
|
data/RELEASE.md
CHANGED
|
@@ -5,6 +5,19 @@ Release-note scope rule:
|
|
|
5
5
|
- `RELEASE.md` records only version deltas, breaking changes, and migration actions.
|
|
6
6
|
- Operational usage guides live in `MANUAL.md` and `API.md`.
|
|
7
7
|
|
|
8
|
+
## 2.10.0 — Lower Ruby Requirement to 3.4
|
|
9
|
+
|
|
10
|
+
### What changed
|
|
11
|
+
|
|
12
|
+
- **Minimum Ruby version lowered from 4.0 to 3.4.** Carson uses no Ruby 4.0-specific features. Lowering to 3.4 widens compatibility to the current stable Ruby series while enabling the `it` implicit block parameter.
|
|
13
|
+
- **Removed `# frozen_string_literal: true` pragma** from the one file that had it (`lib/carson/policy/ruby/lint.rb`). Ruby 4.0 freezes strings by default; the pragma is unnecessary.
|
|
14
|
+
- **Default workflow style now actually `branch` in code.** The 2.9.0 release notes documented this change, but the hooks and config default were not updated. Now fixed: hooks fall back to `branch`, config default is `branch`, and `CARSON_WORKFLOW_STYLE` env override is documented.
|
|
15
|
+
|
|
16
|
+
### What users must do now
|
|
17
|
+
|
|
18
|
+
1. Upgrade Carson to `2.10.0`.
|
|
19
|
+
2. Ruby 3.4 or later is now sufficient — Ruby 4.0 is no longer required.
|
|
20
|
+
|
|
8
21
|
## 2.9.0 — Concise UX for All Commands
|
|
9
22
|
|
|
10
23
|
### What changed
|
|
@@ -14,16 +27,19 @@ Release-note scope rule:
|
|
|
14
27
|
- **Audit concise output.** A healthy audit prints one line (`Audit: ok`). Problems print only actionable summaries (e.g. `Hooks: mismatch — run carson prepare.`).
|
|
15
28
|
- **Refresh concise output.** Prints ~5 lines: hooks installed, templates in sync, audit result, done.
|
|
16
29
|
- **All other commands.** `prepare`, `inspect`, `offboard`, `template check/apply`, `prune`, `review gate/sweep`, `govern`, `lint setup`, `setup`, and `housekeep` all follow the same concise/verbose pattern.
|
|
30
|
+
- **Default workflow style changed from `trunk` to `branch`.** All governed repositories now enforce PR-only merges by default. Direct commits, merge commits, and pushes to protected branches (`main`/`master`) are blocked by hooks unless explicitly opted out.
|
|
17
31
|
|
|
18
32
|
### What users must do now
|
|
19
33
|
|
|
20
34
|
1. Upgrade Carson to `2.9.0`.
|
|
21
35
|
2. Use `--verbose` when you need full diagnostics (debugging, CI troubleshooting).
|
|
36
|
+
3. If you rely on direct commits to main, re-run `carson setup` and choose `trunk`, or set `CARSON_WORKFLOW_STYLE=trunk` in your environment.
|
|
22
37
|
|
|
23
38
|
### Breaking or removed behaviour
|
|
24
39
|
|
|
25
40
|
- Default output is now concise. Scripts that parse Carson's key-value diagnostic lines must add `--verbose`.
|
|
26
41
|
- Removed `@concise` internal flag (replaced by `--verbose` opt-in pattern).
|
|
42
|
+
- Default `workflow.style` changed from `trunk` to `branch`. Repositories that previously relied on the implicit `trunk` default will now block direct commits to protected branches. Escape hatches: run `carson setup` to choose `trunk`, or set `CARSON_WORKFLOW_STYLE=trunk`.
|
|
27
43
|
|
|
28
44
|
### Upgrade steps
|
|
29
45
|
|
|
@@ -41,16 +57,14 @@ carson version
|
|
|
41
57
|
- **Concise onboard output.** `carson onboard` now prints a clean 8-line summary instead of verbose internal state (hook paths, template statuses, config lines). Tells users what happened, what needs attention, and what to do next.
|
|
42
58
|
- **Graceful handling of fresh repos.** Onboard no longer fails with a fatal error on repositories with no commits yet.
|
|
43
59
|
- **Suppressed RubyGems PATH warning.** The misleading `WARNING: You don't have ... in your PATH, gem executables will not run` message from `gem install --user-install` is now suppressed during installation. Carson symlinks the executable to `~/.carson/bin`, making the gem bin directory irrelevant.
|
|
44
|
-
- **Default workflow style changed from `trunk` to `branch`.** All governed repositories now enforce PR-only merges by default. Direct commits, merge commits, and pushes to protected branches (`main`/`master`) are blocked by hooks unless explicitly opted out.
|
|
45
60
|
|
|
46
61
|
### What users must do now
|
|
47
62
|
|
|
48
63
|
1. Upgrade Carson to `2.8.1`.
|
|
49
|
-
2. If you rely on direct commits to main, re-run `carson setup` and choose `trunk`, or set `CARSON_WORKFLOW_STYLE=trunk` in your environment.
|
|
50
64
|
|
|
51
65
|
### Breaking or removed behaviour
|
|
52
66
|
|
|
53
|
-
-
|
|
67
|
+
- None.
|
|
54
68
|
|
|
55
69
|
### Upgrade steps
|
|
56
70
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.10.0
|
data/carson.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
spec.description = "Carson runs outside host repositories and applies governance checks, review gates, and managed GitHub-native files."
|
|
12
12
|
spec.homepage = "https://github.com/wanghailei/carson"
|
|
13
13
|
spec.license = "MIT"
|
|
14
|
-
spec.required_ruby_version = ">= 4
|
|
14
|
+
spec.required_ruby_version = ">= 3.4"
|
|
15
15
|
spec.metadata = {
|
|
16
16
|
"source_code_uri" => "https://github.com/wanghailei/carson",
|
|
17
17
|
"changelog_uri" => "https://github.com/wanghailei/carson/blob/main/RELEASE.md",
|
data/hooks/pre-merge-commit
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
hooks_dir="$(cd "$(dirname "$0")" && pwd)"
|
|
5
|
-
style="$(cat "$hooks_dir/workflow_style" 2>/dev/null || echo "
|
|
5
|
+
style="$(cat "$hooks_dir/workflow_style" 2>/dev/null || echo "branch")"
|
|
6
6
|
[ "$style" = "trunk" ] && exit 0
|
|
7
7
|
|
|
8
8
|
branch_name="$(git rev-parse --abbrev-ref HEAD)"
|
data/hooks/pre-push
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
hooks_dir="$(cd "$(dirname "$0")" && pwd)"
|
|
5
|
-
style="$(cat "$hooks_dir/workflow_style" 2>/dev/null || echo "
|
|
5
|
+
style="$(cat "$hooks_dir/workflow_style" 2>/dev/null || echo "branch")"
|
|
6
6
|
[ "$style" = "trunk" ] && exit 0
|
|
7
7
|
|
|
8
8
|
remote_name="${1:-unknown}"
|
data/hooks/prepare-commit-msg
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
hooks_dir="$(cd "$(dirname "$0")" && pwd)"
|
|
5
|
-
style="$(cat "$hooks_dir/workflow_style" 2>/dev/null || echo "
|
|
5
|
+
style="$(cat "$hooks_dir/workflow_style" 2>/dev/null || echo "branch")"
|
|
6
6
|
[ "$style" = "trunk" ] && exit 0
|
|
7
7
|
|
|
8
8
|
branch_name="$(git rev-parse --abbrev-ref HEAD)"
|
data/lib/carson/config.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: carson
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hailei Wang
|
|
@@ -88,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
88
88
|
requirements:
|
|
89
89
|
- - ">="
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
|
-
version: '4
|
|
91
|
+
version: '3.4'
|
|
92
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - ">="
|