Class: FaradayMiddleware::Gzip

Inherits:
Object
  • Object
show all
Defined in:
lib/builderator/patch/berkshelf.rb

Instance Method Summary collapse

Instance Method Details

#__uncompress_gzip__Object



9
# File 'lib/builderator/patch/berkshelf.rb', line 9

alias_method :__uncompress_gzip__, :uncompress_gzip

#uncompress_gzip(body) ⇒ Object



10
11
12
13
14
# File 'lib/builderator/patch/berkshelf.rb', line 10

def uncompress_gzip(body)
  __uncompress_gzip__(body)
rescue Zlib::GzipFile::Error
  StringIO.new(body).read
end