Skip to content

Commit

Permalink
Ruby 1.9 support.
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Shea <[email protected]>
  • Loading branch information
nogweii committed Aug 28, 2009
1 parent cd4fe29 commit 00db43a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/mouseHole/central.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'ftools'
require 'fileutils'
require 'mouseHole/page'

module MouseHole
Expand Down Expand Up @@ -26,7 +26,7 @@ def initialize(server, options)
@etags, @sandbox = {}, {}
@working_dir = options.working_dir
@dir = options.mouse_dir
File.makedirs( @dir )
FileUtils.mkdir_p( @dir )
@started = Time.now

# connect to the database, get some data
Expand Down
4 changes: 2 additions & 2 deletions lib/mouseHole/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ def decode(resin)
end

case resin['content-encoding']
when 'gzip':
when 'gzip' then
gzr = Zlib::GzipReader.new(StringIO.new(body))
body = gzr.read
gzr.close
self.headers['content-encoding'] = nil
when 'deflate':
when 'deflate' then
body = Zlib::Inflate.inflate(body)
self.headers['content-encoding'] = nil
end
Expand Down

0 comments on commit 00db43a

Please sign in to comment.