Skip to content

[0.1.5] Add docscribe capability detection: parse version, skip server on < 1.5.1 - #34

Merged
unurgunite merged 4 commits into
v0.1.5from
feature/capability-detection
Jul 5, 2026
Merged

[0.1.5] Add docscribe capability detection: parse version, skip server on < 1.5.1#34
unurgunite merged 4 commits into
v0.1.5from
feature/capability-detection

Conversation

@unurgunite

@unurgunite unurgunite commented Jul 5, 2026

Copy link
Copy Markdown
Member

Description

Adds capability detection for docscribe gem version. When performGemCheck() runs bundle exec docscribe --version, the output is now parsed into a structured DocscribeCapabilities (version + serverMode flag). ensureRunning() checks capabilities before attempting server startup — versions before 1.5.1 skip the server and fall back directly to CLI, avoiding unnecessary startup attempts and errors.

Changes

  • DocscribeCapabilities — new data class with version: String and serverMode: Boolean
  • performGemCheck() — captures --version stdout, calls parseVersion() to build capabilities
  • parseVersion() — companion method that parses semver, enables serverMode for ≥ 1.5.1
  • ensureRunning() — returns null (CLI fallback) when capabilities indicate no server mode
  • Tests — 9 new tests: version parsing for 1.5.0 (no server), 1.5.1 (server), 1.6.0, 2.0.0, 1.4.9, trailing newline, garbage input, null default, and integration (no crash when server mode disabled)

Checklist

  • Tests pass (./gradlew test)
  • Formatting clean (./gradlew spotlessCheck)
  • Static analysis clean (./gradlew detekt)
  • Plugin verified (./gradlew verifyPlugin)
  • CHANGELOG updated

@unurgunite unurgunite self-assigned this Jul 5, 2026
@unurgunite unurgunite added the enhancement New feature or request label Jul 5, 2026
@unurgunite
unurgunite changed the base branch from master to v0.1.5 July 5, 2026 18:50
@unurgunite
unurgunite merged commit 15942cd into v0.1.5 Jul 5, 2026
1 check passed
@unurgunite
unurgunite deleted the feature/capability-detection branch July 5, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant