kind 6.0.0 → 6.0.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.
data/CLAUDE.md ADDED
@@ -0,0 +1,117 @@
1
+ # CLAUDE.md
2
+
3
+ Notes for AI assistants working in `kind`.
4
+
5
+ ## How to work in this repo
6
+
7
+ ### 1. Think before coding
8
+
9
+ **Don't assume. Don't hide confusion. Surface tradeoffs.**
10
+
11
+ - State assumptions explicitly. If uncertain, ask.
12
+ - If multiple interpretations exist, present them — don't pick silently.
13
+ - If a simpler approach exists, say so. Push back when warranted.
14
+ - If something is unclear, stop. Name what's confusing. Ask.
15
+
16
+ ### 2. Simplicity first
17
+
18
+ **Minimum code that solves the problem. Nothing speculative.**
19
+
20
+ - No features beyond what was asked.
21
+ - No abstractions for single-use code.
22
+ - No "flexibility" or "configurability" that wasn't requested.
23
+ - No error handling for impossible scenarios.
24
+ - If you write 200 lines and it could be 50, rewrite it.
25
+
26
+ Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes,
27
+ simplify.
28
+
29
+ ### 3. Surgical changes
30
+
31
+ **Touch only what you must. Clean up only your own mess.**
32
+
33
+ - Don't "improve" adjacent code, comments, or formatting.
34
+ - Don't refactor things that aren't broken.
35
+ - Match existing style, even if you'd do it differently.
36
+ - If you notice unrelated dead code, mention it — don't delete it.
37
+ - Remove imports/variables/functions that _your_ changes orphaned. Don't
38
+ remove pre-existing dead code unless asked.
39
+
40
+ The test: every changed line should trace directly to the user's request.
41
+
42
+ ### 4. Goal-driven execution
43
+
44
+ **Define success criteria. Loop until verified.**
45
+
46
+ Turn vague tasks into verifiable goals:
47
+
48
+ - "Add validation" → "Write tests for invalid inputs, then make them pass"
49
+ - "Fix the bug" → "Write a test that reproduces it, then make it pass"
50
+ - "Refactor X" → "Ensure tests pass before and after"
51
+
52
+ For multi-step work, state a brief plan with a verification check per step.
53
+
54
+ ---
55
+
56
+ ## What this is
57
+
58
+ `kind` is a zero-runtime-dependency Ruby toolkit organized as a collection of
59
+ small, cohesive modules under `lib/kind/` — type handlers (`Kind::String`,
60
+ `Kind::Of()`, `Kind.object`), monads (`Kind::Maybe`, `Kind::Either`,
61
+ `Kind::Result`), enums (`Kind::Enum`), immutable objects
62
+ (`Kind::ImmutableAttributes`), business-logic helpers (`Kind::Action`,
63
+ `Kind::Functional::Steps`, `Kind::Functional::Action`), and an optional
64
+ ActiveModel validator (`Kind::Validator`). Everything is modularized: callers
65
+ require what they want (`require 'kind/basic'`, `require 'kind/either'`,
66
+ `require 'kind/any'`, …), and the umbrella `require 'kind'` loads the lot.
67
+ Because `kind` is a leaf dependency for `u-case` and other downstream gems,
68
+ behavior changes — especially anything affecting the public API or the
69
+ supported `ruby` / `activemodel` matrix — are highly visible.
70
+
71
+ ## Running tests
72
+
73
+ ```bash
74
+ bundle exec rake test # default suite, current bundle
75
+ bundle exec appraisal <name> rake test # one ActiveModel appraisal (see Appraisals)
76
+ bundle exec rake test_basic_modules # per-module isolation runs (KIND_BASIC) + KIND_STRICT
77
+ bundle exec rake matrix # full local matrix for the active Ruby
78
+ ```
79
+
80
+ `bin/setup` re-installs and refreshes appraisals. `bin/matrix` reinstalls then
81
+ runs `rake matrix`. CI runs the matrix across the full Ruby × ActiveModel grid
82
+ plus the per-module (`KIND_BASIC`) and `KIND_STRICT` axes. Tests are the
83
+ success criterion for any behavior change — write or update a test first, then
84
+ make it pass (rule 4).
85
+
86
+ ## CHANGELOG and README are part of every change
87
+
88
+ Both files are user-facing — keep them in sync with the code:
89
+
90
+ - **`CHANGELOG.md`**: follows [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/).
91
+ Every user-visible change (new API, behavior change, breaking change, dep
92
+ bump that shifts the supported matrix, security fix) gets a bullet under
93
+ the appropriate section (`Added` / `Changed` / `Deprecated` / `Removed` /
94
+ `Fixed` / `Security`). Pure README/CI/internal-refactor changes generally
95
+ don't need an entry.
96
+ - **`README.md`**: the **Documentation** table and the **Compatibility** table
97
+ at the top reference the latest released version and its supported Ruby ×
98
+ ActiveModel bounds. Update them when you cut a release. If you change a
99
+ documented API, update the relevant section in the same commit.
100
+
101
+ ## Bumping the version
102
+
103
+ 1. Edit `lib/kind/version.rb` — change `Kind::VERSION`. Follow
104
+ [SemVer](https://semver.org/): patch for fixes, minor for additive
105
+ user-visible changes, major for breaking changes.
106
+ 2. Add a new top entry in `CHANGELOG.md` (`## [X.Y.Z] - YYYY-MM-DD`) and a
107
+ matching compare link at the bottom (`[X.Y.Z]: …/compare/vPREV...vX.Y.Z`).
108
+ 3. Update `README.md`:
109
+ - **Documentation** table → bump the `v6.x` (or current major) row's
110
+ version label.
111
+ - **Compatibility** table → if supported Ruby / ActiveModel bounds
112
+ changed, add a new row; otherwise bump the existing row's version label.
113
+ 4. If the supported matrix moved, double-check the Compatibility table, the
114
+ Ruby × Rails CI matrix below it, and the `Appraisals` file reflect the
115
+ new bounds.
116
+
117
+ Don't tag, push, or `gem release` — humans do that.
data/README.md CHANGED
@@ -26,7 +26,7 @@ So, I invite you to check out these features to see how they could be useful for
26
26
  Version | Documentation
27
27
  ---------- | -------------
28
28
  unreleased | https://github.com/serradura/kind/blob/main/README.md
29
- 6.0.0 | https://github.com/serradura/kind/blob/v6.x/README.md
29
+ 6.0.1 | https://github.com/serradura/kind/blob/v6.x/README.md
30
30
  5.10.0 | https://github.com/serradura/kind/blob/v5.x/README.md
31
31
 
32
32
  ## Table of Contents <!-- omit in toc -->
@@ -106,7 +106,7 @@ unreleased | https://github.com/serradura/kind/blob/main/README.md
106
106
  | kind | branch | ruby | activemodel |
107
107
  | ---------------- | ------ | -------- | -------------- |
108
108
  | unreleased | main | >= 2.7 | >= 6.0 |
109
- | 6.0.0 | v6.x | >= 2.7 | >= 6.0 |
109
+ | 6.0.1 | v6.x | >= 2.7 | >= 6.0 |
110
110
  | 5.10.0 | v5.x | >= 2.1.0, <= 3.0.0 | >= 3.2, < 7.0 |
111
111
 
112
112
  This library is tested (CI matrix) against:
data/kind.gemspec CHANGED
@@ -15,6 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.metadata['homepage_uri'] = spec.homepage
16
16
  spec.metadata['source_code_uri'] = 'https://github.com/serradura/kind'
17
17
  spec.metadata['changelog_uri'] = 'https://github.com/serradura/kind/blob/main/CHANGELOG.md'
18
+ spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues"
18
19
 
19
20
  # Specify which files should be added to the gem when it is released.
20
21
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
data/lib/kind/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kind
4
- VERSION = '6.0.0'
4
+ VERSION = '6.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kind
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Serradura
@@ -66,6 +66,7 @@ files:
66
66
  - ".vscode/settings.json"
67
67
  - Appraisals
68
68
  - CHANGELOG.md
69
+ - CLAUDE.md
69
70
  - CODE_OF_CONDUCT.md
70
71
  - Gemfile
71
72
  - LICENSE.txt
@@ -173,6 +174,7 @@ metadata:
173
174
  homepage_uri: https://github.com/serradura/kind
174
175
  source_code_uri: https://github.com/serradura/kind
175
176
  changelog_uri: https://github.com/serradura/kind/blob/main/CHANGELOG.md
177
+ bug_tracker_uri: https://github.com/serradura/kind/issues
176
178
  rdoc_options: []
177
179
  require_paths:
178
180
  - lib
@@ -187,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
189
  - !ruby/object:Gem::Version
188
190
  version: '0'
189
191
  requirements: []
190
- rubygems_version: 4.0.7
192
+ rubygems_version: 4.0.12
191
193
  specification_version: 4
192
194
  summary: A development toolkit for Ruby with several small/cohesive abstractions to
193
195
  empower your development workflow.