Skip to content

Commit

Permalink
Fix missing unzip method and change gnip url
Browse files Browse the repository at this point in the history
  • Loading branch information
copiousfreetime committed Mar 19, 2009
1 parent 42f4ae7 commit cf7910e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/snipe/configuration.rb
Expand Up @@ -102,7 +102,7 @@


user_agent "Snipe/#{Snipe::Version}" user_agent "Snipe/#{Snipe::Version}"
compressed true 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 end


Expand Down
7 changes: 7 additions & 0 deletions lib/snipe/gnip/consumer.rb
Expand Up @@ -133,6 +133,13 @@ def bucket_data_file( bucket_id )
FileUtils.mkdir_p( d ) unless File.directory?( d ) FileUtils.mkdir_p( d ) unless File.directory?( d )
File.join( d, "#{bucket_id}.xml.gz" ) File.join( d, "#{bucket_id}.xml.gz" )
end 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 # given a bucket id download it from gnip and put it in the appropriate file
def download_bucket( bucket_id ) def download_bucket( bucket_id )
Expand Down

0 comments on commit cf7910e

Please sign in to comment.