okf-pro 1.1.0 → 1.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: a908d8394cc7ea78e25a744f080813d34eb656b77274e3bb8db4397d222c3950
4
- data.tar.gz: 687919c65db7bf0d42bc48f475cd88f636c01aaf87f49443d92c6de0fd434fb9
3
+ metadata.gz: 5aa082e7d1ee662bf38b9f16302377b930e9739766dfd24921b5b42867f8c5de
4
+ data.tar.gz: 30f2caaa6dc5a517dd80ca2b8869946332f7da11513db3ef4d8370da921bc623
5
5
  SHA512:
6
- metadata.gz: '0589ad1bd8edb04b767044692d20b271614fe37d60f598fe1b51ba436384142049da27d94d8281df54b0a485b658751e7ef2fe3d4c84a292b4593a61502d6c87'
7
- data.tar.gz: 7afe1c08143bf0524f9deb5ce47e827276b59aa805f62cb65b2be5e5414bb542b1208a4b2a59826443ab1fde4e5680066fd047e6236007afc8b3e1b0e04e7ae3
6
+ metadata.gz: 196051ae74e6a129bb82f99b8865d827f9b12ccc27d1b7a51784b2227c412baf867a5df26e13536d7e35b63196cbcb7601638f7f7876fdd7d73734bfb73e17ab
7
+ data.tar.gz: 9105128a81dfa9e195395ebb3de2759c4c64b9d4f93ce77ed87d5dd36a02299c9d9f642da913f5e0590f62b19af422f6ef710ae29bd91755dfb59a86dd0036f5
@@ -37,6 +37,16 @@ the two together.
37
37
  It does not go through `dir_argument`: `setup` into an empty directory is the
38
38
  whole point, and refusing one that holds no bundle would refuse every first run.
39
39
 
40
+ It does go through `parse_flags`, and for a while it was the only family that
41
+ did not. `--help` therefore reached the verb as its destination, and the
42
+ generator answered the question by running. `setup --help` wrote twenty-five
43
+ seed files into a directory named `--help`. `upgrade --help` rewrote the four
44
+ gem-owned files of whatever repository you were standing in, because `upgrade`
45
+ defaults its destination to the working directory. Both exited 0.
46
+
47
+ None of the three declares a flag, and none needs a `FLAGS` entry to refuse
48
+ one: absence from that table already means "accepts none".
49
+
40
50
  **Readers** (`audit`, `records`, `snapshot`, `unverified`, `state`, `board`,
41
51
  `friction`) answer questions. Every one of them routes through `parse_flags`,
42
52
  listed in `FLAGS` or not — because absence from that table means "accepts none",
data/.okf/log.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Update Log
2
2
 
3
+ ## 2026-08-30
4
+
5
+ * **The scaffold verbs go through `parse_flags` too, and the catalogue says so.**
6
+ [capabilities/verbs](/capabilities/verbs.md) described the family by what it
7
+ does *not* do: no `dir_argument`, because `setup` into an empty directory is
8
+ the point. That omission read as an exemption from the parser as well, and it
9
+ was one. `--help` reached the verb as its destination, so the generator
10
+ answered the question by running. The paragraph now names both halves, and
11
+ [testing/adding-a-verb](/testing/adding-a-verb.md) step 5 says it too. **A
12
+ family defined only by its exception gets extended in the direction of the
13
+ exception**, and the next reader pays for that.
14
+
3
15
  ## 2026-08-19
4
16
 
5
17
  * **Every concept declares `generated:`.** The dates are read from git with
@@ -39,7 +39,9 @@ its caller's typo as a broken bundle; a check that returns 1 is read as
39
39
  would make every `okf help` load the whole library — and they are held
40
40
  together by a test rather than by discipline.
41
41
  5. **Declare its flags** in `FLAGS` if it takes any. Absence means "accepts
42
- none", not "is exempt": every reader routes through `parse_flags` either way.
42
+ none", not "is exempt". Every reader routes through `parse_flags` either
43
+ way, and so does every scaffold verb — that second half cost a release to
44
+ become true.
43
45
  6. **A writer owes a pure transform.** Compute the new text in `board/edit.rb`
44
46
  or `log/edit.rb` — they cannot touch the disk — declare the added, removed
45
47
  and moved lines, and let `Conserve` refuse the mismatch. See
data/CHANGELOG.md CHANGED
@@ -4,6 +4,32 @@ All notable changes to okf-pro are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this gem uses
5
5
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.1.1] - 2026-08-30
8
+
9
+ ### Fixed
10
+
11
+ - **`okf pro setup --help` prints the usage instead of running the generator.**
12
+ The three scaffold verbs read their destination from `argv.shift` and never
13
+ reached `parse_flags`. The flag was therefore the destination. `setup --help`
14
+ wrote the twenty-five seed files into a directory named `--help` and exited 0.
15
+ `upgrade --help` was worse: `upgrade` defaults its destination to the working
16
+ directory, so it rewrote the four gem-owned files of whatever repository you
17
+ were standing in.
18
+
19
+ A help flag that answers the question by running the verb is the worst shape
20
+ it can have. This is the one family where the answer is files on disk.
21
+
22
+ The fix routes the three verbs through the parser the readers already use.
23
+ None of them declares a flag, and none gains a `FLAGS` entry. Absence from
24
+ that table already means "accepts none" rather than "is exempt", so `setup
25
+ --json` is now a typo the parser names. Before, it was a seeded repository in
26
+ a directory with a leading dash. `--` still separates a destination from the
27
+ flags, for the rare path that starts with one.
28
+
29
+ The write verbs carried this defect and fixed it: `okf pro capture --help`
30
+ once appended `- <date> — --help` to the Inbox. The scaffold verbs are the
31
+ last family nobody had checked for it.
32
+
7
33
  ## [1.1.0] - 2026-08-22
8
34
 
9
35
  ### Changed
@@ -250,5 +276,7 @@ every use. This surface answers both.
250
276
  - **The `.bin/okf_pro` binary is gone.** `okf pro` is the only door, which is
251
277
  what lets the wrapper refuse anything that is not it.
252
278
 
279
+ [1.1.1]: https://github.com/serradura/okf/compare/okf-pro/v1.1.0...okf-pro/v1.1.1
280
+ [1.1.0]: https://github.com/serradura/okf/compare/okf-pro/v1.0.1...okf-pro/v1.1.0
253
281
  [1.0.1]: https://github.com/serradura/okf/compare/okf-pro/v1.0.0...okf-pro/v1.0.1
254
282
  [1.0.0]: https://github.com/serradura/okf/releases/tag/okf-pro%2Fv1.0.0
data/lib/okf/plugin.rb CHANGED
@@ -75,8 +75,6 @@ module OKF
75
75
  # rather than swallowed — `okf/pro.rb` refuses an under-floor Ruby with
76
76
  # `exit 2`, and a rescue that turned that refusal into an error report
77
77
  # would be the fail-open this method exists to close.
78
- #
79
- # rubocop:disable Lint/RescueException
80
78
  def call(argv)
81
79
  verb = argv.first.to_s
82
80
 
@@ -93,10 +91,9 @@ module OKF
93
91
  status.is_a?(Integer) ? status : blocked("returned #{status.inspect} instead of an exit status")
94
92
  rescue ::SystemExit
95
93
  raise
96
- rescue ::Exception => e
94
+ rescue ::Exception => e # rubocop:disable Lint/RescueException
97
95
  blocked("#{e.class}: #{e.message}")
98
96
  end
99
- # rubocop:enable Lint/RescueException
100
97
 
101
98
  private
102
99
 
data/lib/okf/pro/cli.rb CHANGED
@@ -795,6 +795,18 @@ module OKF
795
795
  end
796
796
 
797
797
  def scaffold(verb, argv, stdout: $stdout, stderr: $stderr)
798
+ # The one verb group that used to skip the parser, and the one where
799
+ # skipping it was worst: `--help` became the destination, so asking
800
+ # what the generator does ran it, into a directory called `--help`.
801
+ #
802
+ # No `FLAGS` entry, deliberately — absence already means "accepts
803
+ # none", and `parse_flags` refuses an undeclared flag either way. An
804
+ # empty entry would say these three verbs were considered and given
805
+ # nothing, which is a distinction this table does not draw for `audit`
806
+ # or `records` either.
807
+ options = parse_flags(argv, verb, stdout, stderr)
808
+ return options == :handled ? PASS : BLOCK unless options.is_a?(Hash)
809
+
798
810
  dest = argv.shift
799
811
 
800
812
  unless argv.empty?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OKF
4
4
  module Pro
5
- VERSION = "1.1.0"
5
+ VERSION = "1.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okf-pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Serradura
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  requirements: []
177
- rubygems_version: 4.0.16
177
+ rubygems_version: 4.0.10
178
178
  specification_version: 4
179
179
  summary: 'A profile of OKF: one opinionated shape of knowledge bundle, and the gates
180
180
  that hold it there. Structure for making things happen.'