Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept any IO object for credentials #94

Merged
merged 3 commits into from Dec 31, 2021

Conversation

excid3
Copy link
Contributor

@excid3 excid3 commented Dec 30, 2021

This allows passing in credentials either as a file path or IO object. Useful if you're storing your credentials in ENV or Rails credentials for example.

FCM.new("test", "creds.json")
FCM.new("test", StringIO.new("example"))
FCM.new("test", Rails.application.credentials.dig(:google, :credentials))

spec/fcm_spec.rb Show resolved Hide resolved
spec/fcm_spec.rb Show resolved Hide resolved
spec/fcm_spec.rb Show resolved Hide resolved
spec/fcm_spec.rb Show resolved Hide resolved
spec/fcm_spec.rb Show resolved Hide resolved
@sabman sabman merged commit c2285ff into decision-labs:master Dec 31, 2021
@sabman
Copy link
Member

sabman commented Dec 31, 2021

love it!

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.

None yet

2 participants