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

Code reorganization #6

Merged
merged 2 commits into from
Dec 21, 2016
Merged

Code reorganization #6

merged 2 commits into from
Dec 21, 2016

Conversation

ryanmark
Copy link
Contributor

@ryanmark ryanmark commented Dec 21, 2016

Made a bunch of changes to try to simplify stuff.

  • The KintoObject does much more now, KintoServer, KintoCollection, KintoBucket and KintoRecord all inherit from KintoObject. This eliminated some duplication from these classes and from the base KintoClient class which was doing what KintoServer does now.
  • Almost all requests now use the KintoRequest object. While this makes the single requests more complex, it unites the code paths between batch requests and single requests.
  • Renamed the send method in KintoRequest to execute. send is a core ruby api method.
  • KintoBatchRequest now inherits from KintoRequest. All request objects have an execute method.
  • KintoObject info responses are now cached. This will probably cause some trouble checking if something changed the data on the server outside of the object instance. Added a reload method to KintoObject to bust this cache.
  • Added a rubocop config and fixed most rubocop warnings and errors.

@kavyasukumar kavyasukumar merged commit dddcb59 into master Dec 21, 2016
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