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

Options hash, api_version, and updated test / readme #56

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jmagoon
Copy link

@jmagoon jmagoon commented Jan 14, 2016

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:

create('Account', records, false, false, [], 10000, 100) 

You would pass an options hash:

create('Account',records,{:timeout => 100})

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.

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.

1 participant