objective_elements 1.1.2 → 2.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: d19b11b8215023de5a6dc505034de4d08e02e1beca92c20b6920a6ad6420a09e
4
- data.tar.gz: c24f570c8e46ca9609c46e2ad70d309d5a170a6c2c8da0ec2932e76efaba7a71
3
+ metadata.gz: a8c175b8c8ee5cb41bcdc79101e658706bc82c930ba3bbb64675cf805375297d
4
+ data.tar.gz: 234cba6e82854442b3780df1cde7d0b394d5acca7b649c695d8e697379eb213f
5
5
  SHA512:
6
- metadata.gz: 97bf3bd7f4c6cf88c6441a5bcb3098735e90c135abbe14ea940012b81f5bd98a7a4a468492e6b897ee680e0656df3daf5485acf122daacdc656b653a8d56c020
7
- data.tar.gz: 7f0710dbea4c75c73290c5818922cb7004649f87ea566053ad49d365ff3499267cdd87b2aa3071082129d2b5827aa9cd6bee76b4bc179175c43d2548d2f17127
6
+ metadata.gz: be1b67a8c7df385802f168ed9684453d378343c56180da10859be98d545e3ac934f56092f27573992c18cea56e7fd2a91fc2d7fc715dc486609d07186f15f7d9
7
+ data.tar.gz: b2220420f60c50ea537ac4bfeb94e6287452c38b820f7c9d59c16458ef00d2dc7b653e5802868cc330d4ad4742bceb2d570b55f1c237313cdece0cca33acc234
@@ -0,0 +1,44 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+
8
+ jobs:
9
+ spec:
10
+ name: rspec (ruby ${{ matrix.ruby }})
11
+ runs-on: ${{ matrix.runs-on || 'ubuntu-latest' }}
12
+ continue-on-error: ${{ matrix.experimental || false }}
13
+
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ ruby: ["3.2", "3.3", "3.4", "4.0"]
18
+ include:
19
+ # setup-ruby has no 3.0 build for images newer than 22.04.
20
+ - ruby: "3.0"
21
+ runs-on: ubuntu-22.04
22
+ - ruby: ruby-head
23
+ experimental: true
24
+
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: ${{ matrix.ruby }}
30
+ bundler-cache: true
31
+ - run: bundle exec rspec
32
+
33
+ rubocop:
34
+ name: rubocop
35
+ runs-on: ubuntu-latest
36
+
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ - uses: ruby/setup-ruby@v1
40
+ with:
41
+ # Matches the version mise.toml pins, so local and CI lint agree.
42
+ ruby-version: "3.4"
43
+ bundler-cache: true
44
+ - run: bundle exec rubocop
@@ -0,0 +1,28 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+ # Publishes whatever version.rb says on the selected branch. Needed for
7
+ # v2.0.0, whose tag predates this workflow. `rake release` skips tagging when
8
+ # the tag already exists, so this is safe to re-run.
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ release:
13
+ name: push to rubygems
14
+ runs-on: ubuntu-latest
15
+
16
+ permissions:
17
+ contents: read
18
+ # Required for the OIDC token rubygems.org trades for a scoped API key.
19
+ id-token: write
20
+
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - uses: ruby/setup-ruby@v1
24
+ with:
25
+ # Matches the version mise.toml pins.
26
+ ruby-version: "3.4"
27
+ bundler-cache: true
28
+ - uses: rubygems/release-gem@v1
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ Gemfile.lock
data/.rubocop.yml CHANGED
@@ -1,2 +1,3 @@
1
- Style/FrozenStringLiteralComment:
2
- Enabled: false
1
+ AllCops:
2
+ TargetRubyVersion: 3.0
3
+ NewCops: enable
data/AGENTS.md ADDED
@@ -0,0 +1,35 @@
1
+ # AGENTS.md
2
+
3
+ This project is a small ruby gem for building HTML tags.
4
+
5
+ ## Commits
6
+
7
+ - All AI assisted commits should have a trailer: `Assisted-by: <model>`
8
+ - [Scoped commits](https://scopedcommits.com/), not conventional commits. Short version:
9
+
10
+ ```
11
+ <scope>: <description>
12
+
13
+ [optional body]
14
+
15
+ [optional trailer(s)]
16
+ ```
17
+
18
+ - <scope> — the subsystem, area, or module that the commit touches
19
+ - <description> — a short description of the changes made
20
+ - [optional body] — detailed information about the changes
21
+ - [optional trailer(s)] — additional metadata about the commit
22
+
23
+ ## Agent skills
24
+
25
+ ### Issue tracker
26
+
27
+ Issues live in GitHub Issues for `rbuchberger/objective_elements`, managed via the `gh` CLI. See `docs/agents/issue-tracker.md`.
28
+
29
+ ### Triage labels
30
+
31
+ The five canonical triage roles, each using its default label string. See `docs/agents/triage-labels.md`.
32
+
33
+ ### Domain docs
34
+
35
+ Single-context: `CONTEXT.md` and `docs/adr/` at the repo root. See `docs/agents/domain.md`.
data/CHANGELOG.md ADDED
@@ -0,0 +1,75 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.0.0] - 2026-08-12
9
+
10
+ ### Changed
11
+
12
+ - **Breaking:** `required_ruby_version` is now `>= 3.0`, with no upper bound.
13
+ See [ADR 0001](docs/adr/0001-ruby-version-support-policy.md) for the support
14
+ policy and the April 2027 expiry of the 3.0 floor.
15
+ - All source files now declare `# frozen_string_literal: true`.
16
+ - `ShelfTag#initialize` calls `super`, so a ShelfTag now has a `nil` element and
17
+ an empty `HTMLAttributes` rather than no attributes at all.
18
+
19
+ ### Fixed
20
+
21
+ - `HTMLAttributes#to_s` no longer mutates the attribute hash. Previously an
22
+ empty attribute gained an empty string on every render, so repeated calls
23
+ accumulated trailing spaces.
24
+ - `HTMLAttributes#to_s`, `SingleTag#opening_tag`, and `DoubleTag#to_a` built
25
+ their output by mutating string literals, which raised `FrozenError` under
26
+ frozen string literals.
27
+ - `bin/console` required the gem's pre-rename name and could not start.
28
+
29
+ ### Added
30
+
31
+ - GitHub Actions CI: rspec on Ruby 3.0, 3.2, 3.3, 3.4, and 4.0, plus a
32
+ `ruby-head` leg that is allowed to fail, and rubocop on 3.4.
33
+ - Gemspec metadata URIs, and `rubygems_mfa_required`.
34
+ - `mise.toml`, pinning Ruby 3.4 for development.
35
+ - This changelog. Earlier entries are transcribed from the README's old
36
+ "Changes" section.
37
+
38
+ ### Removed
39
+
40
+ - `bundler`, `pry`, and `solargraph` as declared development dependencies, and
41
+ `.solargraph.yml`. Install those locally instead.
42
+ - `Gemfile.lock`, which is now gitignored — one lockfile can't serve a Ruby
43
+ 3.0 through 4.0 matrix.
44
+
45
+ ## [1.1.2] - 2020-01-16
46
+
47
+ ### Changed
48
+
49
+ - Gemspec and dependency housekeeping. No functional changes.
50
+
51
+ ## [1.1.1] - 2019-11-14
52
+
53
+ ### Fixed
54
+
55
+ - Duplicate attribute keys passed at the same time no longer overwrite each
56
+ other's values.
57
+
58
+ ## [1.1.0] - 2019-02-08
59
+
60
+ ### Added
61
+
62
+ - `ShelfTag`, for creating siblings without a parent element.
63
+
64
+ ## [1.0.0] - 2018-10-23
65
+
66
+ ### Changed
67
+
68
+ - **Breaking:** attributes syntax changed significantly. `.add_attributes`
69
+ became `.attributes <<`; see the README's usage section.
70
+
71
+ [unreleased]: https://github.com/rbuchberger/objective_elements/compare/v1.1.2...HEAD
72
+ [1.1.2]: https://github.com/rbuchberger/objective_elements/compare/v1.1.1...v1.1.2
73
+ [1.1.1]: https://github.com/rbuchberger/objective_elements/compare/v1.1.0...v1.1.1
74
+ [1.1.0]: https://github.com/rbuchberger/objective_elements/compare/v1.0.0...v1.1.0
75
+ [1.0.0]: https://github.com/rbuchberger/objective_elements/releases/tag/v1.0.0
data/Gemfile CHANGED
@@ -1,6 +1,9 @@
1
- source 'https://rubygems.org'
1
+ # frozen_string_literal: true
2
2
 
3
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
3
+ source 'https://rubygems.org'
4
4
 
5
- # Specify your gem's dependencies in elements.gemspec
6
5
  gemspec
6
+
7
+ gem 'rake', '~> 13.0'
8
+ gem 'rspec', '~> 3.13'
9
+ gem 'rubocop', '~> 1.81'
data/README.md CHANGED
@@ -99,25 +99,14 @@ div = p.add_parent DoubleTag.new 'div'
99
99
 
100
100
  ## Changes
101
101
 
102
- ### 1.1.1
103
-
104
- Fix bug where duplicate attribute keys would overwrite each other's values, when passed at the same time.
105
-
106
- ### 1.1.0
107
-
108
- Add `ShelfTag`, which is useful when you want to create siblings without a parent element.
109
-
110
- ### 1.0.0
111
-
112
- Attributes syntax has changed pretty significantly. Find `.add_attributes` & replace `.attributes <<`
113
- will get you most of the way there, but you should read over the usage section again.
102
+ See [CHANGELOG.md](CHANGELOG.md).
114
103
 
115
104
  ## Installation
116
105
 
117
106
  ```ruby
118
107
  # Gemfile
119
108
 
120
- gem 'objective_elements', '~> 1.0.0'
109
+ gem 'objective_elements', '~> 2.0'
121
110
  ```
122
111
 
123
112
  ```ruby
@@ -126,6 +115,13 @@ gem 'objective_elements', '~> 1.0.0'
126
115
  require 'objective_elements'
127
116
  ```
128
117
 
118
+ ### Supported Rubies
119
+
120
+ Ruby 3.0 and up, with no upper bound. The policy is to support every non-EOL Ruby, plus EOL versions
121
+ still shipped in a supported Ubuntu LTS — which is the only reason the floor is as low as 3.0. It
122
+ rises to 3.2 when Ubuntu 22.04 leaves standard support in April 2027. See
123
+ [ADR 0001](docs/adr/0001-ruby-version-support-policy.md).
124
+
129
125
  ## Terminology
130
126
 
131
127
  ```
@@ -399,18 +395,31 @@ MyDoubleTag.new('p', content: 'hello').to_s
399
395
  - It doesn't wrap long lines of text, and it doesn't indent text with newlines embedded. It's on the
400
396
  TODO list.
401
397
 
402
- ## Contributing
398
+ ## Development
399
+
400
+ Ruby is managed with [mise](https://mise.jdx.dev/); `mise.toml` pins 3.4, which is the version CI
401
+ lints on, so local rubocop can't disagree with CI. Any supported Ruby will run the tests.
402
+
403
+ ```sh
404
+ mise install # optional; only if you use mise
405
+ bundle install
406
+ bundle exec rake # rspec + rubocop
407
+ ```
408
+ [Scoped commits](https://scopedcommits.com/)
403
409
 
404
- For code style, I've been using rubocop with the default settings and would appreciate if you did the
405
- same.
410
+ ## AI Policy
406
411
 
407
- If you add new functionality, or change existing functionality, please update the rspec tests to
408
- reflect it.
412
+ The use of LLM powered coding tools is permitted so long as:
409
413
 
410
- https://github.com/rbuchberger/objective_elements
414
+ * Any commits with any AI generated code have a trailer: `Assisted-by: <model>`
415
+ * All changes are read completely and reviewed thoroughly by a knowledgable human before merging to
416
+ master. This has always been the case, but it is especially true for AI-generated code.
417
+ * Pull request authors are expected to have done the same before submitting.
411
418
 
412
- contact:
413
- robert@robert-buchberger.com
419
+ If you don't want to run AI generated code, you can use versions prior to `2.0.0`. You are likely
420
+ using this project as a dependency of jekyll_picture_tag; it is pinned to OE `1.x` for JPT versions
421
+ prior to `3.0.0` which carries a similar policy change. In other words, If you use the non-ai
422
+ version of JPT, you'll get the non-ai version of this.
414
423
 
415
424
  ## License
416
425
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rubocop/rake_task'
3
5
  require 'rspec/core/rake_task'
data/bin/console CHANGED
@@ -1,14 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
- require 'elements'
5
+ require 'objective_elements'
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
7
8
  # with your gem easier. You can also use a different console, if you like.
8
9
 
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
10
  require 'irb'
14
11
  IRB.start(__FILE__)
@@ -0,0 +1,68 @@
1
+ # 1. Ruby version support policy
2
+
3
+ Date: 2026-08-11
4
+
5
+ ## Status
6
+
7
+ Accepted. The Ruby 3.0 floor expires April 2027 — see "Consequences".
8
+
9
+ ## Context
10
+
11
+ The gem sat dormant long enough that its tooling and its implicit Ruby support
12
+ window had both drifted. Reviving it meant answering a question that had never
13
+ been written down: which Rubies does this gem promise to work on?
14
+
15
+ Two failure modes were on the table. Setting the floor too high strands users on
16
+ distro-packaged Rubies they don't control. Setting an upper bound strands
17
+ everyone the moment a new Ruby ships — which is exactly the state
18
+ `jekyll_picture_tag` is in, uninstallable on Ruby 4.0 because of its own
19
+ `< 4.0` cap.
20
+
21
+ This gem is ~100 lines, has no runtime dependencies, and uses no recent syntax.
22
+ The cost of supporting an old Ruby is close to zero; the cost of an upper bound
23
+ is a broken install.
24
+
25
+ ## Decision
26
+
27
+ `required_ruby_version = '>= 3.0'`, with no upper bound.
28
+
29
+ The rule behind that number: **support every non-EOL Ruby, plus EOL versions
30
+ still shipped in a supported Ubuntu LTS.**
31
+
32
+ | Ruby | Status (Aug 2026) | Ubuntu LTS |
33
+ | ---- | ----------------- | --------------------- |
34
+ | 4.0 | supported | — |
35
+ | 3.4 | supported | — |
36
+ | 3.3 | supported | 26.04 |
37
+ | 3.2 | EOL 2026-03 | 24.04 (to Apr 2029) |
38
+ | 3.0 | EOL 2024-04 | 22.04 (to Apr 2027) |
39
+
40
+ No upper bound. A dependency-free library has nothing to break against a new
41
+ Ruby that a cap would protect against, and a cap guarantees breakage the day
42
+ that Ruby ships.
43
+
44
+ CI tests the full supported range — 3.0, 3.2, 3.3, 3.4, 4.0 — plus a
45
+ `continue-on-error` `ruby-head` leg for early warning. The 3.0 leg pins
46
+ `ubuntu-22.04`, because `setup-ruby` publishes no 3.0 build for newer images.
47
+ Rubocop runs once, on 3.4, matching the version `mise.toml` pins so local lint
48
+ and CI lint cannot disagree. No JRuby or TruffleRuby: no runtime dependencies
49
+ and no C extensions means nothing platform-specific to catch.
50
+
51
+ ## Consequences
52
+
53
+ The floor is user-visible metadata, so raising it is a breaking change. That is
54
+ what makes this release 2.0.0.
55
+
56
+ Ruby 3.0 is here **only** because Ubuntu 22.04 ships it. **Revisit in April
57
+ 2027**, when 22.04 leaves standard support: at that point the floor should rise
58
+ to 3.2 (Ubuntu 24.04's Ruby, supported until April 2029) in the next major
59
+ version.
60
+
61
+ Applying the rule mechanically means the floor moves on Ubuntu LTS's schedule
62
+ rather than upstream Ruby's, which is slower than most gems — deliberately.
63
+ That is the point: the users least able to upgrade Ruby are the ones on a
64
+ distro-packaged one.
65
+
66
+ Out of scope, and tracked separately in that repo: `jekyll_picture_tag`'s own
67
+ `< 4.0` cap, and its `objective_elements ~> 1.1` constraint. Both need their own
68
+ support decision.
@@ -0,0 +1,51 @@
1
+ # Domain Docs
2
+
3
+ How the engineering skills should consume this repo's domain documentation when exploring the codebase.
4
+
5
+ ## Before exploring, read these
6
+
7
+ - **`CONTEXT.md`** at the repo root, or
8
+ - **`CONTEXT-MAP.md`** at the repo root if it exists — it points at one `CONTEXT.md` per context. Read each one relevant to the topic.
9
+ - **`docs/adr/`** — read ADRs that touch the area you're about to work in. In multi-context repos, also check `src/<context>/docs/adr/` for context-scoped decisions.
10
+
11
+ If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The `/domain-modeling` skill (reached via `/grill-with-docs` and `/improve-codebase-architecture`) creates them lazily when terms or decisions actually get resolved.
12
+
13
+ ## File structure
14
+
15
+ Single-context repo (most repos):
16
+
17
+ ```
18
+ /
19
+ ├── CONTEXT.md
20
+ ├── docs/adr/
21
+ │ ├── 0001-event-sourced-orders.md
22
+ │ └── 0002-postgres-for-write-model.md
23
+ └── src/
24
+ ```
25
+
26
+ Multi-context repo (presence of `CONTEXT-MAP.md` at the root):
27
+
28
+ ```
29
+ /
30
+ ├── CONTEXT-MAP.md
31
+ ├── docs/adr/ ← system-wide decisions
32
+ └── src/
33
+ ├── ordering/
34
+ │ ├── CONTEXT.md
35
+ │ └── docs/adr/ ← context-specific decisions
36
+ └── billing/
37
+ ├── CONTEXT.md
38
+ └── docs/adr/
39
+ ```
40
+
41
+ ## Use the glossary's vocabulary
42
+
43
+ When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids.
44
+
45
+ If the concept you need isn't in the glossary yet, that's a signal — either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`).
46
+
47
+ ## Flag ADR conflicts
48
+
49
+ If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
50
+
51
+ > _Contradicts ADR-0007 (event-sourced orders) — but worth reopening because…_
@@ -0,0 +1,45 @@
1
+ # Issue tracker: GitHub
2
+
3
+ Issues and specs for this repo live as GitHub issues. Use the `gh` CLI for all operations.
4
+
5
+ ## Conventions
6
+
7
+ - **Create an issue**: `gh issue create --title "..." --body "..."`. Use a heredoc for multi-line bodies.
8
+ - **Read an issue**: `gh issue view <number> --comments`, filtering comments by `jq` and also fetching labels.
9
+ - **List issues**: `gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'` with appropriate `--label` and `--state` filters.
10
+ - **Comment on an issue**: `gh issue comment <number> --body "..."`
11
+ - **Apply / remove labels**: `gh issue edit <number> --add-label "..."` / `--remove-label "..."`
12
+ - **Close**: `gh issue close <number> --comment "..."`
13
+
14
+ Infer the repo from `git remote -v` — `gh` does this automatically when run inside a clone.
15
+
16
+ ## Pull requests as a triage surface
17
+
18
+ **PRs as a request surface: no.** _(Set to `yes` if this repo treats external PRs as feature requests; `/triage` reads this flag.)_
19
+
20
+ When set to `yes`, PRs run through the same labels and states as issues, using the `gh pr` equivalents:
21
+
22
+ - **Read a PR**: `gh pr view <number> --comments` and `gh pr diff <number>` for the diff.
23
+ - **List external PRs for triage**: `gh pr list --state open --json number,title,body,labels,author,authorAssociation,comments` then keep only `authorAssociation` of `CONTRIBUTOR`, `FIRST_TIME_CONTRIBUTOR`, or `NONE` (drop `OWNER`/`MEMBER`/`COLLABORATOR`).
24
+ - **Comment / label / close**: `gh pr comment`, `gh pr edit --add-label`/`--remove-label`, `gh pr close`.
25
+
26
+ GitHub shares one number space across issues and PRs, so a bare `#42` may be either — resolve with `gh pr view 42` and fall back to `gh issue view 42`.
27
+
28
+ ## When a skill says "publish to the issue tracker"
29
+
30
+ Create a GitHub issue.
31
+
32
+ ## When a skill says "fetch the relevant ticket"
33
+
34
+ Run `gh issue view <number> --comments`.
35
+
36
+ ## Wayfinding operations
37
+
38
+ Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.
39
+
40
+ - **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `gh issue create --label wayfinder:map`.
41
+ - **Child ticket**: an issue linked to the map as a GitHub sub-issue (`gh api` on the sub-issues endpoint). Where sub-issues aren't enabled, add the child to a task list in the map body and put `Part of #<map>` at the top of the child body. Labels: `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
42
+ - **Blocking**: GitHub's **native issue dependencies** — the canonical, UI-visible representation. Add an edge with `gh api --method POST repos/<owner>/<repo>/issues/<child>/dependencies/blocked_by -F issue_id=<blocker-db-id>`, where `<blocker-db-id>` is the blocker's numeric **database id** (`gh api repos/<owner>/<repo>/issues/<n> --jq .id`, _not_ the `#number` or `node_id`). GitHub reports `issue_dependencies_summary.blocked_by` (open blockers only — the live gate). Where dependencies aren't available, fall back to a `Blocked by: #<n>, #<n>` line at the top of the child body. A ticket is unblocked when every blocker is closed.
43
+ - **Frontier query**: list the map's open children (`gh issue list --state open`, scoped to the map's sub-issues / task list), drop any with an open blocker (`issue_dependencies_summary.blocked_by > 0`, or an open issue in the `Blocked by` line) or an assignee; first in map order wins.
44
+ - **Claim**: `gh issue edit <n> --add-assignee @me` — the session's first write.
45
+ - **Resolve**: `gh issue comment <n> --body "<answer>"`, then `gh issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.
@@ -0,0 +1,15 @@
1
+ # Triage Labels
2
+
3
+ The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.
4
+
5
+ | Label in mattpocock/skills | Label in our tracker | Meaning |
6
+ | -------------------------- | -------------------- | ---------------------------------------- |
7
+ | `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
8
+ | `needs-info` | `needs-info` | Waiting on reporter for more information |
9
+ | `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
10
+ | `ready-for-human` | `ready-for-human` | Requires human implementation |
11
+ | `wontfix` | `wontfix` | Will not be actioned |
12
+
13
+ When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
14
+
15
+ Edit the right-hand column to match whatever vocabulary you actually use.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Non-Self-Closing tag. Can have content, but doesn't have to.
2
4
  class DoubleTag < SingleTag
3
5
  attr_accessor :oneline
@@ -29,23 +31,23 @@ class DoubleTag < SingleTag
29
31
 
30
32
  def to_a
31
33
  lines = content.map { |c| build_content_line c }
32
- lines = lines.flatten.map { |l| l.prepend oneline ? '' : indent }
34
+ lines = lines.flatten.map { |l| oneline ? l : indent + l }
33
35
  lines.unshift(opening_tag).push(closing_tag)
34
36
  end
35
37
 
36
38
  def to_s
37
- to_a.join(oneline ? '' : "\n") + "\n"
39
+ "#{to_a.join(oneline ? '' : "\n")}\n"
38
40
  end
39
41
 
40
42
  private
41
43
 
42
44
  def build_content_line(element)
43
45
  # Since DoubleTag inherits from SingleTag, it will slurp up those too.
44
- element.is_a?(SingleTag) ? element.to_a : element.to_s.dup
46
+ element.is_a?(SingleTag) ? element.to_a : element.to_s
45
47
  end
46
48
 
47
49
  def indent
48
- "\ \ "
50
+ ' '
49
51
  end
50
52
 
51
53
  def closing_tag
@@ -1,6 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Represents standard HTML attributes, such as class="myclass"
2
4
  class HTMLAttributes
3
5
  attr_reader :content
6
+
4
7
  def initialize(new = nil)
5
8
  @content = {}
6
9
  self << new
@@ -11,16 +14,9 @@ class HTMLAttributes
11
14
  end
12
15
 
13
16
  def to_s
14
- return_string = ''
15
- @content.each_pair do |k, v|
16
- # If an attribute has no values, we need to introduce an empty string to
17
- # the array in order to get the correct format (alt="", for example):
18
- v << '' if v.empty?
19
-
20
- return_string << "#{k}=\"#{v.join ' '}\" "
21
- end
22
-
23
- return_string.strip
17
+ # An attribute with no values joins to an empty string, which is the
18
+ # correct format (alt="", for example).
19
+ @content.map { |k, v| "#{k}=\"#{v.join ' '}\"" }.join(' ')
24
20
  end
25
21
 
26
22
  # This is the only way we add new attributes. Flexible about what you give
@@ -96,7 +92,7 @@ class HTMLAttributes
96
92
  formatted_new = {}
97
93
 
98
94
  new_hash.each_pair do |k, v|
99
- v = v.split(' ') if v.is_a? String
95
+ v = v.split if v.is_a? String
100
96
 
101
97
  formatted_new[k.to_sym] = v
102
98
  end
@@ -119,7 +115,7 @@ class HTMLAttributes
119
115
  key, val = *match
120
116
 
121
117
  if new_hash[key]
122
- new_hash[key] << ' ' + val
118
+ new_hash[key] << " #{val}"
123
119
  else
124
120
  new_hash[key] = val
125
121
  end
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This is a nonexistent HTML tag, which holds content like a double tag but has
2
4
  # no opening or closing tag. This allows us to group siblings without adding an
3
5
  # extra parent to the markup.
4
6
  class ShelfTag < DoubleTag
7
+ # A shelf has no element of its own, so it never renders an opening tag.
5
8
  def initialize(content: nil, oneline: false)
6
- self.oneline = oneline
7
- self.content = content
9
+ super(nil, content: content, oneline: oneline)
8
10
  end
9
11
 
10
12
  def to_a
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Collection of HTML element tags
2
4
  # Describes a basic, self-closing HTML tag.
3
5
  class SingleTag
@@ -34,7 +36,7 @@ class SingleTag
34
36
 
35
37
  # Renders our HTML.
36
38
  def to_s
37
- opening_tag + "\n"
39
+ "#{opening_tag}\n"
38
40
  end
39
41
 
40
42
  # Allows us to work with attributes as methods:
@@ -53,8 +55,8 @@ class SingleTag
53
55
  private
54
56
 
55
57
  def opening_tag
56
- output = '<' + @element
57
- output << ' ' + @attributes.to_s unless @attributes.empty?
58
- output << '>'
58
+ return "<#{@element}>" if @attributes.empty?
59
+
60
+ "<#{@element} #{@attributes}>"
59
61
  end
60
62
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ObjectiveElements
2
- VERSION = '1.1.2'.freeze
4
+ VERSION = '2.0.0'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Author: Robert Buchberger <robert@buchberger.cc>
2
4
  #
3
5
  # This module provides a few helpful classes for generating HTML using simple
data/mise.toml ADDED
@@ -0,0 +1,2 @@
1
+ [tools]
2
+ ruby = "3.4"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require 'objective_elements/version'
@@ -12,6 +14,16 @@ Gem::Specification.new do |spec|
12
14
  spec.homepage = 'https://github.com/rbuchberger/objective_elements'
13
15
  spec.license = 'MIT'
14
16
 
17
+ spec.required_ruby_version = '>= 3.0'
18
+
19
+ spec.metadata = {
20
+ 'homepage_uri' => spec.homepage,
21
+ 'source_code_uri' => spec.homepage,
22
+ 'bug_tracker_uri' => "#{spec.homepage}/issues",
23
+ 'changelog_uri' => "#{spec.homepage}/blob/master/CHANGELOG.md",
24
+ 'rubygems_mfa_required' => 'true'
25
+ }
26
+
15
27
  # Specify which files should be added to the gem when it is released. The
16
28
  # `git ls-files -z` loads the files in the RubyGem that have been added into
17
29
  # git.
@@ -23,11 +35,4 @@ Gem::Specification.new do |spec|
23
35
  spec.bindir = 'exe'
24
36
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
37
  spec.require_paths = ['lib']
26
-
27
- spec.add_development_dependency 'bundler', '~> 1.16'
28
- spec.add_development_dependency 'pry', '~>0.11.3'
29
- spec.add_development_dependency 'rake', '~> 10.0'
30
- spec.add_development_dependency 'rspec', '~>3.8.0'
31
- spec.add_development_dependency 'rubocop', '~>0.79'
32
- spec.add_development_dependency 'solargraph', '~>0.38'
33
38
  end
metadata CHANGED
@@ -1,128 +1,53 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: objective_elements
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Buchberger
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2020-01-16 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.16'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.16'
27
- - !ruby/object:Gem::Dependency
28
- name: pry
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.11.3
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.11.3
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '10.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '10.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 3.8.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 3.8.0
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.79'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '0.79'
83
- - !ruby/object:Gem::Dependency
84
- name: solargraph
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '0.38'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '0.38'
97
- description:
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
98
12
  email:
99
13
  - robert@buchberger.cc
100
14
  executables: []
101
15
  extensions: []
102
16
  extra_rdoc_files: []
103
17
  files:
18
+ - ".github/workflows/ci.yml"
19
+ - ".github/workflows/release.yml"
104
20
  - ".gitignore"
105
21
  - ".rubocop.yml"
106
- - ".solargraph.yml"
22
+ - AGENTS.md
23
+ - CHANGELOG.md
107
24
  - Gemfile
108
- - Gemfile.lock
109
25
  - LICENSE.txt
110
26
  - README.md
111
27
  - Rakefile
112
28
  - bin/console
113
29
  - bin/setup
30
+ - docs/adr/0001-ruby-version-support-policy.md
31
+ - docs/agents/domain.md
32
+ - docs/agents/issue-tracker.md
33
+ - docs/agents/triage-labels.md
114
34
  - lib/objective_elements.rb
115
35
  - lib/objective_elements/double_tag.rb
116
36
  - lib/objective_elements/html_attributes.rb
117
37
  - lib/objective_elements/shelf_tag.rb
118
38
  - lib/objective_elements/single_tag.rb
119
39
  - lib/objective_elements/version.rb
40
+ - mise.toml
120
41
  - objective_elements.gemspec
121
42
  homepage: https://github.com/rbuchberger/objective_elements
122
43
  licenses:
123
44
  - MIT
124
- metadata: {}
125
- post_install_message:
45
+ metadata:
46
+ homepage_uri: https://github.com/rbuchberger/objective_elements
47
+ source_code_uri: https://github.com/rbuchberger/objective_elements
48
+ bug_tracker_uri: https://github.com/rbuchberger/objective_elements/issues
49
+ changelog_uri: https://github.com/rbuchberger/objective_elements/blob/master/CHANGELOG.md
50
+ rubygems_mfa_required: 'true'
126
51
  rdoc_options: []
127
52
  require_paths:
128
53
  - lib
@@ -130,15 +55,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
130
55
  requirements:
131
56
  - - ">="
132
57
  - !ruby/object:Gem::Version
133
- version: '0'
58
+ version: '3.0'
134
59
  required_rubygems_version: !ruby/object:Gem::Requirement
135
60
  requirements:
136
61
  - - ">="
137
62
  - !ruby/object:Gem::Version
138
63
  version: '0'
139
64
  requirements: []
140
- rubygems_version: 3.0.3
141
- signing_key:
65
+ rubygems_version: 3.6.9
142
66
  specification_version: 4
143
67
  summary: Build HTML with simple ruby.
144
68
  test_files: []
data/.solargraph.yml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- include:
3
- - "**/*.rb"
4
- exclude:
5
- - spec/**/*
6
- - test/**/*
7
- - vendor/**/*
8
- - ".bundle/**/*"
9
- require: []
10
- domains: []
11
- reporters:
12
- - rubocop
13
- - require_not_found
14
- require_paths: []
15
- max_files: 5000
data/Gemfile.lock DELETED
@@ -1,84 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- objective_elements (1.1.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- ast (2.4.0)
10
- backport (1.1.2)
11
- benchmark (0.1.0)
12
- coderay (1.1.2)
13
- diff-lcs (1.3)
14
- e2mmap (0.1.0)
15
- jaro_winkler (1.5.4)
16
- maruku (0.7.3)
17
- method_source (0.9.2)
18
- mini_portile2 (2.4.0)
19
- nokogiri (1.10.7)
20
- mini_portile2 (~> 2.4.0)
21
- parallel (1.19.1)
22
- parser (2.7.0.2)
23
- ast (~> 2.4.0)
24
- pry (0.11.3)
25
- coderay (~> 1.1.0)
26
- method_source (~> 0.9.0)
27
- rainbow (3.0.0)
28
- rake (10.5.0)
29
- reverse_markdown (1.4.0)
30
- nokogiri
31
- rspec (3.8.0)
32
- rspec-core (~> 3.8.0)
33
- rspec-expectations (~> 3.8.0)
34
- rspec-mocks (~> 3.8.0)
35
- rspec-core (3.8.2)
36
- rspec-support (~> 3.8.0)
37
- rspec-expectations (3.8.6)
38
- diff-lcs (>= 1.2.0, < 2.0)
39
- rspec-support (~> 3.8.0)
40
- rspec-mocks (3.8.2)
41
- diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.8.0)
43
- rspec-support (3.8.3)
44
- rubocop (0.79.0)
45
- jaro_winkler (~> 1.5.1)
46
- parallel (~> 1.10)
47
- parser (>= 2.7.0.1)
48
- rainbow (>= 2.2.2, < 4.0)
49
- ruby-progressbar (~> 1.7)
50
- unicode-display_width (>= 1.4.0, < 1.7)
51
- ruby-progressbar (1.10.1)
52
- solargraph (0.38.2)
53
- backport (~> 1.1)
54
- benchmark
55
- bundler (>= 1.17.2)
56
- e2mmap
57
- jaro_winkler (~> 1.5)
58
- maruku (~> 0.7, >= 0.7.3)
59
- nokogiri (~> 1.9, >= 1.9.1)
60
- parser (~> 2.3)
61
- reverse_markdown (~> 1.0, >= 1.0.5)
62
- rubocop (~> 0.52)
63
- thor (~> 1.0)
64
- tilt (~> 2.0)
65
- yard (~> 0.9)
66
- thor (1.0.1)
67
- tilt (2.0.10)
68
- unicode-display_width (1.6.0)
69
- yard (0.9.24)
70
-
71
- PLATFORMS
72
- ruby
73
-
74
- DEPENDENCIES
75
- bundler (~> 1.16)
76
- objective_elements!
77
- pry (~> 0.11.3)
78
- rake (~> 10.0)
79
- rspec (~> 3.8.0)
80
- rubocop (~> 0.79)
81
- solargraph (~> 0.38)
82
-
83
- BUNDLED WITH
84
- 1.17.2