Fix major version accessor guard

Summary

SemanticVersion#major accessor used the wrong segment-count guard, so version 1 reported 0 for the Major version.

Also prepares the v4.1.3 patch release.

Changes

  • lib/semver_dialects/semantic_version.rb: swap the segment guards for #major and #minor.
  • spec/semantic_version_spec.rb: add coverage for #major/#minor/#patch, including short and prefixed versions.
  • Bump to v4.1.3 (version.rb, CHANGELOG.md, Gemfile.lock).

Verification

  • bundle exec rspec passes.
  • ruby scripts/version_verification.rb passes.
Edited by Oscar Tovar

Merge request reports

Loading
Loading