Conversation
| break if chunk.empty? | ||
| dgst.update chunk | ||
| end | ||
| elsif data.is_a?(String) |
There was a problem hiding this comment.
Prefer Object#kind_of? over Object#is_a?.
| dgst = Digest::MD5.new | ||
| if block_given? | ||
| while true do | ||
| chunk = block.call |
| def put_object(container, object, data, options = {}, &block) | ||
| dgst = Digest::MD5.new | ||
| if block_given? | ||
| while true do |
There was a problem hiding this comment.
Use Kernel#loop for infinite loops.
Literal true appeared as a condition.
Do not use do with multi-line while.
| class Mock | ||
| require 'digest' | ||
|
|
||
| def put_object(container, object, data, options = {}, &block) |
There was a problem hiding this comment.
Unused method argument - container. If it's necessary, use _ or _container as an argument name to indicate that it won't be used.
Unused method argument - object. If it's necessary, use _ or _object as an argument name to indicate that it won't be used.
Unused method argument - options. If it's necessary, use _ or _options as an argument name to indicate that it won't be used.
fff44e3 to
e1e0306
Compare
| class Mock | ||
| require 'digest' | ||
|
|
||
| def put_object(_container, _object, data, _options = {}, &block) |
There was a problem hiding this comment.
Unused method argument - block. If it's necessary, use _ or _block as an argument name to indicate that it won't be used.
Now that put_object mock is implemented, we can enable some of the tests that rely on it.
e1e0306 to
40e150a
Compare
|
I squashed two related commits and added a small fix-up for the |
|
I could follow the discussion from a distance and was glad to see the discussion and communication expanded to achieve the best level of open source possible. Thanks for this and keep up the good work! |
Fixing up a prior PR (#341) that added these mocks.