Closed BRIMIL01 closed 13 years ago
Could you provide more context with this error? How precisely are you using it with Rails?
I want to pull a list of commits out of github. I have tried to integrate it into rails several ways but the easiest to recreate is running console, including Octopi and using one of the examples provided in the README. I get the following error back: Octopi::FormatError: Got unexpected format (got a for yaml). Upon further investigation it looks like in api.rb the content-type is expected to be an array but is a string instead (rails possibly does some modification to the response object).
Fixed in #50. This bug was appearing under ruby 1.9.
Thank you.
Yes thank you
On line 198 of api.rb for some reason resp.headers['content-type'] is not an array as expected. I replaced line 198 with ctype = resp.headers['content-type'].to_a.first.split(";").first in my local gem and it seemed to resolve the problem. I have only encountered this issue when attempting to use this gem with rails.