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

Add a smart default_to method in our options.yml #479

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

krschacht
Copy link
Contributor

@krschacht krschacht commented Jul 31, 2024

Within config.yml we can now do:

ENV["SOME_KEY"] || default_to(cloudflare: :account_id, test_override: "abc-123")

This means that it will fall back to the value within default_to() except when it's in the test environment. And the value within default_to gets smartly looked up in the credentials file if it's a single symbol or a hash.

@krschacht
Copy link
Contributor Author

The system tests have been having trouble. Initially I thought there may be a flaky test. But I re-ran and they just hung forever so now i’m hoping this is just an issue with github’s servers. Trying a third time.

@krschacht krschacht merged commit 5495203 into main Aug 1, 2024
6 checks passed
@krschacht krschacht deleted the smarter-options-defaults branch August 1, 2024 13:30
@krschacht
Copy link
Contributor Author

Merged

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.

2 participants