-
Notifications
You must be signed in to change notification settings - Fork 45
Fix long JSON preprocessing #36
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
base: main
Are you sure you want to change the base?
Fix long JSON preprocessing #36
Conversation
Thanks, @davidalejandroaguilar - is there a way this could be a breaking change? I can't imagine it breaking anyone's existing use of the gem, should just make it more reliable basically? |
@alexrudall Appreciate you taking a look. I also don't think this would be a breaking change, it should indeed make it more reliable. However, I can add more specs to cover more edge cases, such as an empty JSON, a JSON which is not enclosed in an array, etc. if you're OK with additional VCRs (kinda followed the existing style, didn't want to go overboard). I'm OK paying for the API requests. |
9a80bc6
to
3e12417
Compare
8a25cdc
to
6f9a22c
Compare
@alexrudall Added additional specs, these are the specs we'd have:
Let me know if you can think of additional edge cases, but I think we should be OK releasing this as a non-breaking change. |
@alexrudall Hey there, just checking in on this 😃 , is there anything holding it up? |
Apologies, only my own prioritisation! Thank you for chasing, I'll try to get this merged this week. |
Description
This PR:
FixtureHelpers
tospec/support
which are automatically loaded in specs, so we can compare fixtures to expected results more easily.I tried to follow the existing code style, let me know if you'd like to me clean something up.
Example
Previous
When the stack is:
The parsed JSON object is:
But the resulting stack is:
So as the stack starts filling up again:
We'll get an error parsing it:
Now
When the stack is:
The parsed JSON object is:
And the resulting stack is:
So as the stack starts filling up again:
We'll be able to get the next JSON object:
All Submissions: