Skip to content

refactor(usage_limit): extract period validation#42

Open
akostadinov-bot[bot] wants to merge 2 commits into
masterfrom
refactor-usage-limit-save-validation
Open

refactor(usage_limit): extract period validation#42
akostadinov-bot[bot] wants to merge 2 commits into
masterfrom
refactor-usage-limit-save-validation

Conversation

@akostadinov-bot

Copy link
Copy Markdown
Contributor

Summary

  • Extracts single-period validation logic from UsageLimit.save into a dedicated validate_single_period! private class method
  • Makes save easier to read by separating validation from the API update logic
  • No behavioral changes — same validation, same error raised

Test plan

  • Existing usagelimit_spec.rb tests pass (saves, period validation errors)
  • CI coverage report shows usage_limit.rb covered including the new method

🤖 Generated with Claude Code

Bob Dev and others added 2 commits July 3, 2026 20:49
Extract single-period validation from save into validate_single_period!
for clarity and testability.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… entry

Rubocop is not in the Gemfile, so qlty's package_file lookup fails
with "rubocop: not found". Pin version directly in qlty.toml.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.

0 participants