Options hash, api_version, and updated test / readme #56
+117
−60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've made a change to the API to take an optional hash to the update/upsert/insert/delete/query methods as the last parameter that allows the users of the gem to set their own options, as opposed to them being hidden / unnamed inside the method signatures.
Instead of having to do this to set the timeout:
You would pass an options hash:
All other parameters are set with the current default settings based on the method (e.g. query has :get_response => true by default), and there is a new parameter called
:concurrency
which allows the user to set their processing method (parallel or concurrent).An additional change is to rely on the client for the api_version, instead of setting a constant on initialize. This allows the user to set their own api_version based on their own needs.
Finally, I've updated the readme and tests to reflect these changes, along with fixing a few tests that no longer worked after some previous commits.