bossman 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/extensions/http_success.rb +19 -0
- metadata +2 -1
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'zlib'
|
2
|
+
require 'stringio'
|
3
|
+
|
4
|
+
module Net
|
5
|
+
class HTTPSuccess
|
6
|
+
|
7
|
+
def body
|
8
|
+
case self['content-encoding']
|
9
|
+
when 'gzip'
|
10
|
+
body = StringIO.new(super)
|
11
|
+
uncompressed_body = Zlib::GzipReader.new(body)
|
12
|
+
uncompressed_body.read
|
13
|
+
else
|
14
|
+
super
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bossman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Pignata
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- lib/bossman/search.rb
|
40
40
|
- README.md
|
41
41
|
- LICENSE
|
42
|
+
- lib/extensions/http_success.rb
|
42
43
|
has_rdoc: true
|
43
44
|
homepage: http://github.com/jpignata/bossman-gem
|
44
45
|
licenses: []
|