lib/git/semaphore/api.rb in git-semaphore-2.2.0 vs lib/git/semaphore/api.rb in git-semaphore-2.3.0

- old
+ new

@@ -103,12 +103,11 @@ raise 'Unsupported action' end end def response.json_body - unless self['content-type'].match?(%r{application/json}) - raise 'JSON response expected' - end + raise 'JSON response expected' \ + unless self['content-type'].match?(%r{application/json}) JSON.parse(body) end response end