]> git.donarmstrong.com Git - biopieces.git/commitdiff
disabling buggy bzip2-ruby
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 26 Sep 2013 10:18:14 +0000 (10:18 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 26 Sep 2013 10:18:14 +0000 (10:18 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@2221 74ccb610-7750-0410-82ae-013aeee3265d

code_ruby/lib/maasha/filesys.rb

index 6a6067fbc859bb3df62a7f4eda547c0f44d8070c..4f58898b91977a3dbc1695ed3191018b316bc34e 100644 (file)
@@ -23,7 +23,8 @@
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 require 'zlib'
-require 'bzip2'
+# require 'bzip2'
+require 'open3'
 
 # Error class for all exceptions to do with Filesys.
 class FilesysError < StandardError; end
@@ -51,7 +52,8 @@ class Filesys
       when :gzip
         ios = Zlib::GzipWriter.new File.open(file, mode, options)
       when :bzip, :bzip2
-        ios = Bzip2::Writer.new File.open(file, mode, options)
+        # ios = Bzip2::Writer.new File.open(file, mode, options)   # TODO being pissed with buggy bzip2 gem.
+        ios, = Open3.pipeline_w("bzip2 -c", out: file)
       else 
         ios = File.open(file, mode, options)
       end