Skip to content

Document link properties, including HAL profile - #338

Merged
dblock merged 1 commit into
codegram:masterfrom
dblock:dblock/link-profile
Nov 22, 2026
Merged

dblock merged 1 commit into
codegram:masterfrom
dblock:dblock/link-profile

Conversation

@dblock

@dblock dblock commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

🤖 This PR was written by an AI (Claude) acting on behalf of @dblock.

Closes #65.

Link#_profile (along with _type, _deprecation, _name, _title, and _hreflang) has existed since 2013 (afcc1cf) and is unit-tested, but none of the link properties were documented. This PR:

  • Adds a "Link Properties" README section listing the properties, explaining that a profile is a URI documenting the target resource's semantics, that Hyperclient returns it as-is without following it (a profile isn't necessarily a HAL resource), and how to fetch it with api.connection if needed.
  • Gives the local Oxford demo's places link a title and a profile (/docs/places, already served by the demo), prints the profile from examples/oxford/client.rb, and adds a test that reads _title/_profile and fetches the profile document.

No library code changes; resource-level profiles (e.g. a profile media type parameter) and an automatic "follow profile" helper were intentionally left out.

Validation: bundle exec rake (175 minitest runs, spinach, RuboCop) passes locally; the new Oxford example assertions fail without the demo change.

🤖 Generated with Claude Code

https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW

@dblock
dblock force-pushed the dblock/link-profile branch from d9c16e2 to a9331c3 Compare November 22, 2026 14:00
Link#_profile and the other HAL link properties have been supported
since 2013 but were undocumented. Document them in the README, add a
title and profile to the Oxford demo's places link, and test reading
and fetching the profile.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW
@dblock
dblock force-pushed the dblock/link-profile branch from a9331c3 to 0318928 Compare November 22, 2026 14:04
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0% (+0.3%) from 99.701% — dblock:dblock/link-profile into codegram:master

@dblock
dblock merged commit 355b05d into codegram:master Nov 22, 2026
11 checks passed
@dblock
dblock deleted the dblock/link-profile branch November 22, 2026 14:25
@dblock dblock mentioned this pull request Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Profile support for links

2 participants