Permalink
Browse files

Fix missing unzip method and change gnip url

  • Loading branch information...
1 parent 42f4ae7 commit cf7910e0523103166932e6c008a85736dc3f344d @copiousfreetime committed Mar 19, 2009
Showing with 8 additions and 1 deletion.
  1. +1 −1 lib/snipe/configuration.rb
  2. +7 −0 lib/snipe/gnip/consumer.rb
@@ -102,7 +102,7 @@
user_agent "Snipe/#{Snipe::Version}"
compressed true
- notification_url "https://demo-v21.gnip.com/gnip/publishers/twitter/notification/"
+ notification_url "https://api-v21.gnip.com/gnip/publishers/twitter/notification/"
end
@@ -133,6 +133,13 @@ def bucket_data_file( bucket_id )
FileUtils.mkdir_p( d ) unless File.directory?( d )
File.join( d, "#{bucket_id}.xml.gz" )
end
+
+ def unzip( data )
+ sio = StringIO.new( data )
+ ::Zlib::GzipReader.new( sio ).read
+ end
+
+
# given a bucket id download it from gnip and put it in the appropriate file
def download_bucket( bucket_id )

0 comments on commit cf7910e

Please sign in to comment.