-
Notifications
You must be signed in to change notification settings - Fork 21
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
webmock for tests/non-blocking put for large files/default settings/callback ease #14
base: master
Are you sure you want to change the base?
Conversation
Added some more. Now you can put like this:
This will pass the :file option directly to em-http-request, which will upload the file chunkwise with the magnificent EventMachine::FileStreamer. No more blocking when using |
…bject for callback chaining * Happening::S3::Request delegates #stream and #headers to the http-request object/response
I changed the It makes more sense, because we create a request with all the put/get/head/delete methods. The response is an accessor of this request. Next step would be to provide something like this:
Or even simpler with:
|
Happening::S3::Request acts as a em-http-request class
…meter obsolete when in defaults)
You can now set defaults for all items:
|
Taking the example from before, you can specify callbacks via blocks, no procs for options anymore.
|
That's it for now. The last commit added an Hope you gonna pull my changes and publish a new version of your excellent gem. |
I stumbled upon the missing of MockHttpRequest for version 1.0.0 of em-http-request.
That's why I changed the tests to use WebMock, which cleaned up the tests a bit and made them green again.
EDIT: Additional changes:
S3::Request#execute
returnsS3::Request
object for later callback chaining (importantEM::HttpRequest
methods delegated)Happening::AWS.set_defaults({ ... })
on_retry
callback