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

feat: Add offline mode for using the client locally #38

Merged
merged 10 commits into from
Jan 2, 2024

Conversation

zachaysan
Copy link
Contributor

Changes

This responds to the Ruby section of this issue which provides a way for various Flagsmith SDKs to operate in offline mode via using a static JSON document that gan be bundled with the SDK itself. I tried to follow the Python implementation as a guide, but since the structure of the Ruby client is different some approaches were not as clean.

Also, there is a minor upgrade to the project to improve our debugger as well.

Testing & Investigation

Because the Ruby SDK is a large piece of work, I wasn't able to fully verify that every method was covered. But I was able to verify that the environment document loaded correctly and since local evaluation mode relies upon a local document, most of the testing and investigation was trying to understand and verify that offline mode can work through the Flagsmith client.

lib/flagsmith.rb Show resolved Hide resolved
lib/flagsmith.rb Outdated Show resolved Hide resolved
lib/flagsmith/sdk/models/flags.rb Show resolved Hide resolved
@zachaysan zachaysan merged commit ee79786 into main Jan 2, 2024
4 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.

2 participants