Tumblr: Fixing double-read and off-by-one error#253
Tumblr: Fixing double-read and off-by-one error#253jekyllbot merged 1 commit intojekyll:masterfrom hairyhenderson:fix-tumblr-import
Conversation
Fixing two bugs introduced recently: - `feed` was getting read from twice, so the second time it was empty - `ending` marks the index of the right-most `}`, but needed to be bumped by 1 when referenced in the array Signed-off-by: Dave Henderson <dhenderson@gmail.com>
|
LGTM, thank you. Ideally this would have a test – do you have interest in creating one? |
|
@parkr - thanks! Yeah, I have interest in adding a test for this, but I'm not much of a Rubyist, so I'll have to bone up on the tests first probably 😉... |
|
@hairyhenderson No problem! It'd probably come down to updating the test You might want to create a method # Parses the JSON from the JavaScript in the Tumblr API response
# and returns a Hash of its parsed data.
def self.extract_json(content)
# ...
endThen add a test which calls |
|
I'll add the test in a minute. 👍 LGTM. |
|
@jekyllbot: merge |
This new method was added in #253. This commit extracts the update into a new method and adds a test for it.
|
@hairyhenderson Added a test for this in 28f0cad. |
|
Thanks @parkr - sorry for the lack of response! Was going to give it a shot, but stuff got in the way 😉 |
Found these bugs after I ran into #252
Fixing two bugs introduced recently:
feedwas getting read from twice, so the second time it was emptyendingmarks the index of the right-most}, but needed to bebumped by 1 when referenced in the array
Signed-off-by: Dave Henderson dhenderson@gmail.com