Skip to content

feat: support callable values for credentials config#32

Merged
vishaltps merged 2 commits intomainfrom
fix/support-callable-credentials
Mar 17, 2026
Merged

feat: support callable values for credentials config#32
vishaltps merged 2 commits intomainfrom
fix/support-callable-credentials

Conversation

@vishaltps
Copy link
Owner

Summary

  • Adds support for Proc/Lambda values in username and password configuration, enabling use with Rails.application.credentials and other deferred sources
  • Fully backward compatible — static string values continue to work as before
  • Updated initializer template, README, and CHANGELOG for v1.2.1

Closes #31

Changes

  • lib/solid_queue_monitor.rb — Custom reader methods that resolve callable values via respond_to?(:call)
  • lib/generators/.../initializer.rb — Added ENV and Lambda examples in comments
  • README.md — Authentication section now shows all three credential approaches
  • CHANGELOG.md — Added v1.2.1 entry
  • version.rb — Bumped to 1.2.1

Test plan

  • Existing tests pass (257 examples, 0 failures)
  • New tests for callable credential resolution
  • Manual test with Rails.application.credentials in demo app

Allows Proc/Lambda for deferred evaluation, enabling use with
Rails.application.credentials which isn't available at initializer
load time. Fully backward compatible with static string values.

Closes #31
@vishaltps vishaltps merged commit 987c607 into main Mar 17, 2026
3 checks passed
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.

Cannot init config with Rails credentials

1 participant