Skip to content

Select the next development version part - #79

Merged
dblock merged 1 commit into
masterfrom
dblock/next-version-option
Nov 20, 2026
Merged

dblock merged 1 commit into
masterfrom
dblock/next-version-option

Conversation

@dblock

@dblock dblock commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Summary

Add next_version: to Workflow::RubyGem so projects that bump minor (or major) after each release don't need a version-object subclass:

RubyGemRelease::Workflow::RubyGem.new(version: ..., changelog: ..., next_version: :minor)
  • Accepts :patch (default), :minor, or :major, as a Symbol or String; anything else raises ArgumentError at construction.
  • The default still calls increment!(from:) unchanged, preserving the documented contract for custom version objects. Other parts call increment!(from:, part:), which RubyConstant, PlainText, and References support.
  • When :minor or :major is selected, construction checks that the version object's increment! accepts part:, so an unsupported selection fails before publication rather than after gem push.
  • Workflow::SemanticRubyGem forwards the option; it applies with bump: true.
  • Starts 0.8.0, since 0.7.0 is published and this is a feature.

Motivated by the review of ruby-grape/grape#3078, where Grape always bumps minor after a release.

Validation

  • bundle exec rake: RuboCop (including spellcheck) and all unit and integration specs pass.
  • bundle exec rake build builds ruby-gem-release-0.8.0.gem.
  • New specs cover forwarding part: from the release version, String parts, rejected values, custom version objects without part: (rejected only for non-patch), a real RubyConstant wrapped in References writing 2.1.0 after 2.0.0, and the semantic workflow with bump: true.

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

🤖 Generated with Claude Code

https://claude.ai/code/session_011Gr21j6KD4oksnhmZ5u3pr

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Danger Report

No issues found.

View run

Add `next_version:` to `Workflow::RubyGem` (and, through it,
`Workflow::SemanticRubyGem`) to choose `:patch` (default), `:minor`, or
`:major` for the next development iteration. The default call to
`increment!(from:)` is unchanged; other parts pass `part:`, which is
checked against the version object at construction so an unsupported
selection fails before publication. Start 0.8.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Gr21j6KD4oksnhmZ5u3pr
@dblock
dblock force-pushed the dblock/next-version-option branch from 5c85a9b to 9c9a726 Compare November 20, 2026 21:19
@dblock
dblock merged commit 41f8630 into master Nov 20, 2026
11 checks passed
@dblock
dblock deleted the dblock/next-version-option branch November 20, 2026 21:20
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.

1 participant